How spectator-code/stjsp works
This is a driving-school management web application for prospective students, learners, instructors, and school staff. The user-facing workflow spans public course information and the student portal, enrollment, learner progress and payments, then staff operations for student records, scheduling, fleet, tuition, and reporting. Server-rendered dashboards authenticate users and retrieve Supabase data before passing it to client views; API routes provide separate auth and domain endpoints. Source excerpts establish several page-to-view and layout-to-component links, but most client/API and API/database interactions are not shown, so they are not asserted.
Main entry points: layout.jsx Root Layout · portal/page.jsx Student Portal · StudentDashboardClient.jsx Student Dashboard · instructor/page.jsx Instructor Page
Components 33
Public and Portal
- Public Site
web-app/src/app/page.jsx - Student Portal
web-app/src/app/portal/page.jsx
Learner and Instruction
- Student Dashboard
web-app/src/app/dashboard/student/StudentDashboardClient.jsx - Enrollment API
web-app/src/app/api/enroll/route.js - Progress API
web-app/src/app/api/progress/route.js - Instructor Page
web-app/src/app/dashboard/instructor/page.jsx - Instructor View
web-app/src/app/dashboard/instructor/InstructorClient.jsx
Staff Operations
- Student Records Page
web-app/src/app/dashboard/students/page.jsx - Student Records View
web-app/src/app/dashboard/students/StudentsClient.jsx - Operations Dashboard
web-app/src/app/dashboard/operations/page.jsx - Operations View
web-app/src/app/dashboard/operations/OperationsClient.jsx - Scheduling Page
web-app/src/app/dashboard/scheduling/page.jsx - Scheduling View
web-app/src/app/dashboard/scheduling/SchedulingClient.jsx - Fleet Management
web-app/src/app/dashboard/fleet/page.jsx - Tuition and Payments
web-app/src/app/dashboard/tuition/TuitionClient.jsx - Payments API
web-app/src/app/api/payments/route.js - Sessions API
web-app/src/app/api/sessions/route.js - Vehicles API
web-app/src/app/api/vehicles/route.js - Reports
web-app/src/app/dashboard/reports/page.jsx
Application Platform
- Authentication APIs
web-app/src/app/api/auth - Dashboard Stats API
web-app/src/app/api/dashboard/stats/route.js - Request Middleware
web-app/src/middleware.js - Supabase Client
web-app/src/utils/supabase/client.js - Supabase Server Client
web-app/src/utils/supabase/server.js - Supabase Middleware
web-app/src/utils/supabase/middleware.js - Global UI Components
web-app/src/app/components - Confirmation Dialog
web-app/src/app/components/ConfirmDialog.jsx - Data Protection Guard
web-app/src/app/components/DataProtectionGuard.jsx - Global Loader
web-app/src/app/components/GlobalLoader.jsx - Scroll Controls
web-app/src/app/components/ScrollControls.jsx - Root Layout
web-app/src/app/layout.jsx
Other components
- Visitor / Learner
- Supabase Service
Connections 12
- Visitor / Learner → Public Site: visits
- Visitor / Learner → Student Portal: opens portal
- Student Portal → Student Dashboard: serves learner
- Student Dashboard → Enrollment API: requests enrollment
web-app/src/app/dashboard/student/StudentDashboardClient.jsx - Instructor Page → Instructor View: renders
web-app/src/app/dashboard/instructor/page.jsx - Operations Dashboard → Operations View: renders
web-app/src/app/dashboard/operations/page.jsx - Scheduling Page → Scheduling View: renders
web-app/src/app/dashboard/scheduling/page.jsx - Student Records Page → Student Records View: renders
web-app/src/app/dashboard/students/page.jsx - Root Layout → Confirmation Dialog: renders
web-app/src/app/layout.jsx - Root Layout → Data Protection Guard: renders
web-app/src/app/layout.jsx - Root Layout → Global Loader: renders
web-app/src/app/layout.jsx - Root Layout → Scroll Controls: renders
web-app/src/app/layout.jsx