Nursewell PRD
Product Requirements Document — generated from live codebase · August 2026
╔══════════════════════════════════════════════════════════════════════════════════════╗
║ NURSEWELL — PRODUCT REQUIREMENTS DOCUMENT (PRD) ║
║ Platform Status: Live / Active Development ║
║ nursewell.co.uk · August 2026 ║
╚══════════════════════════════════════════════════════════════════════════════════════╝
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. PRODUCT OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Nursewell is a UK-based healthcare staffing agency platform that connects
healthcare professionals (staff) with care providers (clients/facilities) and
manages the full staffing lifecycle: recruitment → compliance → scheduling →
timesheets → payroll → invoicing → reporting — all within a single unified
platform.
It also operates a secondary Transport sector portal for driver placement,
sharing the same backend infrastructure with sector-specific branding.
MISSION STATEMENT:
To eliminate administrative friction in healthcare staffing by providing an
end-to-end digital platform that handles compliance, scheduling, payroll, and
invoicing — allowing agencies to focus on people, not paperwork.
┌──────────────────────────────────────────────────────────────────────┐
│ STATISTICS AT A GLANCE (August 2026) │
├──────────────────────────────────────────────────────────────────────┤
│ 40+ Data entities │
│ 350+ Backend functions │
│ 9 Core automations (archived 32 non-essential) │
│ 100+ React pages & components │
│ 12 External integrations │
│ 2 Sector portals (Healthcare + Transport) │
│ 11 AI-powered features │
└──────────────────────────────────────────────────────────────────────┘
PRIMARY USERS:
┌──────────────┬────────────────────────────────────────────────────────────┐
│ Role │ Description │
├──────────────┼────────────────────────────────────────────────────────────┤
│ Admin │ Nursewell staff; full platform access │
│ Client │ Care homes, hospitals, supported living facilities │
│ Staff │ Carers, nurses, cleaners, kitchen assistants │
│ Driver │ Transport sector staff (separate portal) │
│ Referee │ External referees completing staff reference forms │
│ Guest │ Unauthenticated visitors browsing public job board │
└──────────────┴────────────────────────────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2. BUSINESS OBJECTIVES & SUCCESS METRICS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2.1 BUSINESS OBJECTIVES
─────────────────────────────────────────────────────────────────────────
✔ Reduce time-to-fill for healthcare shifts from days to hours
✔ Automate end-to-end compliance verification with AI
✔ Eliminate paper-based timesheet and payroll processes
✔ Provide real-time visibility into staffing, billing, and payroll
✔ Minimise platform credit consumption through efficient automation design
✔ Enable scalable multi-sector operations (healthcare + transport)
2.2 SUCCESS METRICS (KPIs)
─────────────────────────────────────────────────────────────────────────
┌────────────────────────────┬──────────────────────────────────────┐
│ Metric │ Target │
├────────────────────────────┼──────────────────────────────────────┤
│ Shift fill rate │ ≥ 95% within 48h of posting │
│ Compliance verification │ ≥ 80% auto-approved by AI │
│ Timesheet approval time │ ≤ 24h after shift completion │
│ Invoice generation │ 100% automated from approved TS │
│ Payroll accuracy │ Zero manual corrections per run │
│ Platform credit efficiency │ ≤ 50 credits/day operational │
│ Staff onboarding time │ ≤ 5 days from registration to active │
│ Mobile engagement │ ≥ 60% staff using mobile portal │
└────────────────────────────┴──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3. USER PERSONAS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3.1 SARAH — Agency Admin / Operations Manager
─────────────────────────────────────────────────────────────────────────
Needs: Full visibility of all staff, clients, shifts, compliance, payroll
Goals: Fill shifts fast, ensure compliance, process payroll accurately
Pain: Manual tracking across spreadsheets, chasing documents, payroll errors
Device: Desktop (primary), mobile (secondary)
3.2 JAMES — Care Home Manager (Client)
─────────────────────────────────────────────────────────────────────────
Needs: Post shifts quickly, find qualified staff, approve timesheets
Goals: Maintain staffing levels, control costs, pay invoices on time
Pain: Agency response times, unqualified staff, billing disputes
Device: Desktop (primary), tablet (secondary)
3.3 PRIYA — Registered Nurse (Staff)
─────────────────────────────────────────────────────────────────────────
Needs: Browse available shifts, manage schedule, track pay, upload docs
Goals: Flexible work, timely pay, career progression, easy compliance
Pain: Unclear shift availability, late payslips, manual document submission
Device: Mobile (primary), desktop (secondary)
3.4 MICHAEL — Transport Client (Drivers Portal)
─────────────────────────────────────────────────────────────────────────
Needs: Post driver duties, manage weekly rota, invoice processing
Goals: Efficient fleet staffing, transparent billing
Pain: Separate systems for transport vs healthcare staffing
Device: Desktop (primary)
3.5 DR. PATEL — External Referee
─────────────────────────────────────────────────────────────────────────
Needs: Complete reference forms quickly without creating an account
Goals: Provide accurate reference in minimal time
Pain: Complex reference portals requiring registration
Device: Desktop or mobile (token-based secure link)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4. SYSTEM ARCHITECTURE — HIGH-LEVEL DIAGRAM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┌─────────────────────────────────────────────────────────────────────────┐
│ NURSEWELL PLATFORM │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌────────────────────────────┐ │
│ │ ADMIN │ │ CLIENT │ │ STAFF / DRIVER │ │
│ │ PORTAL │ │ PORTAL │ │ PORTAL │ │
│ └──────┬───────┘ └──────┬───────┘ └──────────┬─────────────────┘ │
│ │ │ │ │
│ ┌──────▼─────────────────▼───────────────────────▼──────────────────┐ │
│ │ BASE44 BACKEND (BaaS) │ │
│ │ ┌────────────────┐ ┌──────────────┐ ┌──────────────────────┐ │ │
│ │ │ Entity DB │ │ 350+ │ │ Automations │ │
│ │ │ (40+ entities) │ │ Backend Fns │ │ (Scheduled/Entity) │ │
│ │ └────────────────┘ └──────────────┘ └──────────────────────┘ │ │
│ └──────────────────────────┬────────────────────────────────────────┘ │
│ │ │
│ ┌──────────────────────────▼────────────────────────────────────────┐ │
│ │ EXTERNAL INTEGRATIONS │ │
│ │ Resend (email) │ Google Drive │ Google Sheets │ QuickBooks │ │
│ │ Stripe │ PayPal │ Companies House │ Ideal Postcodes │ │
│ │ AI/LLM (InvokeLLM) │ WhatsApp Webhook │ │
│ └───────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
TECH STACK:
┌──────────────────────────────────────────────────────────────────────┐
│ Frontend: React 18 + Vite + Tailwind CSS + shadcn/ui │
│ State: React Query (TanStack) + React Context │
│ Animation: Framer Motion │
│ Charts: Recharts │
│ Maps: React Leaflet │
│ Rich Text: React Quill │
│ Backend: Base44 BaaS (serverless functions, entity DB, RLS) │
│ Auth: Base44 managed auth (email/password, sessions, tokens) │
│ Hosting: Base44 platform (web + iOS/Android from same codebase) │
└──────────────────────────────────────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5. CORE FEATURE MODULES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5.1 STAFF LIFECYCLE
─────────────────────────────────────────────────────────────────────────
ONBOARDING ──► COMPLIANCE ──► AVAILABILITY ──► SHIFT ASSIGNMENT
│ │ │ │
[Registration] [Docs/DBS/RTW] [Calendar/Weekly] [Job Board/Direct]
[PAYE/NI/Bank] [References] [Blocked dates] [Applications]
[Profile] [Training] [Preferences] [AI Matching]
│ │
[Contract sign] [AI Verification]
✔ Staff Onboarding Portal (multi-step wizard)
✔ Compliance document upload + AI verification (fraud detection, confidence score)
✔ DBS check / Right to Work verification
✔ Reference requests (automated emails + WhatsApp chasing)
✔ Digital contract signing
✔ Profile completion tracking with banners/reminders
✔ Reward points & tiers (Bronze/Silver/Gold/Platinum)
✔ Staff profile PDF generation & email to clients
✔ Incomplete profile banner (non-blocking reminder)
5.2 CLIENT LIFECYCLE
─────────────────────────────────────────────────────────────────────────
REGISTRATION ──► PROFILE ──► POST SHIFTS ──► TIMESHEETS ──► INVOICES
│ │ │ │ │
[Org details] [Centers] [Wizard/Weekly] [Digital sign] [Auto-gen]
[Contract] [Contacts] [Requirements] [Approval] [Payment]
✔ Client onboarding wizard (organisation, centers, billing, SLA)
✔ Multi-center / sub-client architecture (parent org → child centers)
✔ Weekly shift planner (drag & drop + recurring patterns)
✔ Duty number auto-fill via AI
✔ Staff search + direct booking (favorite staff list)
✔ Staff proposals management
✔ Timesheet approval (digital signature, auto-approval rules)
✔ Timesheet auto-approval settings (time tolerance, delay hours)
✔ Client signature upload (pre-signed timesheet upload)
✔ Invoice dashboard with billing cycles
✔ Billing dashboard with charts
✔ Transport sector: separate /drivers portal
✔ Marketing proposals with role-based rate comparison
✔ Client reviews of staff
5.3 SHIFT & SCHEDULING
─────────────────────────────────────────────────────────────────────────
✔ Multiple scheduler views: Calendar, Drag & Drop, Smart Allocator, Weekly planner
✔ Shift types: Early / Late / Long Day / Night / Sleep-In
✔ Recurring shifts (daily/weekly/biweekly/monthly)
✔ Shift applications, bidding, invitations
✔ Shift swap requests (staff ↔ staff, admin approval)
✔ AI staff matching with match scores & reasons
✔ AI shift scheduling assistant (auto-roster generation)
✔ Conflict detection (double booking, availability)
✔ Posting deadline reminders
✔ History/audit log per shift
✔ GPS clock-in / clock-out with geofencing
✔ Shift audit log (comprehensive change tracking)
✔ Location verification on-site
✔ Shift file uploader (bulk shift creation from files)
✔ Duty pattern detection (useDutyPatterns, useShiftPatterns)
✔ Publish roster schedule to staff
✔ Shift messaging panel (in-app communication)
5.4 TIMESHEETS
─────────────────────────────────────────────────────────────────────────
✔ Auto-generated from approved shifts
✔ Staff submit → client approves (digital signature or pre-uploaded)
✔ AI anomaly detection & fraud flags
✔ AI timesheet approval assistant
✔ Timesheet PDF generation + secure signing link
✔ Auto-approval rules (time tolerance, delay hours)
✔ Admin bulk approve, amendment dialog
✔ Reconciliation with invoices
✔ Location verification badges (GPS clock-in/out)
✔ Timesheet fraud alerts panel
✔ Data audit panel for timesheet integrity
✔ Client timesheet summary
● Clock-in/out widget (digital + GPS)
✔ Timesheet status tracker
● Take-home pay estimator
✔ Manager approval queue
✔ Weekly timesheet row component
5.5 PAYROLL
─────────────────────────────────────────────────────────────────────────
✔ Hourly & Salaried payslip generation
✔ PAYE deductions: Tax, NI, Student Loan, Pension
✔ Year-to-date (YTD) tracking per employee
✔ Employer NI calculation & YTD
✔ Bonuses & deductions management
✔ BACS payroll export
✔ RTI FPS generation & submission to HMRC
✔ QuickBooks sync
✔ Payroll hub with draft → review → process → paid workflow
✔ Weekly payroll summary
✔ Staff payslip portal (view/download own payslips)
✔ Bank details validation + missing bank details alerts
✔ Payrun settings (weekly/2-weekly/4-weekly/monthly/custom per staff)
✔ Monthly summary report
✔ Payroll audit log
✔ Bank holiday shifts panel (with holiday rate calculation)
✔ Payroll forecast tool
✔ Auto-payroll generator
✔ Salaried payslip form (for salaried staff)
✔ Import payslip dialog
● Payment processor integration
5.6 INVOICING
─────────────────────────────────────────────────────────────────────────
✔ Auto-invoice generation from approved timesheets
✔ Billing cycles: weekly / 2-weekly / 4-weekly / monthly / manual
✔ ClientProfile-configured billing cycle start/end days
✔ VAT calculation, adjustments, line items
✔ Invoice PDF generation & email delivery
✔ Overdue reminders (automated + manual)
✔ Client payment portal (Stripe, PayPal, bank transfer, cheque, cash)
✔ Billing cycle dashboard + analytics
✔ Gross profit analysis
✔ QuickBooks / accounting sync
✔ Invoice templates with configurable columns (role, duty no, time, staff)
✔ Invoice number auto-generation
✔ Invoice sent log (tracks accounts payable email, CC, sent by)
✔ Recurring invoice schedules
✔ Invoice approval queue (draft → approve → send)
✔ Bulk invoice generation
✔ Invoice reminder settings
✔ Mark invoice as paid dialog
✔ Auto-attach invoice PDF on send
✔ Invoice analytics & tracking widgets
● Stripe payment form (inline)
● PayPal payment buttons
✔ Bank payment instructions
✔ Auto-pay preferences panel
✔ Draft invoice timesheet review
✔ Invoice payable contact form (client AP email setup)
5.7 COMPLIANCE & DOCUMENTS
─────────────────────────────────────────────────────────────────────────
✔ Document type library (DBS, Passport, NMC, Right to Work, etc.)
✔ Per-job-type compliance requirements matrix
✔ AI document verification (authenticity, fraud risk, cross-reference)
✔ AI compliance monitoring (proactive / predictive)
✔ Expiry tracking & automated reminders (30-day warning)
✔ Admin review queue with approval / rejection / manual override
✔ Compliance audit history per document
✔ Global document distribution to all/selected staff
✔ Document acknowledgement tracking
✔ Training modules + certificates + training paths
✔ Role-based training requirements (categories A/B/C/D)
✔ Staff training progress tracking
✔ Compliance dashboard overview
✔ Document expiry dashboard
✔ AI document verification card (inline results)
✔ Document version history
✔ Quick document upload (simplified)
✔ Smart document uploader (with classification)
✔ Document scanner component
● Inline verification result panel
✔ DBS check form & result
✔ Right to Work verification (with PDF support)
✔ Regulatory register form
✔ Compliance checklist
✔ Document category manager
✔ Automated compliance checker
✔ Predictive compliance monitor
✔ Compliance notification settings
✔ Compliance gate (blocks shift assignment if non-compliant)
5.8 CONTRACTS
─────────────────────────────────────────────────────────────────────────
✔ Contract templates (staff, client, subcontractor)
✔ Placeholder system ({{business_name}}, {{email}}, etc.)
✔ Digital signing with signature pad
✔ Signed contract PDF generation + Google Drive backup
✔ Version history & archiving
✔ Contract renewal reminders
✔ Subcontractor agreement flow
✔ Automated contract generator
✔ Contract compliance monitor
✔ AI contract generator & analyzer
✔ Contract view modal
✔ Client contract generation with signature
5.9 AI FEATURES
─────────────────────────────────────────────────────────────────────────
✔ AI shift scheduling assistant
✔ AI staff matching (match score + reasons)
✔ AI document verification & fraud detection
✔ AI compliance monitoring (proactive / predictive)
✔ AI invoice generation from timesheets
✔ AI timesheet approval assistant
✔ AI reference analysis (content + email domain validation)
✔ AI job description generation
✔ AI chatbot (in-app)
✔ AI duty number auto-fill
✔ AI staffing shortage prediction
✔ AI shift rate calculator
✔ AI comprehensive profile verification
✔ AI document reviewer
✔ AI review summary generation
✔ AI schedule generation
5.10 COMMUNICATIONS & NOTIFICATIONS
─────────────────────────────────────────────────────────────────────────
✔ In-app notification center
✔ Notification bell with unread count
✔ Push notifications (mobile app)
✔ Email notifications (via Resend)
✔ WhatsApp reference chasing
✔ Shift reminders (upcoming, deadline)
✔ Compliance expiry reminders
● In-app messaging (staff ↔ client ↔ admin)
✔ Shift messaging panel
✔ Quick message modal
✔ Notification preferences per user
✔ Reminder settings (global + per-entity)
✔ Onboarding progress updates
5.11 REPORTING & ANALYTICS
─────────────────────────────────────────────────────────────────────────
✔ KPI dashboard
✔ Approval times chart
✔ Job type demand chart
✔ Staff utilization chart
✔ Bank holiday audit tab
✔ Compliance trends chart
✔ Revenue vs payroll chart
✔ Payroll YTD summary
✔ Gross profits analysis
✔ Billing cycle hours chart
✔ Admin stats dashboard
✔ Weekly payroll summary
● Export menu (CSV, Excel, PDF)
5.12 FINANCE & ACCOUNTING
─────────────────────────────────────────────────────────────────────────
✔ Financial year management
✔ Profit & loss statement
✔ Balance sheet
✔ Cash flow monthly tracking
✔ Corporation tax (CT600)
✔ Director tools (salary, dividends)
✔ Expense tracking
✔ Account entry management
✔ Account labels (turnover, cost of sales, admin costs, etc.)
● Payment methods management
✔ Finance year selector
✔ Income statement
● Comprehensive payroll/invoice generators
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6. DATA MODEL — KEY ENTITIES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┌─────────────────────────────────────────────────────────────────────────┐
│ USER (built-in) │
│ role: admin | user user_type: staff | client │
│ parent_user_id: for sub-clients under a parent organisation │
└──────────────────┬──────────────────┬──────────────────────────────────┘
│ │
┌──────────▼──────┐ ┌────────▼────────────────────────┐
│ StaffProfile │ │ ClientProfile │
│ ───────────── │ │ ───────────────── │
│ personal info │ │ org details / centers │
│ availability │ │ billing settings │
│ certifications │ │ SLA / contract terms │
│ reward points │ │ timesheet approver │
│ skills │ │ sector: healthcare | transport │
│ bank details │ │ billing cycle config │
│ employment hist│ │ markup overrides │
└──────┬──────────┘ └──────────┬──────────────────────┘
│ │
┌────────────▼──────┐ ┌─────────▼──────────────────┐
│ ComplianceDoc │ │ Shift │
│ Reference │ │ ───────────────── │
│ Resume │ │ date/time/role │
│ SignedContract │ │ assigned_staff[] │
│ TrainingProgress │ │ recurring pattern │
│ StaffReview │ │ history_log[] │
└───────────────────┘ │ shift_type classification │
│ budget stats │
└──────────┬─────────────────┘
│
┌────────────▼──────────┐
│ Timesheet │
│ ───────────────── │
│ clock in/out (GPS) │
│ client signature │
│ AI anomaly check │
│ signing token │
│ invoice_id (linked) │
│ payslip_id (linked) │
└──────────┬────────────┘
│
┌───────────────▼──────────────────┐
│ Invoice │ Payslip │
│ ───────────── │ ─────────── │
│ line items │ PAYE/NI │
│ VAT / adj │ YTD totals │
│ payment status │ deductions │
│ billing cycle │ bonuses │
│ sent log │ employer NI │
│ archived flag │ RTI FPS │
└──────────────────┴──────────────┘
OTHER KEY ENTITIES:
Job · JobApplication · ShiftBid · ShiftInvitation · ShiftSwapRequest
JobType (with sub-types & qualifications) · ComplianceRequirement
Notification · ContractTemplate · FormTemplate · FormSubmission
StaffReview · ClientReview · GlobalDocument · DocumentAcknowledgement
RTIFPSSubmission · PayrollRecord · PayrunSettings · FinancialYear
RateSchedule · SystemSettings · AccountEntry · CashflowMonth
InvoiceTemplate · InvoiceSentLog · RecurringInvoice · AccountLabel
FavoriteStaff · JobTemplate · JobSearch · MarketingProposal
CenterManagerInvitation · ReferenceRequest · RefereeToken
TaxSettings · PaymentSettings · PaymentTransaction
ComplianceAlert · ComplianceNotificationSettings · ShiftAuditLog
StaffTrainingProgress · TrainingModule · TrainingPath
RoleTrainingRequirement · SubcontractorAgreementRequest
DocumentType · DocumentTag · EmailVerification
OperationalCenter · AccountingIntegration · ExpenseLine
NotificationPreference · OnboardingReminder · JobSearch
TOTAL: 40+ entities with full CRUD + RLS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7. USER FLOW DIAGRAMS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7.1 STAFF JOURNEY
─────────────────────────────────────────────────────────────────────────
Register
└──► Complete Profile (personal, PAYE, bank, job type)
└──► Upload Compliance Docs
└──► AI Verifies Docs ──► Admin Reviews ──► Approved
└──► Sign Contract
└──► Set Availability (weekly + specific dates)
└──► Browse / Apply for Shifts
└──► AI Match Score shown
└──► Shift Assigned (notification)
└──► GPS Clock-In
└──► Work Shift
└──► GPS Clock-Out
└──► Submit Timesheet
└──► Client Approves
└──► Payslip Generated
└──► RTI FPS → HMRC
└──► Paid (BACS)
7.2 CLIENT JOURNEY
─────────────────────────────────────────────────────────────────────────
Register
└──► Complete Organisation Profile (via onboarding wizard)
└──► Add Operational Centers
└──► Sign Contract (digital signature)
└──► Configure Billing Cycle (start/end days)
└──► Post Shift / Weekly Schedule
└──► AI Suggests Staff ──► Client Confirms / Direct Books
└──► Staff Accepts (notification)
└──► Shift Completed
└──► Approve Timesheet (digital sign)
└──► Invoice Auto-Generated (billing cycle)
└──► Invoice Sent (email + PDF)
└──► Pay Invoice (Stripe/PayPal/Bank)
└──► Marked Paid → Thank You Email
7.3 ADMIN WORKFLOW
─────────────────────────────────────────────────────────────────────────
Dashboard (KPI overview)
├──► Review Staff Profiles & Compliance Docs (AI verification queue)
├──► Manage Shifts (scheduler, drag-drop, smart allocator, audit log)
├──► Review & Approve Timesheets (bulk approve, fraud alerts)
├──► Run Payroll (draft → BACS export → RTI FPS → HMRC)
├──► Generate & Send Invoices (billing cycles, bulk send)
├──► Monitor Compliance Expiry (30/60/90 day warnings)
├──► KPI Dashboard & Analytics (revenue, utilization, trends)
├──► Financial Year Management (P&L, balance sheet, CT600)
├──► Transport Portal (separate driver management)
└──► Marketing Proposals (rate comparison, send to prospects)
7.4 REFERENCE VERIFICATION FLOW
─────────────────────────────────────────────────────────────────────────
Staff adds referee details
└──► Admin triggers reference request
└──► Email sent to referee (with secure token)
└──► Referee clicks link (no registration required)
└──► Completes reference form (rating, comments)
└──► AI analyzes content (sentiment, red flags)
└──► Admin reviews AI analysis
└──► Approve / Flag / Reject
└──► Auto-reminder if no response (chase)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8. PORTAL STRUCTURE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8.1 HEALTHCARE PORTAL (default /*)
─────────────────────────────────────────────────────────────────────────
┌──────────────────────────────────────────────────────┐
│ ADMIN │ CLIENT │ STAFF │
│ /AdminDashboard│ /ClientDashboard│ /StaffPersonal │
│ /AdminStaff │ /ClientProfile │ /StaffShiftBrows│
│ /AdminShift* │ /ClientWeekly* │ /StaffTimesheets│
│ /AdminPayroll* │ /ClientInvoices │ /StaffCompliance│
│ /AdminInvoice* │ /ClientBilling* │ /StaffProfile │
│ /AdminCompli* │ /ClientTimesheet│ /StaffOnboarding│
│ /AdminFinance* │ /ClientPostJob* │ /StaffAvailabili│
│ /AdminKPI* │ /ClientFindStaff│ /StaffPayrollPor│
│ /AdminClients │ /ClientCenters │ /StaffSchedules │
│ /AdminRef* │ /ClientCommunic│ /StaffOnboarding │
│ /AdminMarket* │ /ClientBilling* │ /Messages │
└──────────────────────────────────────────────────────┘
8.2 TRANSPORT PORTAL (/drivers/*)
─────────────────────────────────────────────────────────────────────────
┌──────────────────────────────────────────────────────┐
│ Same Client portal pages re-mounted under DriversLayo│
│ Separate colour/brand tokens (blue/amber) │
│ Sector badge: "Transport Sector Portal" │
│ /drivers/ClientDashboard │
│ /drivers/ClientWeeklyShifts │
│ /drivers/ClientPostJobWizard │
│ /drivers/ClientProfile │
│ /drivers/ClientInvoices │
│ /drivers/ClientTimesheetPortal │
│ /drivers/ClientInvoiceDashboard │
│ /drivers/ClientBillingDashboard │
└──────────────────────────────────────────────────────┘
8.3 PUBLIC PAGES
─────────────────────────────────────────────────────────────────────────
┌──────────────────────────────────────────────────────┐
│ / (Home + job board) /AboutUs /Contact │
│ /TimesheetSigning (secure token-based) │
│ /RefereeLogin /RefereeDashboard │
│ Employment/Character/Academic Reference Forms │
│ /SignContract /VerifyEmail /Register │
│ /VerifyCenterManager (center manager verification) │
└──────────────────────────────────────────────────────┘
8.4 GLOBAL LAYOUT
─────────────────────────────────────────────────────────────────────────
✔ Responsive container (1440px max-width, centered)
✔ Sticky header with role-based navigation
✔ Bottom tab bar for mobile (staff, client, admin)
✔ Page transitions (Framer Motion)
✔ Admin "View As" banner
✔ Incomplete profile banner (staff)
● Notification bell (all roles)
✔ Footer with links & social media
✔ Mobile menu (guests only)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9. INTEGRATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┌─────────────────────┬─────────────────────────────────────────────────┐
│ Integration │ Usage │
├─────────────────────┼─────────────────────────────────────────────────┤
│ Resend │ All transactional emails (payslips, invoices, │
│ │ references, compliance, onboarding, reminders) │
├─────────────────────┼─────────────────────────────────────────────────┤
│ Google Drive │ Backup: contracts, payslips, compliance docs, │
│ │ staff profiles, form submissions, onboarding │
├─────────────────────┼─────────────────────────────────────────────────┤
│ Google Sheets │ Payroll export, shift planner sync │
├─────────────────────┼─────────────────────────────────────────────────┤
│ Google Calendar │ Shift sync for staff │
├─────────────────────┼─────────────────────────────────────────────────┤
│ QuickBooks │ Payroll & invoice accounting sync │
├─────────────────────┼─────────────────────────────────────────────────┤
│ Stripe │ Client invoice payment processing │
├─────────────────────┼─────────────────────────────────────────────────┤
│ PayPal │ Alternative payment option │
├─────────────────────┼─────────────────────────────────────────────────┤
│ Companies House API │ Client company lookup/verification │
├─────────────────────┼─────────────────────────────────────────────────┤
│ Ideal Postcodes / │ UK address lookup │
│ GetAddress │ │
├─────────────────────┼─────────────────────────────────────────────────┤
│ WhatsApp Webhook │ Reference chasing notifications │
├─────────────────────┼─────────────────────────────────────────────────┤
│ AI / LLM │ Document verification, matching, scheduling, │
│ (InvokeLLM) │ compliance monitoring, invoice generation, │
│ │ reference analysis, job descriptions │
├─────────────────────┼─────────────────────────────────────────────────┤
│ TikTok Shop Sync │ E-commerce sync (workspace connector) │
└─────────────────────┴─────────────────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
10. SECURITY & ACCESS CONTROL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
10.1 ROW-LEVEL SECURITY (RLS)
─────────────────────────────────────────────────────────────────────────
✔ RLS on all entities — enforced at database level
✔ Staff can only read/write own records (staff_user_id = {{user.id}})
✔ Clients can only access own organisation's data (client_user_id = {{user.id}})
✔ Admin has full access (user_condition: role = admin)
✔ Clients cannot modify billing fields (protected on ClientProfile)
✔ Sub-clients inherit access from parent organisation
✔ References: staff can create, admin can manage, referees use tokens
10.2 AUTHENTICATION & SESSIONS
─────────────────────────────────────────────────────────────────────────
✔ Base44 managed auth (email/password, session tokens)
✔ Email verification flow
✔ Session-cached user for instant page navigation
✔ Auto-redirect to login for unauthenticated users
● Protected route component for admin-only pages
✔ Admin "View As" feature (audit-logged impersonation)
10.3 SECURE EXTERNAL ACCESS
─────────────────────────────────────────────────────────────────────────
✔ Token-based timesheet signing (no login required for clients)
✔ Secure referee token login system
✔ Signing token with creation timestamp
✔ Center manager verification flow (6-digit code)
10.4 DATA PROTECTION
─────────────────────────────────────────────────────────────────────────
✔ No sensitive data stored in entity fields (files via UploadFile)
✔ Google Drive backup for all critical documents
✔ HMRC RTI FPS with employer tax reference tracking
● Payment processing via Stripe/PayPal (no card data stored)
✔ Admin override audit trail (compliance, references)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11. NON-FUNCTIONAL REQUIREMENTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11.1 PERFORMANCE
─────────────────────────────────────────────────────────────────────────
✔ Session-cached user eliminates full-page spinner on navigation
✔ React Query for data fetching with caching & invalidation
✔ Page transitions with Framer Motion (perceived performance)
✔ Inline loading states per component (not full-page blockers)
✔ Bulk operations for batch entity updates (reduces API calls)
✔ 1440px max-width global container for consistent rendering
✔ Image optimization (logos, stock photos from CDN)
11.2 RESPONSIVE DESIGN
─────────────────────────────────────────────────────────────────────────
✔ Mobile-first design for staff portal
✔ Desktop-optimized for admin dashboards
✔ Bottom tab navigation for mobile (staff, client, admin)
✔ Desktop dropdown navigation
✔ Responsive grid layouts (1-3 columns based on viewport)
✔ 44px minimum touch targets on mobile
✔ iOS safe-area insets for notched devices
✔ overflow-x-hidden on root (no horizontal scroll)
✔ overflow-x-auto on wide tables (local scroll)
11.3 ACCESSIBILITY
─────────────────────────────────────────────────────────────────────────
✔ Semantic HTML with proper heading hierarchy
✔ ARIA labels on interactive elements
✔ Keyboard navigation support (Radix UI primitives)
✔ Focus-visible outlines
✔ Screen reader compatible components
✔ Color contrast meets WCAG AA standards
11.4 RELIABILITY
─────────────────────────────────────────────────────────────────────────
✔ Error boundaries prevent full-page crashes
✔ Graceful error handling on form submissions
✔ Real-time entity subscriptions (live updates)
✔ Google Drive backup redundancy for critical documents
✔ Non-blocking AI operations (async, flagged for review)
11.5 PLATFORM CREDIT EFFICIENCY
─────────────────────────────────────────────────────────────────────────
✔ Archived 32 non-essential automations (retained 9 core workflows)
✔ Manual admin-triggered billing (not per-timesheet auto-invoicing)
✔ Favouring manual actions over high-frequency automatic retries
✔ Bulk operations to minimize per-record API calls
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12. AUTOMATIONS (9 CORE WORKFLOWS)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
32 non-essential automations were archived to minimise credit consumption.
The following 9 core operational workflows remain active:
┌────┬──────────────────────────────┬──────────────────────────────┐
│ # │ Automation │ Purpose │
├────┼──────────────────────────────┼──────────────────────────────┤
│ 1 │ Data Sync │ Sync shifts ↔ timesheets │
│ 2 │ Billing Cycle Invoices │ Auto-generate billing cycle │
│ 3 │ Payroll Processing │ Payroll from approved TS │
│ 4 │ RTI FPS Submission │ HMRC FPS generation │
│ 5 │ Compliance Expiry │ Expiry reminders & alerts │
│ 6 │ Onboarding Reminders │ Staff onboarding progress │
│ 7 │ Invoice Reminders │ Overdue invoice chasing │
│ 8 │ Reference Chasing │ WhatsApp reference reminders │
│ 9 │ Document Backup │ Google Drive auto-backup │
└────┴──────────────────────────────┴──────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
13. MOBILE / PWA
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✔ Fully responsive (mobile-first for staff portal)
✔ Bottom tab navigation bar for staff / client / admin
✔ PWA manifest + service worker
✔ Pull-to-refresh
✔ iOS safe-area insets
✔ 44px minimum touch targets on mobile
✔ Page transitions (framer-motion)
✔ GPS clock-in/out with geofencing
✔ Session-cached user for instant navigation
● Native iOS/Android build from same codebase (planned)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
14. ARCHITECTURAL DECISIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
14.1 LAYOUT
─────────────────────────────────────────────────────────────────────────
✔ Global 1440px max-width Container component (all pages centered)
✔ Removed redundant page-level max-width wrappers
✔ overflow-x-hidden on root (safety net, no content clipped)
✔ overflow-x-auto on wide tables (local scroll, not global)
✔ Responsive flex-wrap for job cards (centered, not stretched)
14.2 BILLING
─────────────────────────────────────────────────────────────────────────
✔ getBillingCycleRange prioritises ClientProfile-configured start/end days
✔ Invoice generation constrained to formal admin workflows
✔ Per-timesheet auto-invoicing disabled (bulk billing cycle generator only)
✔ Draft → approve → send workflow (no premature billing)
14.3 STAFF INVITATION
─────────────────────────────────────────────────────────────────────────
✔ wa.me deep links for WhatsApp invitations (phone number only)
✔ AddStaffDialog: no mandatory fields (simplified registration)
✔ WhatsApp or Email invites without pre-filled form data
✔ Copy invite message option
14.4 AUTOMATION STRATEGY
─────────────────────────────────────────────────────────────────────────
✔ Archived 32 non-essential automations (retained 9 core workflows)
✔ Manual admin-triggered actions over automatic retries
✔ Billing cycle generator over per-timesheet invoicing
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
15. CURRENT STATUS SUMMARY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┌─────────────────────────────────┬──────────────────────┐
│ Module │ Status │
├─────────────────────────────────┼──────────────────────┤
│ Staff Onboarding │ ✅ Live │
│ Compliance & AI Verification │ ✅ Live │
│ Shift Scheduling (all modes) │ ✅ Live │
│ Timesheet Management │ ✅ Live │
│ Payroll (PAYE + RTI FPS) │ ✅ Live │
│ Client Invoicing │ ✅ Live │
│ AI Staff Matching │ ✅ Live │
│ Contract Management │ ✅ Live │
│ Reference Management │ ✅ Live │
│ Rewards System │ ✅ Live │
│ Transport / Drivers Portal │ ✅ Live │
│ QuickBooks Integration │ ✅ Live │
│ Google Drive Backup │ ✅ Live │
│ WhatsApp Notifications │ ✅ Live │
│ PWA / Mobile │ ✅ Live │
│ Forms & Custom Templates │ ✅ Live │
│ KPI Analytics Dashboard │ ✅ Live │
│ Finance & Accounting │ ✅ Live │
│ Marketing Proposals │ ✅ Live │
│ Global Layout (1440px) │ ✅ Live │
└─────────────────────────────────┴──────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16. ROADMAP & FUTURE ENHANCEMENTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16.1 SHORT-TERM (Q3-Q4 2026)
─────────────────────────────────────────────────────────────────────────
● Native iOS/Android app builds (push notifications)
● Advanced AI scheduling (predictive demand forecasting)
● Staff performance analytics dashboard
● Client satisfaction scoring
● Automated payslip email distribution (scheduled)
● Multi-language support (Polish, Romanian, Tagalog)
16.2 MEDIUM-TERM (2027)
─────────────────────────────────────────────────────────────────────────
● Marketplace for shift bidding (real-time auction)
● Carbon footprint tracking (transport sector)
● Advanced fraud detection (behavioural analysis)
● API for third-party integrations (MCP server)
● White-label portal for partner agencies
● Advanced financial forecasting & scenario planning
16.3 LONG-TERM VISION
─────────────────────────────────────────────────────────────────────────
● Industry-wide compliance registry
● AI-powered career path recommendations
● Predictive staffing shortage alerts (ML models)
● Multi-country expansion (EU healthcare markets)
● Unified workforce management platform (all sectors)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
17. TECHNICAL CONSTRAINTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✔ ESM-only project (Vite, no require/module.exports)
✔ Only installed packages may be used (no new npm packages without approval)
✔ shadcn/ui components from @/components/ui/
● Icons: lucide-react only (must exist)
✔ @/ alias for all imports (never relative src/ paths)
✔ Entity schemas as complete JSON (no comments/placeholders)
✔ Errors bubble up (no try/catch unless user-facing forms)
✔ Backend functions in base44/functions/{name}/entry.ts
● Logic shared by multiple functions goes in base44/shared/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
18. APPENDIX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
18.1 SHIFT TYPES
─────────────────────────────────────────────────────────────────────────
Early (07:00-14:00) · Late (14:00-22:00) · Long Day (07:00-22:00)
Night (22:00-07:00) · Sleep-In (22:00-07:00, sleep-in rate)
18.2 JOB TYPES
─────────────────────────────────────────────────────────────────────────
Nurse · Senior Carer · Carer · Cleaner · Kitchen Assistant
Support Worker · Senior Support Worker
18.3 RATE TYPES
─────────────────────────────────────────────────────────────────────────
Standard · Night · Bank Holiday · Enhanced · Sleep-In
18.4 COMPLIANCE CATEGORIES
─────────────────────────────────────────────────────────────────────────
Universal: DBS, Right to Work, Passport, NMC Registration
Job-Specific: Training certificates, professional body registration
18.5 TRAINING CATEGORIES
─────────────────────────────────────────────────────────────────────────
Category A (Mandatory) · Category B (Role-specific)
Category C (Specialist) · Category D (Optional/CPD)
18.6 PAYMENT METHODS
─────────────────────────────────────────────────────────────────────────
Bank Transfer · Stripe · PayPal · Cash · Cheque · Other
18.7 INVOICE STATUSES
─────────────────────────────────────────────────────────────────────────
Draft → Pending Approval → Sent → Paid
(With: Overdue, Partially Paid, Archived states)
═══════════════════════════════════════════════════════════════════════════════════════
Nursewell Ltd © 2026 | Generated from live codebase | nursewell.co.uk
═══════════════════════════════════════════════════════════════════════════════════════Use Copy or Download to export this PRD. Content reflects the current live platform.
