How vargas0fficial/szk-system works
This is a multi-branch Suzuki appointment-management application, with an admin panel for managing appointments and a branch-specific display for viewing them. The main workflow is branch selection, admin sign-in, and branch-scoped appointment management; a live event stream exposes appointment updates, while staff and branch-status endpoints support the UI. The graph also preserves authentication, scheduled reset, and persistence components. Several page and route implementations were not excerpted, so relationships without source or documented evidence are omitted; the README provides no product-specific capability details.
Main entry points: db.js Database connections · branches.js Branch configuration · route.js Appointment API / stream · BranchStatus.js Branch status model
Components 23
User interfaces
- Branch list
src/app/page.js - Branch display
src/app/[branch]/page.js - Admin panel
src/app/admin/page.js - Login screen
src/app/login/page.js - Appointment form
src/components/AppointmentForm.jsx - Appointment table
src/components/AppointmentTable.jsx - Access unavailable
src/components/NotYetAccessible.js
Application routes
- Appointment API / stream
src/app/api/appointments/stream/route.js - Login route
src/app/api/auth/login/route.js - Session route
src/app/api/auth/me/route.js - Logout route
src/app/api/auth/logout/route.js - Password route
src/app/api/auth/change-password/route.js - Staff route
src/app/api/staff/route.js - Branch status route
src/app/api/branches/status/route.js - Scheduled reset
src/app/api/cron/reset/route.js
Branch and domain
- Branch configuration
src/branches.js - Appointment model
src/models/Appointment.js - Admin model
src/models/Admin.js - Staff model
src/models/Staff.js - Branch status model
src/models/BranchStatus.js
Persistence
- Database connections
src/db.js
Other components
- Visitor / staff
- MongoDB
Connections 27
- Visitor / staff → Branch list: opens
- Branch list → Branch configuration: lists branches
src/app/page.js - Branch display → Branch configuration: resolves branch
src/app/[branch]/page.js - Branch display → Access unavailable: renders
src/app/[branch]/page.js - Admin panel → Appointment form: renders
src/app/admin/page.js - Admin panel → Appointment table: renders
src/app/admin/page.js - Admin panel → Access unavailable: renders
src/app/admin/page.js - Login route → Database connections: connects
src/app/api/auth/login/route.js - Login route → Admin model: looks up admin
src/app/api/auth/login/route.js - Login route → Branch status model: checks activation
src/app/api/auth/login/route.js - Session route → Database connections: connects
src/app/api/auth/me/route.js - Session route → Branch status model: checks activation
src/app/api/auth/me/route.js - Session route → Branch configuration: resolves label
src/app/api/auth/me/route.js - Staff route → Database connections: connects
src/app/api/staff/route.js - Staff route → Staff model: queries staff
src/app/api/staff/route.js - Appointment table → Staff route: fetches staff
src/components/AppointmentTable.jsx - Branch status route → Database connections: connects
src/app/api/branches/status/route.js - Branch status route → Branch status model: reads status
src/app/api/branches/status/route.js - Branch status route → Branch configuration: validates branch
src/app/api/branches/status/route.js - Appointment API / stream → Database connections: connects
src/app/api/appointments/stream/route.js - Appointment API / stream → Appointment model: reads and mutates
src/app/api/appointments/stream/route.js - Appointment API / stream → Branch status model: checks activation
src/app/api/appointments/stream/route.js - Appointment API / stream → Branch configuration: resolves branch
src/app/api/appointments/stream/route.js - Scheduled reset → Database connections: connects
src/app/api/cron/reset/route.js - Scheduled reset → Appointment model: deletes appointments
src/app/api/cron/reset/route.js - Scheduled reset → Branch configuration: iterates branches
src/app/api/cron/reset/route.js - Database connections → MongoDB: queries
src/db.js