# synvera/antrian-dosqueue--php-native- architecture

> Architecture diagram of the GitHub repository synvera/antrian-dosqueue--php-native-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/synvera/antrian-dosqueue--php-native-
- Repository: https://github.com/synvera/antrian-dosqueue--php-native-

## Overview

DosQueue is a PHP queue-management application for guests taking tickets and staff operating assigned waves and rooms. Guests view wave availability, request a ticket, then check its status; staff sign in, manage calls and completions from an operational dashboard, and review or archive completed tickets. The sampled code supports these routes and shared database-backed functions. The README is empty, and some source is unsampled, so uncertain links—especially ticket-status polling and history retrieval—are omitted.

Main entry points: [`includes/functions.php`](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/includes/functions.php) (Queue Domain Logic), [`includes/auth.php`](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/includes/auth.php) (Staff Authorization), [`user/index.php`](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/user/index.php) (Wave Selection), [`petugas/dashboard.php`](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/petugas/dashboard.php) (Operations Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guest["Guest Queue"]
  node_queue_home["Wave Selection<br/>[index.php]"]
  node_ticket_result["Ticket Status<br/>[ticket-result.php]"]
end

subgraph group_staff["Staff Operations"]
  node_staff_login["Staff Login<br/>[login.php]"]
  node_dashboard["Operations Dashboard<br/>[dashboard.php]"]
  node_history["Ticket History"]
end

subgraph group_api["Queue Actions"]
  node_ticket_create["Ticket Creation<br/>[create-ticket.php]"]
  node_ticket_read["Staff Ticket Listing"]
  node_call_action["Call Ticket<br/>[call-ticket.php]"]
  node_complete_action["Complete Ticket"]
  node_recall_action["Recall Ticket<br/>[recall-ticket.php]"]
  node_archive_action["Archive Ticket<br/>[delete-ticket.php]"]
  node_wave_action["Wave Availability<br/>[get-waves.php]"]
  node_status_action["Ticket Status API"]
  node_release_action["Release Guest Ticket"]
end

subgraph group_core["Application Core"]
  node_queue_logic["Queue Domain Logic<br/>[functions.php]"]
  node_auth["Staff Authorization<br/>[auth.php]"]
  node_csrf["CSRF Protection<br/>[csrf.php]"]
  node_db_config["Database Connection<br/>[database.php]"]
  node_app_config["Session Configuration<br/>[app.php]"]
  node_helpers["Response Helpers<br/>[helpers.php]"]
  node_database[("Queue Database<br/>[antrian_db.sql]")]
end

node_guest_actor(("Guest"))
node_staff_actor(("Staff"))

node_guest_actor -->|"selects wave"| node_queue_home
node_queue_home -->|"refreshes availability"| node_wave_action
node_queue_home -->|"requests ticket"| node_ticket_create
node_queue_home -->|"loads waves"| node_queue_logic
node_ticket_create -->|"creates ticket"| node_queue_logic
node_ticket_result -->|"loads ticket detail"| node_queue_logic
node_guest_actor -->|"views ticket"| node_ticket_result
node_staff_actor -->|"signs in"| node_staff_login
node_staff_login -->|"authenticates"| node_auth
node_staff_actor -->|"operates queue"| node_dashboard
node_dashboard -->|"loads assigned tickets"| node_ticket_read
node_dashboard -->|"calls ticket"| node_call_action
node_history -->|"loads history"| node_ticket_read
node_history -->|"archives ticket"| node_archive_action
node_ticket_read -->|"queries tickets"| node_queue_logic
node_call_action -->|"calls ticket"| node_queue_logic
node_complete_action -->|"completes ticket"| node_queue_logic
node_recall_action -->|"recalls ticket"| node_queue_logic
node_archive_action -->|"archives ticket"| node_queue_logic
node_wave_action -->|"reads waves"| node_queue_logic
node_status_action -->|"reads status"| node_queue_logic
node_release_action -->|"releases ticket"| node_queue_logic
node_queue_logic -->|"opens connection"| node_db_config
node_auth -->|"queries accounts"| node_db_config
node_queue_logic -->|"checks assignments"| node_auth
node_auth -->|"uses responses"| node_helpers
node_db_config -->|"loads session setup"| node_app_config
node_csrf -->|"uses session"| node_app_config
node_queue_logic -.->|"reads and updates"| node_database
node_auth -.->|"reads accounts and assignments"| node_database

click node_queue_home "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/user/index.php"
click node_ticket_create "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/create-ticket.php"
click node_ticket_result "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/user/ticket-result.php"
click node_staff_login "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/petugas/login.php"
click node_dashboard "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/petugas/dashboard.php"
click node_history "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/petugas/riwayat-antrian.php"
click node_ticket_read "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/get-staff-tickets.php"
click node_call_action "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/call-ticket.php"
click node_complete_action "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/complete-ticket.php"
click node_recall_action "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/recall-ticket.php"
click node_archive_action "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/delete-ticket.php"
click node_wave_action "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/get-waves.php"
click node_status_action "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/get-ticket-status.php"
click node_release_action "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/release-guest-ticket.php"
click node_queue_logic "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/includes/functions.php"
click node_auth "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/includes/auth.php"
click node_csrf "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/includes/csrf.php"
click node_db_config "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/config/database.php"
click node_app_config "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/config/app.php"
click node_helpers "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/includes/helpers.php"
click node_database "https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/database/antrian_db.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_queue_home,node_ticket_result toneBlue
class node_staff_login,node_dashboard,node_history toneAmber
class node_ticket_create,node_ticket_read,node_call_action,node_complete_action,node_recall_action,node_archive_action,node_wave_action,node_status_action,node_release_action toneMint
class node_queue_logic,node_auth,node_csrf,node_db_config,node_app_config,node_helpers,node_database toneRose
class node_guest_actor,node_staff_actor toneIndigo
```

## Components

### Guest Queue

- [Wave Selection](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/user/index.php): `user/index.php`
- [Ticket Status](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/user/ticket-result.php): `user/ticket-result.php`

### Staff Operations

- [Staff Login](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/petugas/login.php): `petugas/login.php`
- [Operations Dashboard](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/petugas/dashboard.php): `petugas/dashboard.php`
- [Ticket History](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/petugas/riwayat-antrian.php): `petugas/riwayat-antrian.php`

### Queue Actions

- [Ticket Creation](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/create-ticket.php): `actions/create-ticket.php`
- [Staff Ticket Listing](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/get-staff-tickets.php): `actions/get-staff-tickets.php`
- [Call Ticket](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/call-ticket.php): `actions/call-ticket.php`
- [Complete Ticket](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/complete-ticket.php): `actions/complete-ticket.php`
- [Recall Ticket](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/recall-ticket.php): `actions/recall-ticket.php`
- [Archive Ticket](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/delete-ticket.php): `actions/delete-ticket.php`
- [Wave Availability](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/get-waves.php): `actions/get-waves.php`
- [Ticket Status API](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/get-ticket-status.php): `actions/get-ticket-status.php`
- [Release Guest Ticket](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/actions/release-guest-ticket.php): `actions/release-guest-ticket.php`

### Application Core

- [Queue Domain Logic](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/includes/functions.php): `includes/functions.php`
- [Staff Authorization](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/includes/auth.php): `includes/auth.php`
- [CSRF Protection](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/includes/csrf.php): `includes/csrf.php`
- [Database Connection](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/config/database.php): `config/database.php`
- [Session Configuration](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/config/app.php): `config/app.php`
- [Response Helpers](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/includes/helpers.php): `includes/helpers.php`
- [Queue Database](https://github.com/synvera/antrian-dosqueue--php-native-/blob/main/database/antrian_db.sql): `database/antrian_db.sql`

### Other components

- **Guest**
- **Staff**

## Connections

- Guest → Wave Selection: selects wave (evidence: `user/index.php`)
- Wave Selection → Wave Availability: refreshes availability (evidence: `user/index.php`)
- Wave Selection → Ticket Creation: requests ticket (evidence: `user/index.php`)
- Wave Selection → Queue Domain Logic: loads waves (evidence: `user/index.php`)
- Ticket Creation → Queue Domain Logic: creates ticket (evidence: `actions/create-ticket.php`)
- Ticket Status → Queue Domain Logic: loads ticket detail (evidence: `user/ticket-result.php`)
- Guest → Ticket Status: views ticket (evidence: `user/ticket-result.php`)
- Staff → Staff Login: signs in
- Staff Login → Staff Authorization: authenticates (evidence: `includes/auth.php`)
- Staff → Operations Dashboard: operates queue (evidence: `petugas/dashboard.php`)
- Operations Dashboard → Staff Ticket Listing: loads assigned tickets (evidence: `petugas/dashboard.php`)
- Operations Dashboard → Call Ticket: calls ticket (evidence: `petugas/dashboard.php`)
- Ticket History → Staff Ticket Listing: loads history (evidence: `petugas/riwayat-antrian.php`)
- Ticket History → Archive Ticket: archives ticket (evidence: `petugas/riwayat-antrian.php`)
- Staff Ticket Listing → Queue Domain Logic: queries tickets (evidence: `actions/get-staff-tickets.php`)
- Call Ticket → Queue Domain Logic: calls ticket (evidence: `actions/call-ticket.php`)
- Complete Ticket → Queue Domain Logic: completes ticket (evidence: `actions/complete-ticket.php`)
- Recall Ticket → Queue Domain Logic: recalls ticket (evidence: `actions/recall-ticket.php`)
- Archive Ticket → Queue Domain Logic: archives ticket (evidence: `actions/delete-ticket.php`)
- Wave Availability → Queue Domain Logic: reads waves (evidence: `actions/get-waves.php`)
- Ticket Status API → Queue Domain Logic: reads status (evidence: `actions/get-ticket-status.php`)
- Release Guest Ticket → Queue Domain Logic: releases ticket (evidence: `actions/release-guest-ticket.php`)
- Queue Domain Logic → Database Connection: opens connection (evidence: `includes/functions.php`)
- Staff Authorization → Database Connection: queries accounts (evidence: `includes/auth.php`)
- Queue Domain Logic → Staff Authorization: checks assignments (evidence: `includes/functions.php`)
- Staff Authorization → Response Helpers: uses responses (evidence: `includes/auth.php`)
- Database Connection → Session Configuration: loads session setup (evidence: `config/database.php`)
- CSRF Protection → Session Configuration: uses session (evidence: `includes/csrf.php`)
- Queue Domain Logic → Queue Database: reads and updates
- Staff Authorization → Queue Database: reads accounts and assignments
