home-healthcare-caregivers

byLeon Leek

Build "Utugi", a home healthcare gig marketplace for Kenya. Families post care jobs, verified caregivers accept them, and payment is made after the visit. Build version 1 completely. Do not add features I haven't listed. STACK React + TypeScript frontend (mobile-first, responsive). Node.js + TypeScript backend. PostgreSQL with Prisma and migrations (do NOT use SQLite or libsql). Docker and a Render-ready config. .env.example, README and seed script. English and Kiswahili i18n scaffolding. Currency shown as "KSh 1,500". ROLES Patient/family, Caregiver, Admin (sub-roles: Verifier, Support, Finance, Super admin). One account per phone number, with role profiles on top. Phone number + one-time code sign-in (provider behind an interface, with a dev mock), attempt limits and rate limiting. Seed a Super admin from env vars SUPERADMIN_PHONE and SUPERADMIN_PASSWORD. Never hardcode credentials. CORE FLOW 1. Family posts a job: who it's for, service (Home care assistant, Child care, Nursing visit, Companion), date, time, duration, area, notes. 2. Matching: only caregivers who are Verified, online, in the service area, offering that service and free at that time (no overlap) see the job. Show the approximate area only. First accept wins, enforced by a database row lock; others get "already taken". Requests expire (default 10 minutes, configurable). If the family used "request this caregiver again", offer it to that caregiver first for a short window, then open it to others. If nobody accepts, show a clear "no match" state with options to widen time or area, or cancel. 3. On acceptance the caregiver sees the exact address and access notes. The family sees the caregiver's name, role and badges. 4. Visit: En route, Arrived (with a 4-digit arrival code the family gives the caregiver), In progress, Completed (confirmation step). 5. PAYMENT IS AFTER THE SERVICE. When the visit is done, the family reviews the cost and pays by M-Pesa STK push. Nothing is charged at booking. States: Awaiting payment, Paid, Overdue. Reminders on day 1, 3 and 7. After 7 days the case goes to support and the family's new requests pause. Caregiver earnings stay pending until the family pays. 6. Rating and review, "Book again" and favourites, optional recurring care. PAYMENTS A PaymentProvider interface with a mock implementation and an M-Pesa Daraja sandbox implementation. Idempotency keys on every payment call. Payment confirmed only by the provider webhook, never by the client. Store no card numbers and no PINs. Double-entry ledger: job total, platform fee, commission, caregiver earnings. Withdraw to M-Pesa via a payout interface (mocked). Make commission and fees configurable, not hardcoded. CAREGIVER VERIFICATION Per-item statuses: Not submitted, Under review, Action required, Verified, Expired. Items: ID (photo and selfie), professional licence (nurses), references, certificate of good conduct, M-Pesa payout number. The online switch is locked until ID and licence are Verified. Documents are stored encrypted and served by short-lived signed URLs. Expiry reminders 30 days ahead. ADMIN Overview with a to-do list (pending verifications, overdue payments, no-match jobs, open support or safety cases). Verification desk with approve, request fix and reject using a reason list. Jobs list with filters and an event trail. Payments (awaiting, overdue, reconciliation). Support and safety cases (safety reports first). Audit log that cannot be edited. Role-based access: Verifier sees credentials only; Support sees masked contact details and no health notes; Finance sees payments only; Super admin changes settings, with a second approver for fee changes. PRIVACY AND SAFETY Data minimisation. Health notes are optional, encrypted and hidden from support by default. Opening them requires a typed reason and is logged. Notifications use generic wording. In-app messaging so phone numbers aren't exchanged. Show "In an emergency, call 999 or 112. Utugi is not an emergency service." in the family app. Label all sample data as demo. Never present mock payments, verification or tracking as real. PAGES Patient: Home ("Hello {name}", one request panel with service chips, current job, upcoming, past visits with Try again / Rebook / Request again, my caregivers, emergency help card), Request care, Job page (status, caregiver, messages, pay), Recurring, My caregivers. Caregiver: Home (online switch, next visit, open requests with pay as the biggest number, earnings awaiting payment, verification status), Requests, Visits, Earnings, Verification, Profile. Admin: Overview, Verifications, Jobs, Payments, Support and safety, Audit log, Settings. Public: Join page with choices (I need care, I'm a caregiver), phone sign-in. DESIGN Warm and premium. Ivory background #FFF9EF, cream #F5EBDD, gold #C69A36 (primary actions and active tabs only), deep gold #A87922, dark brown text #292821, taupe #827B70, success green #287D52, error red #B83B36. Serif headings (Fraunces), Inter for body. 14 to 16 px radii, thin sand borders, one gold button per screen, 44 px minimum touch targets, visible focus states, 4.5:1 contrast, works at 200% text size. Logo: a gold house with a cream heart, brown roof, lowercase "utugi" wordmark in dark brown, tagline "All your home healthcare needs under

Join pageHome
Join page

Comments (0)

No comments yet. Be the first!

Project Tasks

53 planning tasks
#1

Generate system requirement document

1m 17s0.05 cr used
Done
#2

Generate personas & user flows

0m 14s0.05 cr used
Done
#5

