# anilkumar10-hub/smart-queue-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/anilkumar10-hub/smart-queue-management-system
- Repository: https://github.com/anilkumar10-hub/smart-queue-management-system

## Overview

SmartQueue is a hospital appointment and patient-queue management API. Its principal workflow is appointment booking, followed by patient check-in and queue-token handling; separate administrative workflows manage patients, doctors, departments, and hospitals. The graph reflects the sampled service logic and controller references in the SOURCE INDEX. Several controller and service implementations were not sampled, so their links are marked unverified rather than inferred as confirmed calls.

Main entry points: [`src/main/java/com/codewithme/smartqueue/repository`](https://github.com/anilkumar10-hub/smart-queue-management-system/tree/main/src/main/java/com/codewithme/smartqueue/repository) (JPA repositories), [`src/main/java/com/codewithme/smartqueue/service/AppointmentService.java`](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/AppointmentService.java) (Appointment booking), [`src/main/java/com/codewithme/smartqueue/service/QueueTokenService.java`](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/QueueTokenService.java) (Check-in and queue), [`src/main/java/com/codewithme/smartqueue/service/DepartmentService.java`](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/DepartmentService.java) (Department management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API endpoints"]
  node_appointment_api["Appointments API"]
  node_queue_api["Queue API"]
  node_patient_api["Patients API"]
  node_hospital_api["Hospitals API"]
  node_department_api["Departments API"]
  node_doctor_api["Doctors API"]
end

subgraph group_care["Care workflows"]
  node_appointments["Appointment booking"]
  node_queue["Check-in and queue"]
  node_patients["Patient management"]
end

subgraph group_admin["Hospital administration"]
  node_hospitals["Hospital management"]
  node_departments["Department management"]
  node_doctors["Doctor management<br/>[DoctorService.java]"]
end

subgraph group_persistence["Persistence model"]
  node_entities["Domain entities"]
  node_repositories[("JPA repositories")]
end

node_user(("API client"))

node_user -.->|"requests"| node_appointment_api
node_user -.->|"requests"| node_queue_api
node_user -.->|"requests"| node_patient_api
node_user -.->|"requests"| node_hospital_api
node_user -.->|"requests"| node_department_api
node_user -.->|"requests"| node_doctor_api
node_appointment_api -->|"delegates"| node_appointments
node_department_api -->|"delegates"| node_departments
node_doctor_api -->|"delegates"| node_doctors
node_hospital_api -->|"delegates"| node_hospitals
node_queue_api -.->|"delegates"| node_queue
node_patient_api -.->|"delegates"| node_patients
node_appointments -->|"queries and saves"| node_repositories
node_appointments -->|"builds responses"| node_entities
node_queue -->|"queries and saves"| node_repositories
node_queue -->|"updates status"| node_entities
node_patients -->|"queries and saves"| node_repositories
node_departments -->|"queries and saves"| node_repositories
node_departments -->|"maps records"| node_entities
node_doctors -->|"queries and saves"| node_repositories
node_hospitals -.->|"queries and saves"| node_repositories

click node_appointment_api "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/AppointmentController.java"
click node_queue_api "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/QueueController.java"
click node_patient_api "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/PatientController.java"
click node_hospital_api "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/HospitalController.java"
click node_department_api "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/DepartmentController.java"
click node_doctor_api "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/DoctorController.java"
click node_appointments "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/AppointmentService.java"
click node_queue "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/QueueTokenService.java"
click node_patients "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/PatientService.java"
click node_hospitals "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/HospitalService.java"
click node_departments "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/DepartmentService.java"
click node_doctors "https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/DoctorService.java"
click node_entities "https://github.com/anilkumar10-hub/smart-queue-management-system/tree/main/src/main/java/com/codewithme/smartqueue/entity"
click node_repositories "https://github.com/anilkumar10-hub/smart-queue-management-system/tree/main/src/main/java/com/codewithme/smartqueue/repository"

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_appointment_api,node_queue_api,node_patient_api,node_hospital_api,node_department_api,node_doctor_api,node_user toneBlue
class node_appointments,node_queue,node_patients toneAmber
class node_hospitals,node_departments,node_doctors toneMint
class node_entities,node_repositories toneRose
```

## Components

### API endpoints

- [Appointments API](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/AppointmentController.java): `src/main/java/com/codewithme/smartqueue/controller/AppointmentController.java`
- [Queue API](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/QueueController.java): `src/main/java/com/codewithme/smartqueue/controller/QueueController.java`
- [Patients API](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/PatientController.java): `src/main/java/com/codewithme/smartqueue/controller/PatientController.java`
- [Hospitals API](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/HospitalController.java): `src/main/java/com/codewithme/smartqueue/controller/HospitalController.java`
- [Departments API](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/DepartmentController.java): `src/main/java/com/codewithme/smartqueue/controller/DepartmentController.java`
- [Doctors API](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/controller/DoctorController.java): `src/main/java/com/codewithme/smartqueue/controller/DoctorController.java`

### Care workflows

- [Appointment booking](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/AppointmentService.java): `src/main/java/com/codewithme/smartqueue/service/AppointmentService.java`
- [Check-in and queue](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/QueueTokenService.java): `src/main/java/com/codewithme/smartqueue/service/QueueTokenService.java`
- [Patient management](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/PatientService.java): `src/main/java/com/codewithme/smartqueue/service/PatientService.java`

### Hospital administration

- [Hospital management](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/HospitalService.java): `src/main/java/com/codewithme/smartqueue/service/HospitalService.java`
- [Department management](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/DepartmentService.java): `src/main/java/com/codewithme/smartqueue/service/DepartmentService.java`
- [Doctor management](https://github.com/anilkumar10-hub/smart-queue-management-system/blob/main/src/main/java/com/codewithme/smartqueue/service/DoctorService.java): `src/main/java/com/codewithme/smartqueue/service/DoctorService.java`

### Persistence model

- [Domain entities](https://github.com/anilkumar10-hub/smart-queue-management-system/tree/main/src/main/java/com/codewithme/smartqueue/entity): `src/main/java/com/codewithme/smartqueue/entity`
- [JPA repositories](https://github.com/anilkumar10-hub/smart-queue-management-system/tree/main/src/main/java/com/codewithme/smartqueue/repository): `src/main/java/com/codewithme/smartqueue/repository`

### Other components

- **API client**

## Connections

- API client → Appointments API: requests
- API client → Queue API: requests
- API client → Patients API: requests
- API client → Hospitals API: requests
- API client → Departments API: requests
- API client → Doctors API: requests
- Appointments API → Appointment booking: delegates (evidence: `src/main/java/com/codewithme/smartqueue/controller/AppointmentController.java`)
- Departments API → Department management: delegates (evidence: `src/main/java/com/codewithme/smartqueue/controller/DepartmentController.java`)
- Doctors API → Doctor management: delegates (evidence: `src/main/java/com/codewithme/smartqueue/controller/DoctorController.java`)
- Hospitals API → Hospital management: delegates (evidence: `src/main/java/com/codewithme/smartqueue/controller/HospitalController.java`)
- Queue API → Check-in and queue: delegates (evidence: `src/main/java/com/codewithme/smartqueue/controller/QueueController.java`)
- Patients API → Patient management: delegates (evidence: `src/main/java/com/codewithme/smartqueue/controller/PatientController.java`)
- Appointment booking → JPA repositories: queries and saves (evidence: `src/main/java/com/codewithme/smartqueue/service/AppointmentService.java`)
- Appointment booking → Domain entities: builds responses (evidence: `src/main/java/com/codewithme/smartqueue/service/AppointmentService.java`)
- Check-in and queue → JPA repositories: queries and saves (evidence: `src/main/java/com/codewithme/smartqueue/service/QueueTokenService.java`)
- Check-in and queue → Domain entities: updates status (evidence: `src/main/java/com/codewithme/smartqueue/service/QueueTokenService.java`)
- Patient management → JPA repositories: queries and saves (evidence: `src/main/java/com/codewithme/smartqueue/service/PatientService.java`)
- Department management → JPA repositories: queries and saves (evidence: `src/main/java/com/codewithme/smartqueue/service/DepartmentService.java`)
- Department management → Domain entities: maps records (evidence: `src/main/java/com/codewithme/smartqueue/service/DepartmentService.java`)
- Doctor management → JPA repositories: queries and saves (evidence: `src/main/java/com/codewithme/smartqueue/service/DoctorService.java`)
- Hospital management → JPA repositories: queries and saves (evidence: `src/main/java/com/codewithme/smartqueue/service/HospitalService.java`)
