# bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system architecture

> Architecture diagram of the GitHub repository bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system
- Repository: https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system

## Overview

Enroll is a responsive enrollment queue for students, staff, administrators, and public viewers. The main workflow is: students complete document and orientation checks, receive a ticket, meet a teacher, get Brigada sign-off, then receive a room assignment. Staff manage queue actions; administrators manage sessions; the public display shows queue information. The app supports local browser-only demo state or a shared Supabase-backed queue. Most behavior is concentrated in app.js; the excerpts do not expose every view handler or database call, so the graph uses documented relationships where implementation details are unavailable.

Main entry points: [`app.js`](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js) (Staff dashboard), [`supabase-config.js`](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/supabase-config.js) (Supabase settings), [`supabase/schema.sql`](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/supabase/schema.sql) (Queue database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Enrollment entry"]
  node_kiosk["Ticket kiosk<br/>[app.js]"]
  node_ticketing["Ticket issuance<br/>[app.js]"]
  node_display["Public display<br/>[app.js]"]
end

subgraph group_operations["Queue operations"]
  node_teacher["Teacher meeting<br/>[app.js]"]
  node_brigada["Brigada sign-off<br/>[app.js]"]
  node_rooms["Room assignment<br/>[app.js]"]
  node_dashboard["Staff dashboard<br/>[app.js]"]
  node_session["Session controls<br/>[app.js]"]
end

subgraph group_platform["Data and access"]
  node_access["Staff authentication<br/>[app.js]"]
  node_demo[("Demo state<br/>[app.js]")]
  node_config["Supabase settings<br/>[supabase-config.js]"]
  node_schema[("Queue database<br/>[schema.sql]")]
end

node_student(("Student"))
node_staff(("Staff"))
node_admin(("Administrator"))
node_viewer(("Public viewer"))
node_supabase[("Supabase service")]

node_student -->|"uses"| node_kiosk
node_kiosk -->|"submits details"| node_ticketing
node_ticketing -->|"issues ticket"| node_supabase
node_supabase -->|"uses schema"| node_schema
node_staff -->|"manages queue"| node_dashboard
node_dashboard -->|"runs protected actions"| node_supabase
node_dashboard -->|"completes meeting"| node_teacher
node_dashboard -->|"records sign-off"| node_brigada
node_dashboard -->|"assigns room"| node_rooms
node_admin -->|"controls session"| node_session
node_session -->|"updates session"| node_supabase
node_staff -->|"signs in"| node_access
node_access -->|"checks role"| node_supabase
node_viewer -->|"views queue"| node_display
node_supabase -->|"refreshes live"| node_display
node_config -->|"configures client"| node_supabase
node_kiosk -->|"persists demo state"| node_demo
node_supabase -->|"refreshes live"| node_kiosk
node_supabase -->|"refreshes live"| node_dashboard

click node_kiosk "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js"
click node_ticketing "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js"
click node_teacher "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js"
click node_brigada "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js"
click node_rooms "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js"
click node_dashboard "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js"
click node_session "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js"
click node_display "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js"
click node_access "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js"
click node_demo "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js"
click node_config "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/supabase-config.js"
click node_schema "https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/supabase/schema.sql"

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_kiosk,node_ticketing,node_display,node_viewer toneBlue
class node_teacher,node_brigada,node_rooms,node_dashboard,node_session,node_supabase toneAmber
class node_access,node_demo,node_config,node_schema toneMint
class node_student,node_staff,node_admin toneIndigo
```

## Components

### Enrollment entry

- [Ticket kiosk](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js): `app.js`
- [Ticket issuance](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js): `app.js`
- [Public display](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js): `app.js`

### Queue operations

- [Teacher meeting](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js): `app.js`
- [Brigada sign-off](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js): `app.js`
- [Room assignment](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js): `app.js`
- [Staff dashboard](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js): `app.js`
- [Session controls](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js): `app.js`

### Data and access

- [Staff authentication](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js): `app.js`
- [Demo state](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/app.js): `app.js`
- [Supabase settings](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/supabase-config.js): `supabase-config.js`
- [Queue database](https://github.com/bhenhinlayagan12-cloud/enrollement-hybrid-queueing-system/blob/main/supabase/schema.sql): `supabase/schema.sql`

### Other components

- **Student**
- **Staff**
- **Administrator**
- **Public viewer**
- **Supabase service**

## Connections

- Student → Ticket kiosk: uses (evidence: `README.md`)
- Ticket kiosk → Ticket issuance: submits details (evidence: `README.md`)
- Ticket issuance → Supabase service: issues ticket (evidence: `README.md`)
- Supabase service → Queue database: uses schema (evidence: `README.md`)
- Staff → Staff dashboard: manages queue (evidence: `README.md`)
- Staff dashboard → Supabase service: runs protected actions (evidence: `README.md`)
- Staff dashboard → Teacher meeting: completes meeting (evidence: `app.js`)
- Staff dashboard → Brigada sign-off: records sign-off (evidence: `README.md`)
- Staff dashboard → Room assignment: assigns room (evidence: `README.md`)
- Administrator → Session controls: controls session (evidence: `README.md`)
- Session controls → Supabase service: updates session (evidence: `app.js`)
- Staff → Staff authentication: signs in (evidence: `app.js`)
- Staff authentication → Supabase service: checks role (evidence: `app.js`)
- Public viewer → Public display: views queue (evidence: `README.md`)
- Supabase service → Public display: refreshes live (evidence: `README.md`)
- Supabase settings → Supabase service: configures client (evidence: `README.md`)
- Ticket kiosk → Demo state: persists demo state (evidence: `README.md`)
- Supabase service → Ticket kiosk: refreshes live (evidence: `README.md`)
- Supabase service → Staff dashboard: refreshes live (evidence: `README.md`)
