# briantz79/appointmed architecture

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

- Interactive diagram: https://gitdiagram.com/briantz79/appointmed
- Repository: https://github.com/briantz79/appointmed

## Overview

AppointMed is a role-based clinic appointment-management frontend for receptionists, doctors, patients, and administrators. Users enter through public login or registration, then use role-protected screens for scheduling and managing appointments, patient records, doctor availability and follow-ups, and clinic administration and reports. Screens access backend operations through shared API services and a central HTTP client; the README also notes that simulated data can be used without a backend. Several feature modules are represented by their exact directories because their source was not sampled.

Main entry points: [`src/router.jsx`](https://github.com/briantz79/appointmed/blob/main/src/router.jsx) (Role-based routes), [`src/api/services`](https://github.com/briantz79/appointmed/tree/main/src/api/services) (API services), [`src/App.jsx`](https://github.com/briantz79/appointmed/blob/main/src/App.jsx) (App bootstrap), [`src/pages/reception/AgendaPage.jsx`](https://github.com/briantz79/appointmed/blob/main/src/pages/reception/AgendaPage.jsx) (Reception agenda)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Shell"]
  node_app["App bootstrap<br/>[App.jsx]"]
  node_router["Role-based routes<br/>[router.jsx]"]
  node_services["API services"]
  node_client["HTTP client<br/>[client.js]"]
end

subgraph group_appointments["Scheduling and Care"]
  node_receptionagenda["Reception agenda<br/>[AgendaPage.jsx]"]
  node_newappointment["Create appointment"]
  node_booking["Appointment booking dialog"]
  node_slotpicker["Available-slot picker<br/>[SlotPicker.jsx]"]
  node_pending["Pending appointments"]
  node_doctoragenda["Doctor agenda"]
  node_doctoravailability["Doctor schedule<br/>[SchedulePage.jsx]"]
  node_followups["Follow-up requests<br/>[FollowUpPage.jsx]"]
  node_patientappointments["Patient appointments"]
end

subgraph group_people["People and Access"]
  node_auth["Session and roles<br/>[AuthProvider.jsx]"]
  node_authguard["Role guard<br/>[RequireRole.jsx]"]
  node_patientprofile["Patient profile and history"]
  node_patientrecords["Patient records<br/>[PatientsPage.jsx]"]
  node_publicaccess["Login and registration"]
end

subgraph group_admin["Clinic Administration"]
  node_adminstaff["Staff management<br/>[StaffPage.jsx]"]
  node_specialties["Specialties"]
  node_reports["Reports<br/>[ReportsPage.jsx]"]
end

node_user(("Clinic user"))
node_backend[("Backend API")]

node_user -->|"opens"| node_app
node_app -->|"provides session"| node_auth
node_app -->|"mounts routes"| node_router
node_router -->|"protects panels"| node_authguard
node_router -->|"routes to"| node_receptionagenda
node_router -->|"routes to"| node_newappointment
node_router -->|"routes to"| node_doctoragenda
node_router -->|"routes to"| node_doctoravailability
node_router -->|"routes to"| node_followups
node_router -->|"routes to"| node_patientappointments
node_router -->|"routes to"| node_patientprofile
node_router -->|"routes to"| node_patientrecords
node_router -->|"routes to"| node_publicaccess
node_router -->|"routes to"| node_adminstaff
node_router -->|"routes to"| node_specialties
node_router -->|"routes to"| node_reports
node_receptionagenda -->|"loads agenda data"| node_services
node_receptionagenda -->|"opens details"| node_booking
node_newappointment -->|"offers slots"| node_slotpicker
node_newappointment -->|"submits appointment"| node_services
node_doctoragenda -->|"loads schedule"| node_services
node_patientappointments -->|"loads appointments"| node_services
node_services -->|"uses HTTP client"| node_client
node_client -->|"sends requests"| node_backend

click node_app "https://github.com/briantz79/appointmed/blob/main/src/App.jsx"
click node_router "https://github.com/briantz79/appointmed/blob/main/src/router.jsx"
click node_auth "https://github.com/briantz79/appointmed/blob/main/src/auth/AuthProvider.jsx"
click node_authguard "https://github.com/briantz79/appointmed/blob/main/src/auth/RequireRole.jsx"
click node_receptionagenda "https://github.com/briantz79/appointmed/blob/main/src/pages/reception/AgendaPage.jsx"
click node_newappointment "https://github.com/briantz79/appointmed/blob/main/src/pages/reception/NewAppointmentPage.jsx"
click node_booking "https://github.com/briantz79/appointmed/blob/main/src/components/appointments/AppointmentDialog.jsx"
click node_slotpicker "https://github.com/briantz79/appointmed/blob/main/src/components/agenda/SlotPicker.jsx"
click node_pending "https://github.com/briantz79/appointmed/blob/main/src/components/reception/PendingAppointmentsSection.jsx"
click node_doctoragenda "https://github.com/briantz79/appointmed/blob/main/src/pages/doctor/DoctorAgendaPage.jsx"
click node_doctoravailability "https://github.com/briantz79/appointmed/blob/main/src/pages/doctor/SchedulePage.jsx"
click node_followups "https://github.com/briantz79/appointmed/blob/main/src/pages/doctor/FollowUpPage.jsx"
click node_patientappointments "https://github.com/briantz79/appointmed/blob/main/src/pages/patient/MyAppointmentsPage.jsx"
click node_patientprofile "https://github.com/briantz79/appointmed/tree/main/src/pages/patient"
click node_patientrecords "https://github.com/briantz79/appointmed/blob/main/src/pages/reception/PatientsPage.jsx"
click node_publicaccess "https://github.com/briantz79/appointmed/tree/main/src/pages/public"
click node_adminstaff "https://github.com/briantz79/appointmed/blob/main/src/pages/admin/StaffPage.jsx"
click node_specialties "https://github.com/briantz79/appointmed/blob/main/src/pages/admin/SpecialtiesPage.jsx"
click node_reports "https://github.com/briantz79/appointmed/blob/main/src/pages/admin/ReportsPage.jsx"
click node_services "https://github.com/briantz79/appointmed/tree/main/src/api/services"
click node_client "https://github.com/briantz79/appointmed/blob/main/src/api/client.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_app,node_router,node_services,node_client,node_user toneBlue
class node_receptionagenda,node_newappointment,node_booking,node_slotpicker,node_pending,node_doctoragenda,node_doctoravailability,node_followups,node_patientappointments,node_backend toneAmber
class node_auth,node_authguard,node_patientprofile,node_patientrecords,node_publicaccess toneMint
class node_adminstaff,node_specialties,node_reports toneRose
```

## Components

### Application Shell

- [App bootstrap](https://github.com/briantz79/appointmed/blob/main/src/App.jsx): `src/App.jsx`
- [Role-based routes](https://github.com/briantz79/appointmed/blob/main/src/router.jsx): `src/router.jsx`
- [API services](https://github.com/briantz79/appointmed/tree/main/src/api/services): `src/api/services`
- [HTTP client](https://github.com/briantz79/appointmed/blob/main/src/api/client.js): `src/api/client.js`

### Scheduling and Care

- [Reception agenda](https://github.com/briantz79/appointmed/blob/main/src/pages/reception/AgendaPage.jsx): `src/pages/reception/AgendaPage.jsx`
- [Create appointment](https://github.com/briantz79/appointmed/blob/main/src/pages/reception/NewAppointmentPage.jsx): `src/pages/reception/NewAppointmentPage.jsx`
- [Appointment booking dialog](https://github.com/briantz79/appointmed/blob/main/src/components/appointments/AppointmentDialog.jsx): `src/components/appointments/AppointmentDialog.jsx`
- [Available-slot picker](https://github.com/briantz79/appointmed/blob/main/src/components/agenda/SlotPicker.jsx): `src/components/agenda/SlotPicker.jsx`
- [Pending appointments](https://github.com/briantz79/appointmed/blob/main/src/components/reception/PendingAppointmentsSection.jsx): `src/components/reception/PendingAppointmentsSection.jsx`
- [Doctor agenda](https://github.com/briantz79/appointmed/blob/main/src/pages/doctor/DoctorAgendaPage.jsx): `src/pages/doctor/DoctorAgendaPage.jsx`
- [Doctor schedule](https://github.com/briantz79/appointmed/blob/main/src/pages/doctor/SchedulePage.jsx): `src/pages/doctor/SchedulePage.jsx`
- [Follow-up requests](https://github.com/briantz79/appointmed/blob/main/src/pages/doctor/FollowUpPage.jsx): `src/pages/doctor/FollowUpPage.jsx`
- [Patient appointments](https://github.com/briantz79/appointmed/blob/main/src/pages/patient/MyAppointmentsPage.jsx): `src/pages/patient/MyAppointmentsPage.jsx`

### People and Access

- [Session and roles](https://github.com/briantz79/appointmed/blob/main/src/auth/AuthProvider.jsx): `src/auth/AuthProvider.jsx`
- [Role guard](https://github.com/briantz79/appointmed/blob/main/src/auth/RequireRole.jsx): `src/auth/RequireRole.jsx`
- [Patient profile and history](https://github.com/briantz79/appointmed/tree/main/src/pages/patient): `src/pages/patient`
- [Patient records](https://github.com/briantz79/appointmed/blob/main/src/pages/reception/PatientsPage.jsx): `src/pages/reception/PatientsPage.jsx`
- [Login and registration](https://github.com/briantz79/appointmed/tree/main/src/pages/public): `src/pages/public`

### Clinic Administration

- [Staff management](https://github.com/briantz79/appointmed/blob/main/src/pages/admin/StaffPage.jsx): `src/pages/admin/StaffPage.jsx`
- [Specialties](https://github.com/briantz79/appointmed/blob/main/src/pages/admin/SpecialtiesPage.jsx): `src/pages/admin/SpecialtiesPage.jsx`
- [Reports](https://github.com/briantz79/appointmed/blob/main/src/pages/admin/ReportsPage.jsx): `src/pages/admin/ReportsPage.jsx`

### Other components

- **Clinic user**
- **Backend API**

## Connections

- Clinic user → App bootstrap: opens (evidence: `src/App.jsx`)
- App bootstrap → Session and roles: provides session (evidence: `src/App.jsx`)
- App bootstrap → Role-based routes: mounts routes (evidence: `src/App.jsx`)
- Role-based routes → Role guard: protects panels (evidence: `src/router.jsx`)
- Role-based routes → Reception agenda: routes to (evidence: `src/router.jsx`)
- Role-based routes → Create appointment: routes to (evidence: `src/router.jsx`)
- Role-based routes → Doctor agenda: routes to (evidence: `src/router.jsx`)
- Role-based routes → Doctor schedule: routes to (evidence: `src/router.jsx`)
- Role-based routes → Follow-up requests: routes to (evidence: `src/router.jsx`)
- Role-based routes → Patient appointments: routes to (evidence: `src/router.jsx`)
- Role-based routes → Patient profile and history: routes to (evidence: `src/router.jsx`)
- Role-based routes → Patient records: routes to (evidence: `src/router.jsx`)
- Role-based routes → Login and registration: routes to (evidence: `src/router.jsx`)
- Role-based routes → Staff management: routes to (evidence: `src/router.jsx`)
- Role-based routes → Specialties: routes to (evidence: `src/router.jsx`)
- Role-based routes → Reports: routes to (evidence: `src/router.jsx`)
- Reception agenda → API services: loads agenda data (evidence: `src/pages/reception/AgendaPage.jsx`)
- Reception agenda → Appointment booking dialog: opens details (evidence: `src/pages/reception/AgendaPage.jsx`)
- Create appointment → Available-slot picker: offers slots (evidence: `src/pages/reception/NewAppointmentPage.jsx`)
- Create appointment → API services: submits appointment (evidence: `src/pages/reception/NewAppointmentPage.jsx`)
- Doctor agenda → API services: loads schedule (evidence: `src/pages/doctor/DoctorAgendaPage.jsx`)
- Patient appointments → API services: loads appointments (evidence: `src/pages/patient/MyAppointmentsPage.jsx`)
- API services → HTTP client: uses HTTP client (evidence: `src/api/services/index.js`)
- HTTP client → Backend API: sends requests (evidence: `src/api/client.js`)
