# trantuan12/khoinghiepsangtao architecture

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

- Interactive diagram: https://gitdiagram.com/trantuan12/khoinghiepsangtao
- Repository: https://github.com/trantuan12/khoinghiepsangtao

## Overview

CARE-MATCH connects families seeking at-home elder care with caregivers, with administrators overseeing caregiver review and operations. The main journey is family care needs and caregiver discovery, matching and booking, followed by schedule coordination, care completion, and payment; caregiver verification and ADL-based personalization support that journey. The UI is centered in `src/App.tsx`, with focused portal and payment components, while `server/server.js` exposes the REST API and MySQL-backed operations. README-documented capabilities are represented where their specific implementation was not sampled; those links are omitted when wiring cannot be confirmed.

Main entry points: [`src/App.tsx`](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx) (Application), [`server/server.js`](https://github.com/trantuan12/khoinghiepsangtao/blob/main/server/server.js) (REST API), [`src/components/payments/FamilyPaymentsView.tsx`](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/payments/FamilyPaymentsView.tsx) (Family payments), [`src/components/payments/AdminPaymentsView.tsx`](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/payments/AdminPaymentsView.tsx) (Admin payments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Care experience"]
  node_app["Application<br/>[App.tsx]"]
  node_family_profile["Family profile"]
  node_caregiver_portal["Caregiver portal"]
  node_matching["Caregiver matching<br/>[App.tsx]"]
  node_adl["ADL assessment<br/>[App.tsx]"]
  node_community["Community<br/>[CommunityView.tsx]"]
  node_community_admin["Community management"]
end

subgraph group_operations["Care operations"]
  node_verification["Caregiver verification<br/>[App.tsx]"]
  node_scheduling["Care schedules<br/>[App.tsx]"]
  node_rating["Caregiver rating"]
  node_family_payments["Family payments"]
  node_caregiver_payments["Caregiver payments"]
  node_admin_payments["Admin payments"]
  node_premium["Premium membership"]
end

subgraph group_platform["Application platform"]
  node_api["REST API<br/>[server.js]"]
  node_store["Reactive store<br/>[store.ts]"]
  node_mysql[("MySQL database")]
  node_browser_storage[("Browser local storage")]
end

node_family(("Family"))
node_caregiver(("Caregiver"))
node_admin(("Administrator"))

node_family -->|"uses"| node_app
node_caregiver -->|"uses"| node_app
node_admin -->|"uses"| node_app
node_app -->|"opens"| node_family_profile
node_app -->|"presents"| node_matching
node_app -->|"supports"| node_adl
node_app -->|"administers"| node_verification
node_app -->|"coordinates"| node_scheduling
node_app -->|"opens"| node_rating
node_app -->|"presents"| node_community
node_app -->|"presents"| node_community_admin
node_app -->|"presents"| node_family_payments
node_app -->|"presents"| node_caregiver_payments
node_app -->|"presents"| node_admin_payments
node_app -->|"opens"| node_premium
node_caregiver_portal -->|"requests data"| node_api
node_family_payments -->|"requests data"| node_api
node_admin_payments -->|"requests data"| node_api
node_api -->|"reads and writes"| node_mysql
node_store -->|"persists state"| node_browser_storage

click node_app "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx"
click node_family_profile "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/FamilyProfileModal.tsx"
click node_caregiver_portal "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/CaregiverPortal.tsx"
click node_matching "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx"
click node_adl "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx"
click node_community "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/CommunityView.tsx"
click node_community_admin "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/CommunityManagementView.tsx"
click node_verification "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx"
click node_scheduling "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx"
click node_rating "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/CaregiverRatingModal.tsx"
click node_family_payments "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/payments/FamilyPaymentsView.tsx"
click node_caregiver_payments "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/payments/CaregiverPaymentsView.tsx"
click node_admin_payments "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/payments/AdminPaymentsView.tsx"
click node_premium "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/FamilyPremiumModal.tsx"
click node_api "https://github.com/trantuan12/khoinghiepsangtao/blob/main/server/server.js"
click node_store "https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/lib/store.ts"

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_app,node_family_profile,node_caregiver_portal,node_matching,node_adl,node_community,node_community_admin toneBlue
class node_verification,node_scheduling,node_rating,node_family_payments,node_caregiver_payments,node_admin_payments,node_premium toneAmber
class node_api,node_store,node_mysql,node_browser_storage toneMint
class node_family,node_caregiver,node_admin toneIndigo
```

## Components

### Care experience

- [Application](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx): `src/App.tsx`
- [Family profile](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/FamilyProfileModal.tsx): `src/components/FamilyProfileModal.tsx`
- [Caregiver portal](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/CaregiverPortal.tsx): `src/components/CaregiverPortal.tsx`
- [Caregiver matching](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx): `src/App.tsx`
- [ADL assessment](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx): `src/App.tsx`
- [Community](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/CommunityView.tsx): `src/components/CommunityView.tsx`
- [Community management](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/CommunityManagementView.tsx): `src/components/CommunityManagementView.tsx`

### Care operations

- [Caregiver verification](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx): `src/App.tsx`
- [Care schedules](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/App.tsx): `src/App.tsx`
- [Caregiver rating](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/CaregiverRatingModal.tsx): `src/components/CaregiverRatingModal.tsx`
- [Family payments](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/payments/FamilyPaymentsView.tsx): `src/components/payments/FamilyPaymentsView.tsx`
- [Caregiver payments](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/payments/CaregiverPaymentsView.tsx): `src/components/payments/CaregiverPaymentsView.tsx`
- [Admin payments](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/payments/AdminPaymentsView.tsx): `src/components/payments/AdminPaymentsView.tsx`
- [Premium membership](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/components/FamilyPremiumModal.tsx): `src/components/FamilyPremiumModal.tsx`

### Application platform

- [REST API](https://github.com/trantuan12/khoinghiepsangtao/blob/main/server/server.js): `server/server.js`
- [Reactive store](https://github.com/trantuan12/khoinghiepsangtao/blob/main/src/lib/store.ts): `src/lib/store.ts`
- **MySQL database**
- **Browser local storage**

### Other components

- **Family**
- **Caregiver**
- **Administrator**

## Connections

- Family → Application: uses
- Caregiver → Application: uses
- Administrator → Application: uses
- Application → Family profile: opens
- Application → Caregiver matching: presents
- Application → ADL assessment: supports
- Application → Caregiver verification: administers
- Application → Care schedules: coordinates
- Application → Caregiver rating: opens
- Application → Community: presents
- Application → Community management: presents
- Application → Family payments: presents
- Application → Caregiver payments: presents
- Application → Admin payments: presents
- Application → Premium membership: opens
- Caregiver portal → REST API: requests data
- Family payments → REST API: requests data
- Admin payments → REST API: requests data
- REST API → MySQL database: reads and writes
- Reactive store → Browser local storage: persists state
