# fusuneosu/mycareprototype architecture

> Architecture diagram of the GitHub repository fusuneosu/mycareprototype, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fusuneosu/mycareprototype
- Repository: https://github.com/fusuneosu/mycareprototype

## Overview

MyCare is a care-management prototype with separate coordinator and caregiver applications, booking and caregiver workflows, payment endpoints, and a WhatsApp service. The principal workflow spans caregiver applications, coordinator review, confirmed jobs, and booking completion. Sampled code confirms caregiver-side reads and updates through shared stores and payment-webhook updates; the README is empty, and several page and endpoint integrations are unsampled, so uncertain wiring is omitted.

Main entry points: [`caregiverPage/src/App.jsx`](https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/App.jsx) (Caregiver app), [`adminPage/src/App.jsx`](https://github.com/fusuneosu/mycareprototype/blob/main/adminPage/src/App.jsx) (Admin router), [`functions/api/payments/webhook.js`](https://github.com/fusuneosu/mycareprototype/blob/main/functions/api/payments/webhook.js) (Payment webhook), [`shared/bookingStore.js`](https://github.com/fusuneosu/mycareprototype/blob/main/shared/bookingStore.js) (Booking store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Coordinator app"]
  node_admin_app["Admin router<br/>[App.jsx]"]
  node_caregiver_management["Caregiver management<br/>[CaregiversPage.jsx]"]
  node_caregiver_review["Application review"]
  node_booking_records["Booking records"]
  node_admin_bookings_api["Bookings API<br/>[bookings.js]"]
end

subgraph group_caregiver["Caregiver app"]
  node_caregiver_app["Caregiver app<br/>[App.jsx]"]
  node_application_form["Application form<br/>[ApplyPage.jsx]"]
  node_application_status["Application status"]
  node_caregiver_jobs["Jobs and reports<br/>[JobsPage.jsx]"]
  node_job_detail["Job details<br/>[JobDetailPage.jsx]"]
end

subgraph group_shared["Shared workflows"]
  node_booking_store[("Booking store<br/>[bookingStore.js]")]
  node_caregiver_store[("Caregiver store<br/>[caregiverStore.js]")]
end

subgraph group_payments["Payments"]
  node_checkout_api["Create checkout<br/>[create-checkout.js]"]
  node_payment_webhook["Payment webhook<br/>[webhook.js]"]
  node_booking_pay_api["Booking payment links<br/>[pay-link.js]"]
end

subgraph group_messaging["WhatsApp service"]
  node_whatsapp_service["WhatsApp gateway<br/>[index.js]"]
end

node_coordinator(("Coordinator"))
node_caregiver_user(("Caregiver"))
node_stripe["Stripe"]
node_whatsapp_user(("WhatsApp user"))

node_coordinator -->|"uses"| node_admin_app
node_admin_app -->|"routes to"| node_caregiver_management
node_admin_app -->|"routes to"| node_booking_records
node_caregiver_user -->|"uses"| node_caregiver_app
node_caregiver_app -->|"renders"| node_application_form
node_caregiver_app -->|"renders"| node_application_status
node_caregiver_app -->|"renders"| node_caregiver_jobs
node_caregiver_app -->|"renders"| node_job_detail
node_caregiver_app -->|"reads and updates"| node_booking_store
node_caregiver_app -->|"reads"| node_caregiver_store
node_caregiver_review -->|"reads review data"| node_caregiver_store
node_admin_bookings_api --> node_booking_store
node_booking_pay_api -.-> node_stripe
node_checkout_api -->|"creates checkout"| node_stripe
node_stripe -->|"sends events"| node_payment_webhook
node_payment_webhook -->|"fetches receipt"| node_stripe
node_payment_webhook -->|"updates booking"| node_booking_store
node_whatsapp_user -->|"sends messages"| node_whatsapp_service
node_whatsapp_service -->|"replies"| node_whatsapp_user

click node_admin_app "https://github.com/fusuneosu/mycareprototype/blob/main/adminPage/src/App.jsx"
click node_caregiver_management "https://github.com/fusuneosu/mycareprototype/blob/main/adminPage/src/pages/Caregivers/CaregiversPage.jsx"
click node_caregiver_review "https://github.com/fusuneosu/mycareprototype/blob/main/adminPage/src/components/caregivers/CaregiverReviewModal/CaregiverReviewModal.jsx"
click node_booking_records "https://github.com/fusuneosu/mycareprototype/blob/main/adminPage/src/pages/BookingRecords/BookingRecordsPage.jsx"
click node_admin_bookings_api "https://github.com/fusuneosu/mycareprototype/blob/main/functions/api/bookings.js"
click node_caregiver_app "https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/App.jsx"
click node_application_form "https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/pages/Apply/ApplyPage.jsx"
click node_application_status "https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/pages/ApplicationStatus/ApplicationStatusPage.jsx"
click node_caregiver_jobs "https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/pages/Jobs/JobsPage.jsx"
click node_job_detail "https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/pages/JobDetail/JobDetailPage.jsx"
click node_booking_store "https://github.com/fusuneosu/mycareprototype/blob/main/shared/bookingStore.js"
click node_caregiver_store "https://github.com/fusuneosu/mycareprototype/blob/main/shared/caregiverStore.js"
click node_checkout_api "https://github.com/fusuneosu/mycareprototype/blob/main/functions/api/payments/create-checkout.js"
click node_payment_webhook "https://github.com/fusuneosu/mycareprototype/blob/main/functions/api/payments/webhook.js"
click node_booking_pay_api "https://github.com/fusuneosu/mycareprototype/blob/main/functions/api/bookings/%5Bid%5D/pay-link.js"
click node_whatsapp_service "https://github.com/fusuneosu/mycareprototype/blob/main/whatsapp-service/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_admin_app,node_caregiver_management,node_caregiver_review,node_booking_records,node_admin_bookings_api,node_whatsapp_user toneBlue
class node_caregiver_app,node_application_form,node_application_status,node_caregiver_jobs,node_job_detail toneAmber
class node_booking_store,node_caregiver_store toneMint
class node_checkout_api,node_payment_webhook,node_booking_pay_api toneRose
class node_whatsapp_service,node_coordinator,node_caregiver_user,node_stripe toneIndigo
```

## Components

### Coordinator app

- [Admin router](https://github.com/fusuneosu/mycareprototype/blob/main/adminPage/src/App.jsx): `adminPage/src/App.jsx`
- [Caregiver management](https://github.com/fusuneosu/mycareprototype/blob/main/adminPage/src/pages/Caregivers/CaregiversPage.jsx): `adminPage/src/pages/Caregivers/CaregiversPage.jsx`
- [Application review](https://github.com/fusuneosu/mycareprototype/blob/main/adminPage/src/components/caregivers/CaregiverReviewModal/CaregiverReviewModal.jsx): `adminPage/src/components/caregivers/CaregiverReviewModal/CaregiverReviewModal.jsx`
- [Booking records](https://github.com/fusuneosu/mycareprototype/blob/main/adminPage/src/pages/BookingRecords/BookingRecordsPage.jsx): `adminPage/src/pages/BookingRecords/BookingRecordsPage.jsx`
- [Bookings API](https://github.com/fusuneosu/mycareprototype/blob/main/functions/api/bookings.js): `functions/api/bookings.js`

### Caregiver app

- [Caregiver app](https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/App.jsx): `caregiverPage/src/App.jsx`
- [Application form](https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/pages/Apply/ApplyPage.jsx): `caregiverPage/src/pages/Apply/ApplyPage.jsx`
- [Application status](https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/pages/ApplicationStatus/ApplicationStatusPage.jsx): `caregiverPage/src/pages/ApplicationStatus/ApplicationStatusPage.jsx`
- [Jobs and reports](https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/pages/Jobs/JobsPage.jsx): `caregiverPage/src/pages/Jobs/JobsPage.jsx`
- [Job details](https://github.com/fusuneosu/mycareprototype/blob/main/caregiverPage/src/pages/JobDetail/JobDetailPage.jsx): `caregiverPage/src/pages/JobDetail/JobDetailPage.jsx`

### Shared workflows

- [Booking store](https://github.com/fusuneosu/mycareprototype/blob/main/shared/bookingStore.js): `shared/bookingStore.js`
- [Caregiver store](https://github.com/fusuneosu/mycareprototype/blob/main/shared/caregiverStore.js): `shared/caregiverStore.js`

### Payments

- [Create checkout](https://github.com/fusuneosu/mycareprototype/blob/main/functions/api/payments/create-checkout.js): `functions/api/payments/create-checkout.js`
- [Payment webhook](https://github.com/fusuneosu/mycareprototype/blob/main/functions/api/payments/webhook.js): `functions/api/payments/webhook.js`
- [Booking payment links](https://github.com/fusuneosu/mycareprototype/blob/main/functions/api/bookings/%5Bid%5D/pay-link.js): `functions/api/bookings/[id]/pay-link.js`

### WhatsApp service

- [WhatsApp gateway](https://github.com/fusuneosu/mycareprototype/blob/main/whatsapp-service/index.js): `whatsapp-service/index.js`

### Other components

- **Coordinator**
- **Caregiver**
- **Stripe**
- **WhatsApp user**

## Connections

- Coordinator → Admin router: uses
- Admin router → Caregiver management: routes to
- Admin router → Booking records: routes to
- Caregiver → Caregiver app: uses
- Caregiver app → Application form: renders
- Caregiver app → Application status: renders
- Caregiver app → Jobs and reports: renders
- Caregiver app → Job details: renders
- Caregiver app → Booking store: reads and updates
- Caregiver app → Caregiver store: reads
- Application review → Caregiver store: reads review data
- Bookings API → Booking store
- Booking payment links → Stripe
- Create checkout → Stripe: creates checkout
- Stripe → Payment webhook: sends events
- Payment webhook → Stripe: fetches receipt
- Payment webhook → Booking store: updates booking
- WhatsApp user → WhatsApp gateway: sends messages
- WhatsApp gateway → WhatsApp user: replies
