# magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system
- Repository: https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system

## Overview

MediQueue is a clinic appointment and queue system with a browser-based Java server and an included Swing desktop client. The main workflow is browser sign-in or registration, state retrieval, then appointment booking or staff queue/clinic-management actions; the server applies clinic rules and persists changes. The README documents capabilities beyond the sampled excerpts, including cancellation, confirmation, schedules, and patient-record management. Arrows use README or indexed/source evidence; unsampled implementation details are represented by the documented service boundary rather than inferred internal calls.

Main entry points: [`src/MediQueueWeb.java`](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueWeb.java) (HTTP server and API), [`src/MediQueueData.java`](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueData.java) (Clinic data and rules), [`web/app.js`](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/web/app.js) (Browser screens), [`src/MediQueue.java`](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueue.java) (Swing desktop app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User interfaces"]
  node_browser["Browser screens<br/>[app.js]"]
  node_page["Page assets<br/>[index.html]"]
  node_desktop["Swing desktop app<br/>[MediQueue.java]"]
end

subgraph group_server["Web application"]
  node_webserver["HTTP server and API<br/>[MediQueueWeb.java]"]
  node_json["JSON encoding<br/>[Json.java]"]
end

subgraph group_clinic["Clinic operations"]
  node_auth["Sign-in and accounts"]
  node_appointments["Appointment actions"]
  node_queue["Queue operations"]
  node_patientrecords["Patient records"]
  node_schedules["Doctor schedules"]
  node_state["Screen state"]
end

subgraph group_persistence["Data and storage"]
  node_datamodel["Clinic data and rules<br/>[MediQueueData.java]"]
  node_clinicstore[("Appointment and clinic files<br/>[mediqueue-data.txt]")]
  node_accountstore[("Account file")]
end

node_patient(("Patient or staff"))

node_patient -->|"uses"| node_browser
node_browser -->|"loads"| node_page
node_browser -->|"requests API"| node_webserver
node_webserver -->|"returns JSON"| node_browser
node_patient -->|"uses"| node_desktop
node_webserver -->|"dispatches"| node_auth
node_webserver -->|"dispatches"| node_appointments
node_webserver -->|"dispatches"| node_queue
node_webserver -->|"dispatches"| node_patientrecords
node_webserver -->|"dispatches"| node_schedules
node_webserver -->|"requests state"| node_state
node_webserver -->|"encodes replies"| node_json
node_webserver -->|"loads data"| node_datamodel
node_auth -->|"uses accounts"| node_datamodel
node_appointments -->|"updates clinic data"| node_datamodel
node_queue -->|"updates queue"| node_datamodel
node_patientrecords -->|"updates records"| node_datamodel
node_schedules -->|"updates schedules"| node_datamodel
node_state -->|"reads clinic data"| node_datamodel
node_datamodel -->|"reads and writes"| node_clinicstore
node_datamodel -->|"reads and writes"| node_accountstore
node_desktop -->|"shares data"| node_datamodel

click node_browser "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/web/app.js"
click node_page "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/web/index.html"
click node_desktop "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueue.java"
click node_webserver "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueWeb.java"
click node_json "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/Json.java"
click node_auth "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java"
click node_appointments "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java"
click node_queue "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java"
click node_patientrecords "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java"
click node_schedules "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java"
click node_state "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java"
click node_datamodel "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueData.java"
click node_clinicstore "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/file/mediqueue-data.txt"
click node_accountstore "https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/file/mediqueue-users.txt"

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_browser,node_page,node_desktop toneBlue
class node_webserver,node_json toneAmber
class node_auth,node_appointments,node_queue,node_patientrecords,node_schedules,node_state toneMint
class node_datamodel,node_clinicstore,node_accountstore toneRose
class node_patient toneIndigo
```

## Components

### User interfaces

- [Browser screens](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/web/app.js): `web/app.js`
- [Page assets](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/web/index.html): `web/index.html`
- [Swing desktop app](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueue.java): `src/MediQueue.java`

### Web application

- [HTTP server and API](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueWeb.java): `src/MediQueueWeb.java`
- [JSON encoding](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/Json.java): `src/Json.java`

### Clinic operations

- [Sign-in and accounts](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java): `src/MediQueueService.java`
- [Appointment actions](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java): `src/MediQueueService.java`
- [Queue operations](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java): `src/MediQueueService.java`
- [Patient records](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java): `src/MediQueueService.java`
- [Doctor schedules](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java): `src/MediQueueService.java`
- [Screen state](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueService.java): `src/MediQueueService.java`

### Data and storage

- [Clinic data and rules](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/src/MediQueueData.java): `src/MediQueueData.java`
- [Appointment and clinic files](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/file/mediqueue-data.txt): `file/mediqueue-data.txt`
- [Account file](https://github.com/magtibaymarkaldred-eng/mediqueue-a-clinic-appointment-and-queue-management-system/blob/main/file/mediqueue-users.txt): `file/mediqueue-users.txt`

### Other components

- **Patient or staff**

## Connections

- Patient or staff → Browser screens: uses
- Browser screens → Page assets: loads
- Browser screens → HTTP server and API: requests API
- HTTP server and API → Browser screens: returns JSON
- Patient or staff → Swing desktop app: uses
- HTTP server and API → Sign-in and accounts: dispatches (evidence: `src/MediQueueWeb.java`)
- HTTP server and API → Appointment actions: dispatches (evidence: `src/MediQueueWeb.java`)
- HTTP server and API → Queue operations: dispatches (evidence: `src/MediQueueWeb.java`)
- HTTP server and API → Patient records: dispatches (evidence: `src/MediQueueWeb.java`)
- HTTP server and API → Doctor schedules: dispatches (evidence: `src/MediQueueWeb.java`)
- HTTP server and API → Screen state: requests state (evidence: `src/MediQueueWeb.java`)
- HTTP server and API → JSON encoding: encodes replies (evidence: `src/MediQueueWeb.java`)
- HTTP server and API → Clinic data and rules: loads data (evidence: `src/MediQueueWeb.java`)
- Sign-in and accounts → Clinic data and rules: uses accounts (evidence: `src/MediQueueService.java`)
- Appointment actions → Clinic data and rules: updates clinic data (evidence: `src/MediQueueService.java`)
- Queue operations → Clinic data and rules: updates queue (evidence: `src/MediQueueService.java`)
- Patient records → Clinic data and rules: updates records (evidence: `src/MediQueueService.java`)
- Doctor schedules → Clinic data and rules: updates schedules (evidence: `src/MediQueueService.java`)
- Screen state → Clinic data and rules: reads clinic data (evidence: `src/MediQueueService.java`)
- Clinic data and rules → Appointment and clinic files: reads and writes
- Clinic data and rules → Account file: reads and writes
- Swing desktop app → Clinic data and rules: shares data (evidence: `src/MediQueue.java`)
