# camizzz0/project-ourqueue architecture

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

- Interactive diagram: https://gitdiagram.com/camizzz0/project-ourqueue
- Repository: https://github.com/camizzz0/project-ourqueue

## Overview

OurQueue is a digital queue system: administrators manage queues and call tickets, while guests take a ticket and follow its status; superadmins oversee accounts and system-wide queues. The sampled backend shows route dispatch into controllers, database-backed queue operations, SSE ticket updates, and push notifications when a participant is called. Frontend route structure supports the corresponding guest, admin, and superadmin experiences. Several controller and page implementations were not sampled, so uncertain internal wiring is omitted.

Main entry points: [`backend/src/app.js`](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/app.js) (Express API), [`frontend/src/App.jsx`](https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/App.jsx) (Application routes), [`backend/src/config/database.js`](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/config/database.js) (Postgres database), [`backend/src/services/pushService.js`](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/services/pushService.js) (Push delivery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_root["Application routes<br/>[App.jsx]"]
  node_dashboard["Queue dashboard<br/>[DashboardPage.jsx]"]
  node_guestpage["Guest ticket page<br/>[QueueGuestPage.jsx]"]
  node_auth["Authentication pages<br/>[LoginPage.jsx]"]
  node_superpages["Superadmin pages<br/>[StatsPage.jsx]"]
  node_clientapi["API client<br/>[api.js]"]
end

subgraph group_api["API workflows"]
  node_app["Express API<br/>[app.js]"]
  node_authroutes["Authentication routes<br/>[authRoutes.js]"]
  node_queueroutes["Queue routes<br/>[queueRoutes.js]"]
  node_entryroutes["Ticket routes<br/>[entryRoutes.js]"]
  node_adminroutes["Superadmin routes"]
  node_authctrl["Authentication handlers<br/>[authController.js]"]
  node_queuectrl["Queue management<br/>[queueController.js]"]
  node_entryctrl["Ticket handling<br/>[entryController.js]"]
  node_adminctrl["System oversight"]
end

subgraph group_data["Queue data"]
  node_schema["Queue schema<br/>[schema.js]"]
  node_database[("Postgres database<br/>[database.js]")]
end

subgraph group_notify["Notifications"]
  node_pushctrl["Push endpoints<br/>[pushController.js]"]
  node_pushsvc["Push delivery<br/>[pushService.js]"]
end

node_admin(("Queue admin"))
node_guest(("Guest participant"))
node_webpush["Web Push service"]

node_admin -->|"uses"| node_root
node_guest -->|"uses"| node_root
node_root -->|"routes to"| node_dashboard
node_root -->|"routes to"| node_guestpage
node_root -->|"routes to"| node_auth
node_root -->|"routes to"| node_superpages
node_dashboard -->|"requests data"| node_clientapi
node_guestpage -->|"requests ticket"| node_clientapi
node_auth -->|"requests auth"| node_clientapi
node_superpages -->|"requests data"| node_clientapi
node_clientapi -->|"HTTP requests"| node_app
node_app -->|"dispatches"| node_authroutes
node_app -->|"dispatches"| node_queueroutes
node_app -->|"dispatches"| node_entryroutes
node_app -->|"dispatches"| node_adminroutes
node_authroutes -->|"dispatches"| node_authctrl
node_queueroutes -->|"dispatches"| node_queuectrl
node_entryroutes -->|"dispatches"| node_entryctrl
node_adminroutes -->|"dispatches"| node_adminctrl
node_authctrl -->|"reads/writes"| node_database
node_queuectrl -->|"reads/writes"| node_database
node_entryctrl -->|"reads/writes"| node_database
node_adminctrl -->|"reads/writes"| node_database
node_database -->|"uses definitions"| node_schema
node_app -->|"dispatches"| node_pushctrl
node_queuectrl -->|"notifies called guest"| node_pushsvc
node_entryctrl -->|"notifies called guest"| node_pushsvc
node_pushctrl -->|"manages delivery"| node_pushsvc
node_pushsvc -->|"loads subscriptions"| node_database
node_pushsvc -->|"sends notification"| node_webpush

click node_root "https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/pages/dashboard/DashboardPage.jsx"
click node_guestpage "https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/pages/public/QueueGuestPage.jsx"
click node_auth "https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/pages/auth/LoginPage.jsx"
click node_superpages "https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/pages/superadmin/StatsPage.jsx"
click node_clientapi "https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/utils/api.js"
click node_app "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/app.js"
click node_authroutes "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/routes/authRoutes.js"
click node_queueroutes "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/routes/queueRoutes.js"
click node_entryroutes "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/routes/entryRoutes.js"
click node_adminroutes "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/routes/superadminRoutes.js"
click node_authctrl "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/controllers/authController.js"
click node_queuectrl "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/controllers/queueController.js"
click node_entryctrl "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/controllers/entryController.js"
click node_adminctrl "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/controllers/superadminController.js"
click node_schema "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/db/schema.js"
click node_database "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/config/database.js"
click node_pushctrl "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/controllers/pushController.js"
click node_pushsvc "https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/services/pushService.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_root,node_dashboard,node_guestpage,node_auth,node_superpages,node_clientapi toneBlue
class node_app,node_authroutes,node_queueroutes,node_entryroutes,node_adminroutes,node_authctrl,node_queuectrl,node_entryctrl,node_adminctrl toneAmber
class node_schema,node_database toneMint
class node_pushctrl,node_pushsvc,node_admin toneRose
class node_guest,node_webpush toneIndigo
```

## Components

### Web application

- [Application routes](https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Queue dashboard](https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/pages/dashboard/DashboardPage.jsx): `frontend/src/pages/dashboard/DashboardPage.jsx`
- [Guest ticket page](https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/pages/public/QueueGuestPage.jsx): `frontend/src/pages/public/QueueGuestPage.jsx`
- [Authentication pages](https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/pages/auth/LoginPage.jsx): `frontend/src/pages/auth/LoginPage.jsx`
- [Superadmin pages](https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/pages/superadmin/StatsPage.jsx): `frontend/src/pages/superadmin/StatsPage.jsx`
- [API client](https://github.com/camizzz0/project-ourqueue/blob/main/frontend/src/utils/api.js): `frontend/src/utils/api.js`

### API workflows

- [Express API](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/app.js): `backend/src/app.js`
- [Authentication routes](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/routes/authRoutes.js): `backend/src/routes/authRoutes.js`
- [Queue routes](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/routes/queueRoutes.js): `backend/src/routes/queueRoutes.js`
- [Ticket routes](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/routes/entryRoutes.js): `backend/src/routes/entryRoutes.js`
- [Superadmin routes](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/routes/superadminRoutes.js): `backend/src/routes/superadminRoutes.js`
- [Authentication handlers](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/controllers/authController.js): `backend/src/controllers/authController.js`
- [Queue management](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/controllers/queueController.js): `backend/src/controllers/queueController.js`
- [Ticket handling](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/controllers/entryController.js): `backend/src/controllers/entryController.js`
- [System oversight](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/controllers/superadminController.js): `backend/src/controllers/superadminController.js`

### Queue data

- [Queue schema](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/db/schema.js): `backend/src/db/schema.js`
- [Postgres database](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/config/database.js): `backend/src/config/database.js`

### Notifications

- [Push endpoints](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/controllers/pushController.js): `backend/src/controllers/pushController.js`
- [Push delivery](https://github.com/camizzz0/project-ourqueue/blob/main/backend/src/services/pushService.js): `backend/src/services/pushService.js`

### Other components

- **Queue admin**
- **Guest participant**
- **Web Push service**

## Connections

- Queue admin → Application routes: uses
- Guest participant → Application routes: uses
- Application routes → Queue dashboard: routes to
- Application routes → Guest ticket page: routes to
- Application routes → Authentication pages: routes to
- Application routes → Superadmin pages: routes to
- Queue dashboard → API client: requests data
- Guest ticket page → API client: requests ticket
- Authentication pages → API client: requests auth
- Superadmin pages → API client: requests data
- API client → Express API: HTTP requests
- Express API → Authentication routes: dispatches
- Express API → Queue routes: dispatches
- Express API → Ticket routes: dispatches
- Express API → Superadmin routes: dispatches
- Authentication routes → Authentication handlers: dispatches
- Queue routes → Queue management: dispatches
- Ticket routes → Ticket handling: dispatches
- Superadmin routes → System oversight: dispatches
- Authentication handlers → Postgres database: reads/writes
- Queue management → Postgres database: reads/writes
- Ticket handling → Postgres database: reads/writes
- System oversight → Postgres database: reads/writes
- Postgres database → Queue schema: uses definitions
- Express API → Push endpoints: dispatches
- Queue management → Push delivery: notifies called guest
- Ticket handling → Push delivery: notifies called guest
- Push endpoints → Push delivery: manages delivery
- Push delivery → Postgres database: loads subscriptions
- Push delivery → Web Push service: sends notification
