# ahmedmoosaadnan/dental-care architecture

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

- Interactive diagram: https://gitdiagram.com/ahmedmoosaadnan/dental-care
- Repository: https://github.com/ahmedmoosaadnan/dental-care

## Overview

This is a dental-clinic management app. A clinic user enters through the application shell, authenticates, and then uses routed modules for patient care, scheduling, point-of-sale, and clinic operations; those modules use Firebase-backed data services. The source index supports the route and dependency map, while sampled excerpts confirm authentication/profile handling and media reads and writes. Several page implementations were not excerpted, so their data links reflect indexed references rather than inspected call details.

Main entry points: [`src/App.tsx`](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/App.tsx) (App router), [`src/lib/firebase.ts`](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/lib/firebase.ts) (Firebase setup), [`src/store/useAuthStore.ts`](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/store/useAuthStore.ts) (Auth store), [`src/components/DashboardLayout.tsx`](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/components/DashboardLayout.tsx) (Dashboard shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["App router<br/>[App.tsx]"]
  node_layout["Dashboard shell"]
  node_login["Login<br/>[Login.tsx]"]
  node_register["Registration<br/>[Register.tsx]"]
  node_overview["Overview<br/>[Overview.tsx]"]
end

subgraph group_care["Clinical workflow"]
  node_patients["Patients<br/>[Patients.tsx]"]
  node_appointments["Appointments<br/>[Appointments.tsx]"]
  node_doctors["Doctors<br/>[Doctors.tsx]"]
  node_treatments["Treatments<br/>[Treatments.tsx]"]
  node_followups["Follow-ups<br/>[FollowUps.tsx]"]
end

subgraph group_operations["Clinic operations"]
  node_pos["Point of sale<br/>[POS.tsx]"]
  node_inventory["Inventory<br/>[Inventory.tsx]"]
  node_journal["Journal<br/>[Journal.tsx]"]
  node_reminders["Reminders<br/>[Reminders.tsx]"]
  node_notifications["Notifications<br/>[Notifications.tsx]"]
  node_reports["Reports<br/>[Reports.tsx]"]
  node_settings["Settings<br/>[Settings.tsx]"]
  node_media["Media manager<br/>[MediaManager.tsx]"]
end

subgraph group_platform["Identity and data"]
  node_auth["Auth store<br/>[useAuthStore.ts]"]
  node_firebase["Firebase setup<br/>[firebase.ts]"]
  node_db_helpers["Database helpers<br/>[db.ts]"]
  node_firestore[("Cloud Firestore")]
  node_firebase_auth["Firebase Auth"]
end

node_clinic_user(("Clinic user"))

node_clinic_user -->|"opens"| node_app
node_app -->|"initializes"| node_auth
node_app -->|"renders"| node_layout
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_overview
node_app -->|"routes to"| node_patients
node_app -->|"routes to"| node_appointments
node_app -->|"routes to"| node_doctors
node_app -->|"routes to"| node_treatments
node_app -->|"routes to"| node_followups
node_app -->|"routes to"| node_pos
node_app -->|"routes to"| node_inventory
node_app -->|"routes to"| node_journal
node_app -->|"routes to"| node_reminders
node_app -->|"routes to"| node_notifications
node_app -->|"routes to"| node_reports
node_app -->|"routes to"| node_settings
node_app -->|"routes to"| node_media
node_auth -->|"uses SDK"| node_firebase
node_firebase -->|"configures"| node_firebase_auth
node_auth -->|"reads profiles"| node_firestore
node_auth -->|"observes session"| node_firebase_auth
node_layout -->|"reads state"| node_auth
node_layout -->|"uses SDK"| node_firebase
node_patients -->|"uses data SDK"| node_firebase
node_appointments -->|"uses data SDK"| node_firebase
node_doctors -->|"uses data SDK"| node_firebase
node_treatments -->|"uses data SDK"| node_firebase
node_followups -->|"uses data SDK"| node_firebase
node_pos -->|"uses helpers"| node_db_helpers
node_db_helpers -->|"uses SDK"| node_firebase
node_inventory -->|"uses data SDK"| node_firebase
node_journal -->|"uses data SDK"| node_firebase
node_reminders -->|"uses data SDK"| node_firebase
node_notifications -->|"uses data SDK"| node_firebase
node_settings -->|"uses data SDK"| node_firebase
node_media -->|"reads and writes"| node_firestore
node_firebase -->|"provides client"| node_firestore

click node_app "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/App.tsx"
click node_layout "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/components/DashboardLayout.tsx"
click node_login "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Login.tsx"
click node_register "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Register.tsx"
click node_overview "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Overview.tsx"
click node_patients "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Patients.tsx"
click node_appointments "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Appointments.tsx"
click node_doctors "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Doctors.tsx"
click node_treatments "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Treatments.tsx"
click node_followups "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/FollowUps.tsx"
click node_pos "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/POS.tsx"
click node_inventory "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Inventory.tsx"
click node_journal "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Journal.tsx"
click node_reminders "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Reminders.tsx"
click node_notifications "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Notifications.tsx"
click node_reports "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Reports.tsx"
click node_settings "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Settings.tsx"
click node_media "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/MediaManager.tsx"
click node_auth "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/store/useAuthStore.ts"
click node_firebase "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/lib/firebase.ts"
click node_db_helpers "https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/lib/db.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_layout,node_login,node_register,node_overview,node_clinic_user toneBlue
class node_patients,node_appointments,node_doctors,node_treatments,node_followups toneAmber
class node_pos,node_inventory,node_journal,node_reminders,node_notifications,node_reports,node_settings,node_media toneMint
class node_auth,node_firebase,node_db_helpers,node_firestore,node_firebase_auth toneRose
```

## Components

### App entry

- [App router](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/App.tsx): `src/App.tsx`
- [Dashboard shell](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/components/DashboardLayout.tsx): `src/components/DashboardLayout.tsx`
- [Login](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`
- [Registration](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Register.tsx): `src/pages/Register.tsx`
- [Overview](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Overview.tsx): `src/pages/Overview.tsx`

### Clinical workflow

- [Patients](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Patients.tsx): `src/pages/Patients.tsx`
- [Appointments](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Appointments.tsx): `src/pages/Appointments.tsx`
- [Doctors](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Doctors.tsx): `src/pages/Doctors.tsx`
- [Treatments](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Treatments.tsx): `src/pages/Treatments.tsx`
- [Follow-ups](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/FollowUps.tsx): `src/pages/FollowUps.tsx`

### Clinic operations

- [Point of sale](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/POS.tsx): `src/pages/POS.tsx`
- [Inventory](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Inventory.tsx): `src/pages/Inventory.tsx`
- [Journal](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Journal.tsx): `src/pages/Journal.tsx`
- [Reminders](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Reminders.tsx): `src/pages/Reminders.tsx`
- [Notifications](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Notifications.tsx): `src/pages/Notifications.tsx`
- [Reports](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Reports.tsx): `src/pages/Reports.tsx`
- [Settings](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/Settings.tsx): `src/pages/Settings.tsx`
- [Media manager](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/pages/MediaManager.tsx): `src/pages/MediaManager.tsx`

### Identity and data

- [Auth store](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/store/useAuthStore.ts): `src/store/useAuthStore.ts`
- [Firebase setup](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/lib/firebase.ts): `src/lib/firebase.ts`
- [Database helpers](https://github.com/ahmedmoosaadnan/dental-care/blob/main/src/lib/db.ts): `src/lib/db.ts`
- **Cloud Firestore**
- **Firebase Auth**

### Other components

- **Clinic user**

## Connections

- Clinic user → App router: opens (evidence: `src/App.tsx`)
- App router → Auth store: initializes (evidence: `src/App.tsx`)
- App router → Dashboard shell: renders (evidence: `src/App.tsx`)
- App router → Login: routes to (evidence: `src/App.tsx`)
- App router → Registration: routes to (evidence: `src/App.tsx`)
- App router → Overview: routes to (evidence: `src/App.tsx`)
- App router → Patients: routes to (evidence: `src/App.tsx`)
- App router → Appointments: routes to (evidence: `src/App.tsx`)
- App router → Doctors: routes to (evidence: `src/App.tsx`)
- App router → Treatments: routes to (evidence: `src/App.tsx`)
- App router → Follow-ups: routes to (evidence: `src/App.tsx`)
- App router → Point of sale: routes to (evidence: `src/App.tsx`)
- App router → Inventory: routes to (evidence: `src/App.tsx`)
- App router → Journal: routes to (evidence: `src/App.tsx`)
- App router → Reminders: routes to (evidence: `src/App.tsx`)
- App router → Notifications: routes to (evidence: `src/App.tsx`)
- App router → Reports: routes to (evidence: `src/App.tsx`)
- App router → Settings: routes to (evidence: `src/App.tsx`)
- App router → Media manager: routes to (evidence: `src/App.tsx`)
- Auth store → Firebase setup: uses SDK (evidence: `src/store/useAuthStore.ts`)
- Firebase setup → Firebase Auth: configures (evidence: `src/lib/firebase.ts`)
- Auth store → Cloud Firestore: reads profiles (evidence: `src/store/useAuthStore.ts`)
- Auth store → Firebase Auth: observes session (evidence: `src/store/useAuthStore.ts`)
- Dashboard shell → Auth store: reads state (evidence: `src/components/DashboardLayout.tsx`)
- Dashboard shell → Firebase setup: uses SDK (evidence: `src/components/DashboardLayout.tsx`)
- Patients → Firebase setup: uses data SDK (evidence: `src/pages/Patients.tsx`)
- Appointments → Firebase setup: uses data SDK (evidence: `src/pages/Appointments.tsx`)
- Doctors → Firebase setup: uses data SDK (evidence: `src/pages/Doctors.tsx`)
- Treatments → Firebase setup: uses data SDK (evidence: `src/pages/Treatments.tsx`)
- Follow-ups → Firebase setup: uses data SDK (evidence: `src/pages/FollowUps.tsx`)
- Point of sale → Database helpers: uses helpers (evidence: `src/pages/POS.tsx`)
- Database helpers → Firebase setup: uses SDK (evidence: `src/lib/db.ts`)
- Inventory → Firebase setup: uses data SDK (evidence: `src/pages/Inventory.tsx`)
- Journal → Firebase setup: uses data SDK (evidence: `src/pages/Journal.tsx`)
- Reminders → Firebase setup: uses data SDK (evidence: `src/pages/Reminders.tsx`)
- Notifications → Firebase setup: uses data SDK (evidence: `src/pages/Notifications.tsx`)
- Settings → Firebase setup: uses data SDK (evidence: `src/pages/Settings.tsx`)
- Media manager → Cloud Firestore: reads and writes (evidence: `src/pages/MediaManager.tsx`)
- Firebase setup → Cloud Firestore: provides client (evidence: `src/lib/firebase.ts`)
