# saikz72/appointment-scheduling architecture

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

## Overview

Appointment-Scheduling is a web application for automotive-service businesses: customers and staff use the frontend to manage accounts, vehicles, service offerings, appointments, and related orders; admins and technicians have role-specific dashboards. The backend exposes API routes and connects to MongoDB. A separate mobile directory contains a generic Expo navigation shell, not a demonstrated appointment workflow. Several domain modules are represented by their exact enclosing directories because their source was not sampled; links to those modules are limited to documented or directly evidenced wiring.

Main entry points: [`backend/src/models`](https://github.com/saikz72/appointment-scheduling/tree/master/backend/src/models) (Domain models), [`frontend/src/App.tsx`](https://github.com/saikz72/appointment-scheduling/blob/master/frontend/src/App.tsx) (Web app), [`backend/src/index.ts`](https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/index.ts) (Express API), [`frontend/src/services`](https://github.com/saikz72/appointment-scheduling/tree/master/frontend/src/services) (Domain API clients)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web client"]
  node_webapp["Web app<br/>[App.tsx]"]
  node_booking["Appointment booking"]
  node_dashboards["Role dashboards"]
  node_authui["Account services<br/>[AuthService.ts]"]
  node_clientservices["Domain API clients"]
  node_clientstate["Client state<br/>[DataProvider.tsx]"]
end

subgraph group_api["Backend API"]
  node_apiapp["Express API<br/>[index.ts]"]
  node_routes["API routes"]
  node_authcontroller["Account controller<br/>[authController.ts]"]
  node_appointmentcontroller["Appointment controller"]
  node_ordercontroller["Orders controller<br/>[OrderController.ts]"]
  node_servicecontroller["Service controller"]
end

subgraph group_domain["Service domains"]
  node_authservice["Account service<br/>[authService.ts]"]
  node_appointments["Appointment operations"]
  node_orders["Orders and products<br/>[OrderService.ts]"]
  node_services["Business and offerings"]
  node_automobiles["Automobile operations"]
  node_models["Domain models"]
end

subgraph group_mobile["Mobile shell"]
  node_mobileapp["Expo app shell<br/>[App.tsx]"]
  node_navigation["Mobile navigation<br/>[index.tsx]"]
  node_mobilescreens["Placeholder screens"]
end

node_customer(("Customer / staff"))
node_mongodb[("MongoDB")]

node_customer -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_booking
node_webapp -->|"routes to"| node_dashboards
node_booking -->|"uses API clients"| node_clientservices
node_dashboards -->|"uses API clients"| node_clientservices
node_clientservices -->|"sends requests"| node_apiapp
node_apiapp -->|"dispatches"| node_routes
node_apiapp -->|"connects"| node_mongodb
node_routes -->|"dispatches"| node_servicecontroller
node_authcontroller -->|"calls"| node_authservice
node_appointmentcontroller -->|"calls"| node_appointments
node_ordercontroller -->|"calls"| node_orders
node_servicecontroller -->|"calls"| node_services
node_authservice -->|"reads and writes"| node_models
node_appointments -->|"uses records"| node_models
node_orders -->|"uses records"| node_models
node_services -->|"uses records"| node_models
node_automobiles -->|"uses records"| node_models
node_mobileapp -->|"renders"| node_navigation
node_navigation -->|"navigates to"| node_mobilescreens

click node_webapp "https://github.com/saikz72/appointment-scheduling/blob/master/frontend/src/App.tsx"
click node_booking "https://github.com/saikz72/appointment-scheduling/blob/master/frontend/src/pages/BookAppointmentPage.tsx"
click node_dashboards "https://github.com/saikz72/appointment-scheduling/tree/master/frontend/src/pages"
click node_authui "https://github.com/saikz72/appointment-scheduling/blob/master/frontend/src/services/AuthService.ts"
click node_clientservices "https://github.com/saikz72/appointment-scheduling/tree/master/frontend/src/services"
click node_clientstate "https://github.com/saikz72/appointment-scheduling/blob/master/frontend/src/utility/DataProvider.tsx"
click node_apiapp "https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/index.ts"
click node_routes "https://github.com/saikz72/appointment-scheduling/tree/master/backend/src/routes"
click node_authcontroller "https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/controllers/authController.ts"
click node_appointmentcontroller "https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/controllers/AppointmentController.ts"
click node_ordercontroller "https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/controllers/OrderController.ts"
click node_servicecontroller "https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/controllers/ServiceController.ts"
click node_authservice "https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/services/authService.ts"
click node_appointments "https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/services/AppointmentService.ts"
click node_orders "https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/services/OrderService.ts"
click node_services "https://github.com/saikz72/appointment-scheduling/tree/master/backend/src/services"
click node_automobiles "https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/services/AutomobileServices.ts"
click node_models "https://github.com/saikz72/appointment-scheduling/tree/master/backend/src/models"
click node_mobileapp "https://github.com/saikz72/appointment-scheduling/blob/master/mobile/App.tsx"
click node_navigation "https://github.com/saikz72/appointment-scheduling/blob/master/mobile/navigation/index.tsx"
click node_mobilescreens "https://github.com/saikz72/appointment-scheduling/tree/master/mobile/screens"

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_webapp,node_booking,node_dashboards,node_authui,node_clientservices,node_clientstate toneBlue
class node_apiapp,node_routes,node_authcontroller,node_appointmentcontroller,node_ordercontroller,node_servicecontroller,node_mongodb toneAmber
class node_authservice,node_appointments,node_orders,node_services,node_automobiles,node_models toneMint
class node_mobileapp,node_navigation,node_mobilescreens toneRose
class node_customer toneIndigo
```

## Components

### Web client

- [Web app](https://github.com/saikz72/appointment-scheduling/blob/master/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Appointment booking](https://github.com/saikz72/appointment-scheduling/blob/master/frontend/src/pages/BookAppointmentPage.tsx): `frontend/src/pages/BookAppointmentPage.tsx`
- [Role dashboards](https://github.com/saikz72/appointment-scheduling/tree/master/frontend/src/pages): `frontend/src/pages`
- [Account services](https://github.com/saikz72/appointment-scheduling/blob/master/frontend/src/services/AuthService.ts): `frontend/src/services/AuthService.ts`
- [Domain API clients](https://github.com/saikz72/appointment-scheduling/tree/master/frontend/src/services): `frontend/src/services`
- [Client state](https://github.com/saikz72/appointment-scheduling/blob/master/frontend/src/utility/DataProvider.tsx): `frontend/src/utility/DataProvider.tsx`

### Backend API

- [Express API](https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/index.ts): `backend/src/index.ts`
- [API routes](https://github.com/saikz72/appointment-scheduling/tree/master/backend/src/routes): `backend/src/routes`
- [Account controller](https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/controllers/authController.ts): `backend/src/controllers/authController.ts`
- [Appointment controller](https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/controllers/AppointmentController.ts): `backend/src/controllers/AppointmentController.ts`
- [Orders controller](https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/controllers/OrderController.ts): `backend/src/controllers/OrderController.ts`
- [Service controller](https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/controllers/ServiceController.ts): `backend/src/controllers/ServiceController.ts`

### Service domains

- [Account service](https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/services/authService.ts): `backend/src/services/authService.ts`
- [Appointment operations](https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/services/AppointmentService.ts): `backend/src/services/AppointmentService.ts`
- [Orders and products](https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/services/OrderService.ts): `backend/src/services/OrderService.ts`
- [Business and offerings](https://github.com/saikz72/appointment-scheduling/tree/master/backend/src/services): `backend/src/services`
- [Automobile operations](https://github.com/saikz72/appointment-scheduling/blob/master/backend/src/services/AutomobileServices.ts): `backend/src/services/AutomobileServices.ts`
- [Domain models](https://github.com/saikz72/appointment-scheduling/tree/master/backend/src/models): `backend/src/models`

### Mobile shell

- [Expo app shell](https://github.com/saikz72/appointment-scheduling/blob/master/mobile/App.tsx): `mobile/App.tsx`
- [Mobile navigation](https://github.com/saikz72/appointment-scheduling/blob/master/mobile/navigation/index.tsx): `mobile/navigation/index.tsx`
- [Placeholder screens](https://github.com/saikz72/appointment-scheduling/tree/master/mobile/screens): `mobile/screens`

### Other components

- **Customer / staff**
- **MongoDB**

## Connections

- Customer / staff → Web app: uses
- Web app → Appointment booking: routes to
- Web app → Role dashboards: routes to
- Appointment booking → Domain API clients: uses API clients
- Role dashboards → Domain API clients: uses API clients
- Domain API clients → Express API: sends requests
- Express API → API routes: dispatches
- Express API → MongoDB: connects
- API routes → Service controller: dispatches
- Account controller → Account service: calls
- Appointment controller → Appointment operations: calls
- Orders controller → Orders and products: calls
- Service controller → Business and offerings: calls
- Account service → Domain models: reads and writes
- Appointment operations → Domain models: uses records
- Orders and products → Domain models: uses records
- Business and offerings → Domain models: uses records
- Automobile operations → Domain models: uses records
- Expo app shell → Mobile navigation: renders
- Mobile navigation → Placeholder screens: navigates to
