# adlmks/qtime architecture

> Architecture diagram of the GitHub repository adlmks/qtime, 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/adlmks/qtime
- Repository: https://github.com/adlmks/qtime

## Overview

QTime is a patient intake and appointment-management web application. The main patient journey starts at the home page, proceeds through patient registration, and then reaches appointment booking and its success page. Administrators have a separate dashboard for reviewing and managing appointment status; appointment actions also support SMS notifications. The graph reflects the sampled registration and action code; several route and form implementations were not sampled, so uncertain caller-to-action links are omitted.

Main entry points: [`components/forms/RegisterForm.tsx`](https://github.com/adlmks/qtime/blob/main/components/forms/RegisterForm.tsx) (Registration form), [`lib/actions/appointment.actions.ts`](https://github.com/adlmks/qtime/blob/main/lib/actions/appointment.actions.ts) (Appointment actions), [`app/page.tsx`](https://github.com/adlmks/qtime/blob/main/app/page.tsx) (Home page), [`app/patients/[userId]/new-appointment/page.tsx`](https://github.com/adlmks/qtime/blob/main/app/patients/%5BuserId%5D/new-appointment/page.tsx) (Booking page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_patient["Patient intake"]
  node_home["Home page<br/>[page.tsx]"]
  node_patientform["Patient form<br/>[PatientForm.tsx]"]
  node_registerpage["Registration page<br/>[page.tsx]"]
  node_registerform["Registration form<br/>[RegisterForm.tsx]"]
end

subgraph group_appointments["Appointments"]
  node_appointmentpage["Booking page<br/>[page.tsx]"]
  node_appointmentform["Appointment form"]
  node_success["Booking success<br/>[page.tsx]"]
  node_appointmentactions["Appointment actions"]
end

subgraph group_admin["Administration"]
  node_adminpage["Admin dashboard<br/>[page.tsx]"]
  node_datatable["Appointment table<br/>[DataTable.tsx]"]
end

subgraph group_services["Services and validation"]
  node_patientactions["Patient actions<br/>[patient.actions.ts]"]
  node_validation["Form validation<br/>[validation.ts]"]
end

node_visitor(("Patient"))
node_appwrite[("Appwrite")]
node_sms["SMS messaging"]

node_visitor -->|"opens"| node_home
node_home -->|"renders"| node_patientform
node_registerpage -->|"renders"| node_registerform
node_registerform -->|"registers patient"| node_patientactions
node_registerform -->|"navigates"| node_appointmentpage
node_appointmentpage -->|"renders"| node_appointmentform
node_appointmentactions -->|"reads and writes"| node_appwrite
node_appointmentactions -->|"sends notification"| node_sms
node_appointmentactions -->|"revalidates"| node_adminpage
node_adminpage -->|"renders"| node_datatable
node_registerform -->|"validates with"| node_validation
node_appointmentform -->|"validates with"| node_validation

click node_home "https://github.com/adlmks/qtime/blob/main/app/page.tsx"
click node_patientform "https://github.com/adlmks/qtime/blob/main/components/forms/PatientForm.tsx"
click node_registerpage "https://github.com/adlmks/qtime/blob/main/app/patients/%5BuserId%5D/register/page.tsx"
click node_registerform "https://github.com/adlmks/qtime/blob/main/components/forms/RegisterForm.tsx"
click node_patientactions "https://github.com/adlmks/qtime/blob/main/lib/actions/patient.actions.ts"
click node_appointmentpage "https://github.com/adlmks/qtime/blob/main/app/patients/%5BuserId%5D/new-appointment/page.tsx"
click node_appointmentform "https://github.com/adlmks/qtime/blob/main/components/forms/AppointmentForm.tsx"
click node_success "https://github.com/adlmks/qtime/blob/main/app/patients/%5BuserId%5D/new-appointment/success/page.tsx"
click node_appointmentactions "https://github.com/adlmks/qtime/blob/main/lib/actions/appointment.actions.ts"
click node_adminpage "https://github.com/adlmks/qtime/blob/main/app/admin/page.tsx"
click node_datatable "https://github.com/adlmks/qtime/blob/main/components/table/DataTable.tsx"
click node_validation "https://github.com/adlmks/qtime/blob/main/lib/validation.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_home,node_patientform,node_registerpage,node_registerform toneBlue
class node_appointmentpage,node_appointmentform,node_success,node_appointmentactions,node_appwrite toneAmber
class node_adminpage,node_datatable toneMint
class node_patientactions,node_validation toneRose
class node_visitor,node_sms toneIndigo
```

## Components

### Patient intake

- [Home page](https://github.com/adlmks/qtime/blob/main/app/page.tsx): `app/page.tsx`
- [Patient form](https://github.com/adlmks/qtime/blob/main/components/forms/PatientForm.tsx): `components/forms/PatientForm.tsx`
- [Registration page](https://github.com/adlmks/qtime/blob/main/app/patients/%5BuserId%5D/register/page.tsx): `app/patients/[userId]/register/page.tsx`
- [Registration form](https://github.com/adlmks/qtime/blob/main/components/forms/RegisterForm.tsx): `components/forms/RegisterForm.tsx`

### Appointments

- [Booking page](https://github.com/adlmks/qtime/blob/main/app/patients/%5BuserId%5D/new-appointment/page.tsx): `app/patients/[userId]/new-appointment/page.tsx`
- [Appointment form](https://github.com/adlmks/qtime/blob/main/components/forms/AppointmentForm.tsx): `components/forms/AppointmentForm.tsx`
- [Booking success](https://github.com/adlmks/qtime/blob/main/app/patients/%5BuserId%5D/new-appointment/success/page.tsx): `app/patients/[userId]/new-appointment/success/page.tsx`
- [Appointment actions](https://github.com/adlmks/qtime/blob/main/lib/actions/appointment.actions.ts): `lib/actions/appointment.actions.ts`

### Administration

- [Admin dashboard](https://github.com/adlmks/qtime/blob/main/app/admin/page.tsx): `app/admin/page.tsx`
- [Appointment table](https://github.com/adlmks/qtime/blob/main/components/table/DataTable.tsx): `components/table/DataTable.tsx`

### Services and validation

- [Patient actions](https://github.com/adlmks/qtime/blob/main/lib/actions/patient.actions.ts): `lib/actions/patient.actions.ts`
- [Form validation](https://github.com/adlmks/qtime/blob/main/lib/validation.ts): `lib/validation.ts`

### Other components

- **Patient**
- **Appwrite**
- **SMS messaging**

## Connections

- Patient → Home page: opens
- Home page → Patient form: renders
- Registration page → Registration form: renders
- Registration form → Patient actions: registers patient
- Registration form → Booking page: navigates
- Booking page → Appointment form: renders
- Appointment actions → Appwrite: reads and writes
- Appointment actions → SMS messaging: sends notification
- Appointment actions → Admin dashboard: revalidates
- Admin dashboard → Appointment table: renders
- Registration form → Form validation: validates with
- Appointment form → Form validation: validates with