Architecture

0.05 cr needed
Paused
#6

Workspace task plan

0.05 cr needed
Paused
#7

Create flow for Patient/family

0m 12sCredits in parent
Done
#8

Create flow for Caregiver

0m 11sCredits in parent
Done
#9

Create flow for Verifier

0m 11sCredits in parent
Done
#10

Create flow for Support

0m 11sCredits in parent
Done
#11

Create flow for Finance

0m 11sCredits in parent
Done
#12

Create flow for Super admin

0m 11sCredits in parent
Done
#13

Join page

2m 49sCredits in subtasks
Done
#14

Home

2m 58sCredits in subtasks
Done
#15

Request care

3m 8sCredits in subtasks
Paused
#16

Job page

3m 7sCredits in subtasks
Paused
#17

Recurring

3m 7sCredits in subtasks
Paused
#18

My caregivers

3m 7sCredits in subtasks
Paused
#19

Requests

3m 7sCredits in subtasks
Paused
#20

Visits

3m 7sCredits in subtasks
Paused
#21

Earnings

3m 6sCredits in subtasks
Paused
#22

Verification

3m 6sCredits in subtasks
Paused
#23

Profile

3m 6sCredits in subtasks
Paused
#24

Overview

3m 6sCredits in subtasks
Paused
#25

Verifications

3m 6sCredits in subtasks
Paused
#26

Jobs

3m 6sCredits in subtasks
Paused
#27

Payments

3m 5sCredits in subtasks
Paused
#28

Support and safety

3m 5sCredits in subtasks
Paused
#29

Audit log

3m 5sCredits in subtasks
Paused
#30

Settings

3m 5sCredits in subtasks
Paused
#31

Login

3m 4sCredits in subtasks
Paused
#32

Join page / Join Entry Hero

0m 32s0.85 cr used
Done
#33

Join page / Join Choice Cards

0m 23s0.85 cr used
Done
#34

Join page / Footer

0m 0s0.85 cr used
Done
#35

Footer

0m 18sCredits in parent
Done
#36

Fix Join page: The hero's primary CTA is always taken as a failure because no prop is passed. then sets…

0m 23sCredits unavailable
Done
#37

Fix Join page: The Join page has no continuously repeating motion in normal mode. The hero animations…

0m 46sCredits unavailable
Done
#38

Fix Join page review findings: frontend/src/components/Join Entry Hero.jsx: the hero's… (+1 more)

0m 14s0 cr used
Done
#39

Home / Navigation

0m 0s0.85 cr used
Done
#40

Home / Family Job Panel

0m 46s0.85 cr used
Done
#41

Home / Family Caregivers Strip

0m 36s0.85 cr used
Done
#42

Home / Emergency Card

0m 18s0.85 cr used
Done
#43

Home / Caregiver Availability Panel

0m 46s0.85 cr used
Done
#44

Home / Caregiver Requests Panel

0m 19s0.85 cr used
Done
#45

Home / Caregiver Earnings Panel

0m 43s0.85 cr used
Done
#46

Home / Footer

0m 0s0.85 cr used
Done
#47

Navigation

0m 14sCredits in parent
Done
#48

Request care / Navigation

0.85 cr needed
Paused
#49

Request care / Form

0.85 cr needed
Paused
#50

Request care / Notice

0.85 cr needed
Paused
#51

Request care / Footer

0.85 cr needed
Paused
#52

Job page / Navigation

0.85 cr needed
Paused
#53

Job page / Content

0.85 cr needed
Paused
#54

Job page / Footer

0.85 cr needed
Paused
#55

Generate system requirement document

0.05 cr needed
Backlog
Live
Join page design preview

Join page: Choose I'm a caregiver

Login: Submit phone number

Login: Submit one-time code

Verification: 1. Submit ID and licence

Verification: Submit references and conduct certificate

Verification: Submit M-Pesa payout number

Verification: 2. Resubmit item needing fix

Profile: Edit role profile details

Home: Toggle online switch

Requests: 1. Open eligible request

Requests: 2. Accept request

Requests: 3. Return after already taken

Job page: View exact address and access notes

Job page: Send in-app message

Visits: Advance to En route

Visits: Enter arrival code

Visits: Advance to In progress

Visits: Confirm completion

Earnings: View pending earnings

Earnings: 1. Withdraw to M-Pesa

Earnings: 2. Retry failed payout

Live
Join page design preview

Join page: Choose I'm a caregiver

Login: Submit phone number

Login: Submit one-time code

Verification: 1. Submit ID and licence

Verification: Submit references and conduct certificate

Verification: Submit M-Pesa payout number

Verification: 2. Resubmit item needing fix

Profile: Edit role profile details

Home: Toggle online switch

Requests: 1. Open eligible request

Requests: 2. Accept request

Requests: 3. Return after already taken

Job page: View exact address and access notes

Job page: Send in-app message

Visits: Advance to En route

Visits: Enter arrival code

Visits: Advance to In progress

Visits: Confirm completion

Earnings: View pending earnings

Earnings: 1. Withdraw to M-Pesa

Earnings: 2. Retry failed payout