# taurus0519/intro2driving-system architecture

> Architecture diagram of the GitHub repository taurus0519/intro2driving-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/taurus0519/intro2driving-system
- Repository: https://github.com/taurus0519/intro2driving-system

## Overview

This is a driving-school learning portal: users sign in, then students access quizzes, progress, achievements, profiles, messages, and the practical-driving checklist; staff additionally manage learners and review results. The graph emphasizes the routed UI, Supabase-backed features, and server-side account and reporting functions. README documents additional quiz chapters/images, message attachments, and achievement/PDC capabilities beyond the sampled implementation; those are represented at their existing feature paths. Several feature-to-service details are unsampled, so unverified links are omitted.

Main entry points: [`src/jsx/App.jsx`](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/App.jsx) (App routing), [`src/jsx/supabase_Client.jsx`](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/supabase_Client.jsx) (Supabase client), [`src/jsx/Dashboard.jsx`](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Dashboard.jsx) (Dashboard), [`src/jsx/Profile.jsx`](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Profile.jsx) (Profile management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_app["App routing<br/>[App.jsx]"]
  node_auth["Authentication<br/>[useAunth.jsx]"]
  node_login["Login and recovery<br/>[Loginpage.jsx]"]
  node_landing["Landing page<br/>[LandingPage.jsx]"]
end

subgraph group_learning["Learning and progress"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_calendar["Course calendar<br/>[Calendar.jsx]"]
  node_quiz["Quizzes and lessons<br/>[lessons.jsx]"]
  node_stats["Score aggregation<br/>[learningStats.mjs]"]
  node_charts["Success-rate charts"]
  node_achievements["Achievement tracking<br/>[Achievements.jsx]"]
  node_achievement_data["Achievement catalog<br/>[achievementData.js]"]
end

subgraph group_student["Student services"]
  node_students["Student administration<br/>[Students.jsx]"]
  node_student_details["Student detail view<br/>[StudentDetails.jsx]"]
  node_profile["Profile management<br/>[Profile.jsx]"]
  node_identity["Profile identity rules"]
  node_staff_profile["Staff profile data<br/>[staffProfile.mjs]"]
  node_pdc["Practical driving checklist<br/>[PdcChecklist.jsx]"]
  node_pdc_data["Checklist definitions"]
  node_pdc_pdf["Checklist PDF export"]
  node_messages["Messaging<br/>[messages.jsx]"]
  node_assignments["Assignments<br/>[assignments.jsx]"]
end

subgraph group_backend["Server and data"]
  node_supabase_client["Supabase client"]
  node_server["Local API server<br/>[index.mjs]"]
  node_account_api["Account creation<br/>[create-account.js]"]
  node_delete_api["Student deletion<br/>[delete-account.mjs]"]
  node_recipients_api["Message recipients"]
  node_age_api["Age distribution"]
  node_achievement_api["Achievement progress API"]
  node_details_api["Student details API"]
  node_attempt_api["Quiz attempts API"]
end

node_visitor(("Portal user"))
node_supabase[("Supabase services")]

node_visitor -->|"opens portal"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_login
node_app -->|"provides auth"| node_auth
node_auth -->|"uses client"| node_supabase_client
node_supabase_client -->|"connects to"| node_supabase
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_students
node_app -->|"routes to"| node_student_details
node_app -->|"routes to"| node_quiz
node_app -->|"routes to"| node_achievements
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_pdc
node_app -->|"routes to"| node_messages
node_app -->|"routes to"| node_assignments
node_dashboard -->|"renders"| node_calendar
node_dashboard -->|"renders"| node_charts
node_dashboard -->|"uses aggregation"| node_stats
node_charts -->|"summarizes scores"| node_stats
node_dashboard -->|"reads catalog"| node_achievement_data
node_achievements -->|"reads catalog"| node_achievement_data
node_dashboard -->|"queries progress"| node_supabase_client
node_students -->|"queries learners"| node_supabase_client
node_student_details -->|"loads records"| node_supabase_client
node_profile -->|"updates identity"| node_identity
node_profile -->|"loads staff data"| node_staff_profile
node_profile -->|"saves profile"| node_supabase_client
node_pdc -->|"uses definitions"| node_pdc_data
node_pdc -->|"creates PDF"| node_pdc_pdf
node_pdc -->|"reads and saves"| node_supabase_client
node_messages -->|"uses client"| node_supabase_client
node_assignments -->|"uses client"| node_supabase_client
node_server -->|"routes request"| node_details_api
node_server -->|"routes request"| node_attempt_api
node_details_api -->|"paginates results"| node_stats
node_details_api -->|"reads student data"| node_supabase
node_attempt_api -->|"uses pagination"| node_stats
node_attempt_api -->|"reads attempts"| node_supabase
node_server -->|"manages accounts"| node_supabase
node_account_api -.->|"creates accounts"| node_supabase
node_delete_api -.->|"deletes students"| node_supabase
node_recipients_api -.->|"loads recipients"| node_supabase
node_age_api -.->|"calculates distribution"| node_supabase
node_achievement_api -.->|"serves progress"| node_supabase
node_messages -.->|"fetches recipients"| node_recipients_api
node_students -.->|"loads completion"| node_achievement_api

click node_app "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/App.jsx"
click node_auth "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/useAunth.jsx"
click node_login "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Loginpage.jsx"
click node_landing "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/LandingPage.jsx"
click node_dashboard "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Dashboard.jsx"
click node_calendar "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Calendar.jsx"
click node_quiz "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/lessons.jsx"
click node_stats "https://github.com/taurus0519/intro2driving-system/blob/main/src/js/learningStats.mjs"
click node_charts "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/SuccessRateCharts.jsx"
click node_achievements "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Achievements.jsx"
click node_achievement_data "https://github.com/taurus0519/intro2driving-system/blob/main/src/js/achievementData.js"
click node_students "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Students.jsx"
click node_student_details "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/StudentDetails.jsx"
click node_profile "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Profile.jsx"
click node_identity "https://github.com/taurus0519/intro2driving-system/blob/main/src/js/profileIdentity.mjs"
click node_staff_profile "https://github.com/taurus0519/intro2driving-system/blob/main/src/js/staffProfile.mjs"
click node_pdc "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/PdcChecklist.jsx"
click node_pdc_data "https://github.com/taurus0519/intro2driving-system/blob/main/src/js/pdcChecklistData.js"
click node_pdc_pdf "https://github.com/taurus0519/intro2driving-system/blob/main/src/js/pdcChecklistPdf.mjs"
click node_messages "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/messages.jsx"
click node_assignments "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/assignments.jsx"
click node_supabase_client "https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/supabase_Client.jsx"
click node_server "https://github.com/taurus0519/intro2driving-system/blob/main/server/index.mjs"
click node_account_api "https://github.com/taurus0519/intro2driving-system/blob/main/api/create-account.js"
click node_delete_api "https://github.com/taurus0519/intro2driving-system/blob/main/api/delete-account.mjs"
click node_recipients_api "https://github.com/taurus0519/intro2driving-system/blob/main/api/message-recipients.js"
click node_age_api "https://github.com/taurus0519/intro2driving-system/blob/main/api/student-age-distribution.mjs"
click node_achievement_api "https://github.com/taurus0519/intro2driving-system/blob/main/api/achievement-progress.mjs"
click node_details_api "https://github.com/taurus0519/intro2driving-system/blob/main/api/student-details.mjs"
click node_attempt_api "https://github.com/taurus0519/intro2driving-system/blob/main/api/student-quiz-attempts.mjs"

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_app,node_auth,node_login,node_landing,node_visitor toneBlue
class node_dashboard,node_calendar,node_quiz,node_stats,node_charts,node_achievements,node_achievement_data,node_supabase toneAmber
class node_students,node_student_details,node_profile,node_identity,node_staff_profile,node_pdc,node_pdc_data,node_pdc_pdf,node_messages,node_assignments toneMint
class node_supabase_client,node_server,node_account_api,node_delete_api,node_recipients_api,node_age_api,node_achievement_api,node_details_api,node_attempt_api toneRose
```

## Components

### Access and navigation

- [App routing](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/App.jsx): `src/jsx/App.jsx`
- [Authentication](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/useAunth.jsx): `src/jsx/useAunth.jsx`
- [Login and recovery](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Loginpage.jsx): `src/jsx/Loginpage.jsx`
- [Landing page](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/LandingPage.jsx): `src/jsx/LandingPage.jsx`

### Learning and progress

- [Dashboard](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Dashboard.jsx): `src/jsx/Dashboard.jsx`
- [Course calendar](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Calendar.jsx): `src/jsx/Calendar.jsx`
- [Quizzes and lessons](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/lessons.jsx): `src/jsx/lessons.jsx`
- [Score aggregation](https://github.com/taurus0519/intro2driving-system/blob/main/src/js/learningStats.mjs): `src/js/learningStats.mjs`
- [Success-rate charts](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/SuccessRateCharts.jsx): `src/jsx/SuccessRateCharts.jsx`
- [Achievement tracking](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Achievements.jsx): `src/jsx/Achievements.jsx`
- [Achievement catalog](https://github.com/taurus0519/intro2driving-system/blob/main/src/js/achievementData.js): `src/js/achievementData.js`

### Student services

- [Student administration](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Students.jsx): `src/jsx/Students.jsx`
- [Student detail view](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/StudentDetails.jsx): `src/jsx/StudentDetails.jsx`
- [Profile management](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/Profile.jsx): `src/jsx/Profile.jsx`
- [Profile identity rules](https://github.com/taurus0519/intro2driving-system/blob/main/src/js/profileIdentity.mjs): `src/js/profileIdentity.mjs`
- [Staff profile data](https://github.com/taurus0519/intro2driving-system/blob/main/src/js/staffProfile.mjs): `src/js/staffProfile.mjs`
- [Practical driving checklist](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/PdcChecklist.jsx): `src/jsx/PdcChecklist.jsx`
- [Checklist definitions](https://github.com/taurus0519/intro2driving-system/blob/main/src/js/pdcChecklistData.js): `src/js/pdcChecklistData.js`
- [Checklist PDF export](https://github.com/taurus0519/intro2driving-system/blob/main/src/js/pdcChecklistPdf.mjs): `src/js/pdcChecklistPdf.mjs`
- [Messaging](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/messages.jsx): `src/jsx/messages.jsx`
- [Assignments](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/assignments.jsx): `src/jsx/assignments.jsx`

### Server and data

- [Supabase client](https://github.com/taurus0519/intro2driving-system/blob/main/src/jsx/supabase_Client.jsx): `src/jsx/supabase_Client.jsx`
- [Local API server](https://github.com/taurus0519/intro2driving-system/blob/main/server/index.mjs): `server/index.mjs`
- [Account creation](https://github.com/taurus0519/intro2driving-system/blob/main/api/create-account.js): `api/create-account.js`
- [Student deletion](https://github.com/taurus0519/intro2driving-system/blob/main/api/delete-account.mjs): `api/delete-account.mjs`
- [Message recipients](https://github.com/taurus0519/intro2driving-system/blob/main/api/message-recipients.js): `api/message-recipients.js`
- [Age distribution](https://github.com/taurus0519/intro2driving-system/blob/main/api/student-age-distribution.mjs): `api/student-age-distribution.mjs`
- [Achievement progress API](https://github.com/taurus0519/intro2driving-system/blob/main/api/achievement-progress.mjs): `api/achievement-progress.mjs`
- [Student details API](https://github.com/taurus0519/intro2driving-system/blob/main/api/student-details.mjs): `api/student-details.mjs`
- [Quiz attempts API](https://github.com/taurus0519/intro2driving-system/blob/main/api/student-quiz-attempts.mjs): `api/student-quiz-attempts.mjs`

### Other components

- **Portal user**
- **Supabase services**

## Connections

- Portal user → App routing: opens portal (evidence: `src/jsx/App.jsx`)
- App routing → Landing page: routes to (evidence: `src/jsx/App.jsx`)
- App routing → Login and recovery: routes to (evidence: `src/jsx/App.jsx`)
- App routing → Authentication: provides auth (evidence: `src/jsx/App.jsx`)
- Authentication → Supabase client: uses client (evidence: `src/jsx/useAunth.jsx`)
- Supabase client → Supabase services: connects to (evidence: `src/jsx/supabase_Client.jsx`)
- App routing → Dashboard: routes to (evidence: `src/jsx/App.jsx`)
- App routing → Student administration: routes to (evidence: `src/jsx/App.jsx`)
- App routing → Student detail view: routes to (evidence: `src/jsx/App.jsx`)
- App routing → Quizzes and lessons: routes to (evidence: `src/jsx/App.jsx`)
- App routing → Achievement tracking: routes to (evidence: `src/jsx/App.jsx`)
- App routing → Profile management: routes to (evidence: `src/jsx/App.jsx`)
- App routing → Practical driving checklist: routes to (evidence: `src/jsx/App.jsx`)
- App routing → Messaging: routes to (evidence: `src/jsx/App.jsx`)
- App routing → Assignments: routes to (evidence: `src/jsx/App.jsx`)
- Dashboard → Course calendar: renders (evidence: `src/jsx/Dashboard.jsx`)
- Dashboard → Success-rate charts: renders (evidence: `src/jsx/Dashboard.jsx`)
- Dashboard → Score aggregation: uses aggregation (evidence: `src/jsx/Dashboard.jsx`)
- Success-rate charts → Score aggregation: summarizes scores (evidence: `src/jsx/SuccessRateCharts.jsx`)
- Dashboard → Achievement catalog: reads catalog (evidence: `src/jsx/Dashboard.jsx`)
- Achievement tracking → Achievement catalog: reads catalog (evidence: `src/jsx/Achievements.jsx`)
- Dashboard → Supabase client: queries progress (evidence: `src/jsx/Dashboard.jsx`)
- Student administration → Supabase client: queries learners (evidence: `src/jsx/Students.jsx`)
- Student detail view → Supabase client: loads records (evidence: `src/jsx/StudentDetails.jsx`)
- Profile management → Profile identity rules: updates identity (evidence: `src/jsx/Profile.jsx`)
- Profile management → Staff profile data: loads staff data (evidence: `src/jsx/Profile.jsx`)
- Profile management → Supabase client: saves profile (evidence: `src/jsx/Profile.jsx`)
- Practical driving checklist → Checklist definitions: uses definitions (evidence: `src/jsx/PdcChecklist.jsx`)
- Practical driving checklist → Checklist PDF export: creates PDF (evidence: `src/jsx/PdcChecklist.jsx`)
- Practical driving checklist → Supabase client: reads and saves (evidence: `src/jsx/PdcChecklist.jsx`)
- Messaging → Supabase client: uses client (evidence: `src/jsx/messages.jsx`)
- Assignments → Supabase client: uses client (evidence: `src/jsx/assignments.jsx`)
- Local API server → Student details API: routes request (evidence: `server/index.mjs`)
- Local API server → Quiz attempts API: routes request (evidence: `server/index.mjs`)
- Student details API → Score aggregation: paginates results (evidence: `api/student-details.mjs`)
- Student details API → Supabase services: reads student data (evidence: `api/student-details.mjs`)
- Quiz attempts API → Score aggregation: uses pagination (evidence: `api/student-quiz-attempts.mjs`)
- Quiz attempts API → Supabase services: reads attempts (evidence: `api/student-quiz-attempts.mjs`)
- Local API server → Supabase services: manages accounts (evidence: `server/index.mjs`)
- Account creation → Supabase services: creates accounts (evidence: `README.md`)
- Student deletion → Supabase services: deletes students (evidence: `README.md`)
- Message recipients → Supabase services: loads recipients (evidence: `README.md`)
- Age distribution → Supabase services: calculates distribution (evidence: `README.md`)
- Achievement progress API → Supabase services: serves progress (evidence: `README.md`)
- Messaging → Message recipients: fetches recipients (evidence: `README.md`)
- Student administration → Achievement progress API: loads completion (evidence: `README.md`)
