# vidura2/driving-school-system architecture

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

- Interactive diagram: https://gitdiagram.com/vidura2/driving-school-system
- Repository: https://github.com/vidura2/driving-school-system

## Overview

This is a small Java servlet web app for driving-school registration, account access, lesson scheduling, reviews, and administrative management. Its principal workflow is student registration or login, followed by scheduling a lesson or submitting a review; administrators can inspect and manage users, lessons, and reviews. Sampled servlets persist comma-separated records in local text files, while JSPs provide the UI. The README is a generic Java workspace guide, and unsampled JSP wiring and logout behavior are not inferred.

Main entry points: [`src/com/drivingschool/servlets/LoginServlet.java`](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/LoginServlet.java) (Login handler), [`src/com/drivingschool/model/Student.java`](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/model/Student.java) (Student model), [`src/com/drivingschool/servlets/UserRegistrationServlet.java`](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/UserRegistrationServlet.java) (Registration handler), [`src/com/drivingschool/servlets/LessonServlet.java`](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/LessonServlet.java) (Lesson handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_jsp_register["Registration page<br/>[register.jsp]"]
  node_jsp_login["Login page<br/>[login.jsp]"]
  node_jsp_schedule["Schedule lesson page<br/>[scheduleLesson.jsp]"]
  node_jsp_review["Review page<br/>[review.jsp]"]
  node_jsp_student["Student dashboard"]
  node_jsp_admin["Admin dashboard<br/>[adminDashboard.jsp]"]
  node_jsp_details["User details page<br/>[userDetails.jsp]"]
end

subgraph group_flows["Request handling"]
  node_register["Registration handler"]
  node_login["Login handler<br/>[LoginServlet.java]"]
  node_lesson["Lesson handler<br/>[LessonServlet.java]"]
  node_review["Review handler<br/>[ReviewServlet.java]"]
  node_admin["Admin handler<br/>[AdminServlet.java]"]
  node_logout["Logout handler<br/>[LogoutServlet.java]"]
end

subgraph group_domain["Domain models"]
  node_user_model["User model<br/>[User.java]"]
  node_student_model["Student model<br/>[Student.java]"]
  node_lesson_model["Lesson model<br/>[Lesson.java]"]
  node_review_model["Review model<br/>[Review.java]"]
end

subgraph group_state["Persistence and notifications"]
  node_files[("Text-file records")]
  node_email["Email utility<br/>[EmailUtil.java]"]
end

node_student(("Student"))
node_admin_actor(("Administrator"))

node_student -->|"opens"| node_jsp_register
node_student -->|"opens"| node_jsp_login
node_student -->|"opens"| node_jsp_schedule
node_student -->|"opens"| node_jsp_review
node_admin_actor -->|"opens"| node_jsp_login
node_admin_actor -->|"uses"| node_jsp_admin
node_jsp_register -->|"submits"| node_register
node_jsp_login -->|"submits"| node_login
node_jsp_schedule -->|"submits"| node_lesson
node_jsp_review -->|"submits"| node_review
node_register -->|"creates"| node_student_model
node_register -->|"appends user"| node_files
node_register -->|"calls"| node_email
node_register -->|"redirects"| node_jsp_register
node_login -->|"reads users"| node_files
node_login -->|"creates"| node_user_model
node_login -->|"redirects admin"| node_jsp_admin
node_login -->|"redirects student"| node_jsp_student
node_login -->|"redirects failure"| node_jsp_login
node_lesson -->|"creates"| node_student_model
node_lesson -->|"creates"| node_lesson_model
node_lesson -->|"appends lesson"| node_files
node_lesson -->|"redirects"| node_jsp_student
node_review -->|"creates"| node_student_model
node_review -->|"creates"| node_review_model
node_review -->|"appends review"| node_files
node_review -->|"redirects"| node_jsp_student
node_admin -->|"reads and updates"| node_files
node_admin -->|"creates"| node_user_model
node_admin -->|"forwards"| node_jsp_admin
node_admin -->|"forwards"| node_jsp_details
node_logout -->|"redirects"| node_jsp_login
node_student_model -->|"extends"| node_user_model
node_lesson_model -->|"references"| node_student_model
node_review_model -->|"references"| node_student_model

click node_jsp_register "https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/register.jsp"
click node_jsp_login "https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/login.jsp"
click node_jsp_schedule "https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/scheduleLesson.jsp"
click node_jsp_review "https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/review.jsp"
click node_jsp_student "https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/studentDashboard.jsp"
click node_jsp_admin "https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/adminDashboard.jsp"
click node_jsp_details "https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/userDetails.jsp"
click node_register "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/UserRegistrationServlet.java"
click node_login "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/LoginServlet.java"
click node_lesson "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/LessonServlet.java"
click node_review "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/ReviewServlet.java"
click node_admin "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/AdminServlet.java"
click node_logout "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/LogoutServlet.java"
click node_user_model "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/model/User.java"
click node_student_model "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/model/Student.java"
click node_lesson_model "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/model/Lesson.java"
click node_review_model "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/model/Review.java"
click node_email "https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/util/EmailUtil.java"

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_jsp_register,node_jsp_login,node_jsp_schedule,node_jsp_review,node_jsp_student,node_jsp_admin,node_jsp_details toneBlue
class node_register,node_login,node_lesson,node_review,node_admin,node_logout toneAmber
class node_user_model,node_student_model,node_lesson_model,node_review_model toneMint
class node_files,node_email toneRose
class node_student,node_admin_actor toneIndigo
```

## Components

### Web interface

- [Registration page](https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/register.jsp): `src/com/webapp/jsp/register.jsp`
- [Login page](https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/login.jsp): `src/com/webapp/jsp/login.jsp`
- [Schedule lesson page](https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/scheduleLesson.jsp): `src/com/webapp/jsp/scheduleLesson.jsp`
- [Review page](https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/review.jsp): `src/com/webapp/jsp/review.jsp`
- [Student dashboard](https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/studentDashboard.jsp): `src/com/webapp/jsp/studentDashboard.jsp`
- [Admin dashboard](https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/adminDashboard.jsp): `src/com/webapp/jsp/adminDashboard.jsp`
- [User details page](https://github.com/vidura2/driving-school-system/blob/main/src/com/webapp/jsp/userDetails.jsp): `src/com/webapp/jsp/userDetails.jsp`

### Request handling

- [Registration handler](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/UserRegistrationServlet.java): `src/com/drivingschool/servlets/UserRegistrationServlet.java`
- [Login handler](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/LoginServlet.java): `src/com/drivingschool/servlets/LoginServlet.java`
- [Lesson handler](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/LessonServlet.java): `src/com/drivingschool/servlets/LessonServlet.java`
- [Review handler](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/ReviewServlet.java): `src/com/drivingschool/servlets/ReviewServlet.java`
- [Admin handler](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/AdminServlet.java): `src/com/drivingschool/servlets/AdminServlet.java`
- [Logout handler](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/servlets/LogoutServlet.java): `src/com/drivingschool/servlets/LogoutServlet.java`

### Domain models

- [User model](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/model/User.java): `src/com/drivingschool/model/User.java`
- [Student model](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/model/Student.java): `src/com/drivingschool/model/Student.java`
- [Lesson model](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/model/Lesson.java): `src/com/drivingschool/model/Lesson.java`
- [Review model](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/model/Review.java): `src/com/drivingschool/model/Review.java`

### Persistence and notifications

- **Text-file records**
- [Email utility](https://github.com/vidura2/driving-school-system/blob/main/src/com/drivingschool/util/EmailUtil.java): `src/com/drivingschool/util/EmailUtil.java`

### Other components

- **Student**
- **Administrator**

## Connections

- Student → Registration page: opens
- Student → Login page: opens
- Student → Schedule lesson page: opens
- Student → Review page: opens
- Administrator → Login page: opens
- Administrator → Admin dashboard: uses
- Registration page → Registration handler: submits
- Login page → Login handler: submits
- Schedule lesson page → Lesson handler: submits
- Review page → Review handler: submits
- Registration handler → Student model: creates
- Registration handler → Text-file records: appends user
- Registration handler → Email utility: calls
- Registration handler → Registration page: redirects
- Login handler → Text-file records: reads users
- Login handler → User model: creates
- Login handler → Admin dashboard: redirects admin
- Login handler → Student dashboard: redirects student
- Login handler → Login page: redirects failure
- Lesson handler → Student model: creates
- Lesson handler → Lesson model: creates
- Lesson handler → Text-file records: appends lesson
- Lesson handler → Student dashboard: redirects
- Review handler → Student model: creates
- Review handler → Review model: creates
- Review handler → Text-file records: appends review
- Review handler → Student dashboard: redirects
- Admin handler → Text-file records: reads and updates
- Admin handler → User model: creates
- Admin handler → Admin dashboard: forwards
- Admin handler → User details page: forwards
- Logout handler → Login page: redirects
- Student model → User model: extends
- Lesson model → Student model: references
- Review model → Student model: references
