How nforfavour/smartbank-queue-management-system works
SmartBank is a role-based digital bank queue: customers register, choose a service, preview and accept a FIFO ticket or book an appointment, then track status; staff call and serve customers, while admins manage services and review activity and statistics. The backend exposes these workflows through Express routes, with SQLite for durable records and per-service in-memory FIFO queues. The README documents live polling and email verification, but the frontend call wiring and mailer integration are not established by the excerpts, so those links are marked unverified.
Main entry points: server.js Express Application · db.js SQLite Records · queueManager.js Queue Manager · api.js API Session Helper
Components 19
Role Interfaces
- Customer Portal
frontend/customer.html - Staff Dashboard
frontend/staff.html - Admin Dashboard
frontend/admin.html - Login and Registration
frontend/index.html - API Session Helper
frontend/js/api.js
API Workflows
- Express Application
backend/server.js - Account Access
backend/routes/auth.js - Service Management
backend/routes/services.js - Ticket and Staff Actions
backend/routes/queue.js - Appointment Booking
backend/routes/appointments.js - Admin Analytics
backend/routes/admin.js - Verification Email
backend/utils/mailer.js
Queue Runtime
- Queue Manager
backend/queue/queueManager.js - FIFO Structure
backend/queue/FIFOQueue.js
Identity and Data
- JWT Authorization
backend/middleware/auth.js - SQLite Records
backend/db/db.js
Other components
- Customer
- Bank Staff
- Bank Admin
Connections 30
- Customer → Customer Portal: uses
README.md - Bank Staff → Staff Dashboard: uses
README.md - Bank Admin → Admin Dashboard: uses
README.md - Customer → Login and Registration: registers
README.md - Customer Portal → API Session Helper: uses
README.md - Staff Dashboard → API Session Helper: uses
README.md - Admin Dashboard → API Session Helper: uses
README.md - Login and Registration → API Session Helper: uses
README.md - API Session Helper → Express Application: requests API
- Express Application → Account Access: mounts
backend/server.js - Express Application → Service Management: mounts
backend/server.js - Express Application → Ticket and Staff Actions: mounts
backend/server.js - Express Application → Appointment Booking: mounts
backend/server.js - Express Application → Admin Analytics: mounts
backend/server.js - Express Application → Queue Manager: rebuilds at startup
backend/server.js - Account Access → SQLite Records: reads and writes
backend/routes/auth.js - Account Access → JWT Authorization: authenticates profile
backend/routes/auth.js - Service Management → SQLite Records: reads and writes
backend/routes/services.js - Service Management → JWT Authorization: guards admin actions
backend/routes/services.js - Ticket and Staff Actions → SQLite Records: reads and writes
backend/routes/queue.js - Ticket and Staff Actions → JWT Authorization: guards actions
backend/routes/queue.js - Ticket and Staff Actions → Queue Manager: manages tickets
backend/routes/queue.js - Appointment Booking → SQLite Records: reads and writes
backend/routes/appointments.js - Appointment Booking → JWT Authorization: guards customer actions
backend/routes/appointments.js - Appointment Booking → Queue Manager: creates check-in ticket
backend/routes/appointments.js - Admin Analytics → SQLite Records: queries records
backend/routes/admin.js - Admin Analytics → JWT Authorization: requires admin
backend/routes/admin.js - Queue Manager → FIFO Structure: maintains queues
backend/queue/queueManager.js - Queue Manager → SQLite Records: restores waiting tickets
backend/queue/queueManager.js - Account Access → Verification Email: may send verification
README.md