# ajbarnes20/school_clearance architecture

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

- Interactive diagram: https://gitdiagram.com/ajbarnes20/school_clearance
- Repository: https://github.com/ajbarnes20/school_clearance

## Overview

School Clearance is an ASP.NET Core MVC application for managing student clearance workflows, with role-specific admin, instructor, staff, and student surfaces plus account access and notifications. The principal path is a user entering through the MVC app, reaching a role controller, and having the controller read or update MySQL-backed clearance and academic data; login and recovery can also send email. Controller excerpts and the source index support the database and email dependencies, but omitted action bodies limit detail about individual clearance transitions and view wiring.

Main entry points: [`Models/DbHelper.cs`](https://github.com/ajbarnes20/school_clearance/blob/main/Models/DbHelper.cs) (Connection helper), [`Program.cs`](https://github.com/ajbarnes20/school_clearance/blob/main/Program.cs) (MVC application), [`Controllers/HomeController.cs`](https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/HomeController.cs) (Account access), [`Data/ApplicationDbContext.cs`](https://github.com/ajbarnes20/school_clearance/blob/main/Data/ApplicationDbContext.cs) (EF data context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry"]
  node_app["MVC application<br/>[Program.cs]"]
end

subgraph group_workflows["Role workflows"]
  node_home["Account access<br/>[HomeController.cs]"]
  node_admin["Administration<br/>[AdminController.cs]"]
  node_student["Student clearance"]
  node_instructor["Instructor review"]
  node_staff["Staff clearance<br/>[StaffController.cs]"]
  node_notifications["Notifications"]
end

subgraph group_persistence["Persistence"]
  node_domainmodels["Domain models"]
  node_dbhelper["Connection helper<br/>[DbHelper.cs]"]
  node_efcontext["EF data context"]
  node_mysql[("MySQL database")]
end

subgraph group_messaging["Messaging"]
  node_emailservice["Email service<br/>[EmailService.cs]"]
  node_smtp["SMTP server"]
end

node_visitor(("User"))

node_visitor -.->|"uses"| node_app
node_app -->|"routes"| node_home
node_app -->|"configures"| node_efcontext
node_app -->|"registers"| node_emailservice
node_home -->|"opens connection"| node_dbhelper
node_admin -->|"opens connection"| node_dbhelper
node_student -->|"opens connection"| node_dbhelper
node_instructor -->|"opens connection"| node_dbhelper
node_staff -->|"opens connection"| node_dbhelper
node_notifications -->|"opens connection"| node_dbhelper
node_admin -->|"queries users"| node_efcontext
node_dbhelper -->|"creates connection"| node_mysql
node_efcontext -.->|"maps entities"| node_mysql
node_home -->|"sends email"| node_emailservice
node_emailservice -->|"sends message"| node_smtp

click node_app "https://github.com/ajbarnes20/school_clearance/blob/main/Program.cs"
click node_home "https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/HomeController.cs"
click node_admin "https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/AdminController.cs"
click node_student "https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/StudentController.cs"
click node_instructor "https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/InstructorController.cs"
click node_staff "https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/StaffController.cs"
click node_notifications "https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/NotificationController.cs"
click node_domainmodels "https://github.com/ajbarnes20/school_clearance/tree/main/Models"
click node_dbhelper "https://github.com/ajbarnes20/school_clearance/blob/main/Models/DbHelper.cs"
click node_efcontext "https://github.com/ajbarnes20/school_clearance/blob/main/Data/ApplicationDbContext.cs"
click node_emailservice "https://github.com/ajbarnes20/school_clearance/blob/main/Data/EmailService.cs"

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_visitor toneBlue
class node_home,node_admin,node_student,node_instructor,node_staff,node_notifications toneAmber
class node_domainmodels,node_dbhelper,node_efcontext,node_mysql toneMint
class node_emailservice,node_smtp toneRose
```

## Components

### Web entry

- [MVC application](https://github.com/ajbarnes20/school_clearance/blob/main/Program.cs): `Program.cs`

### Role workflows

- [Account access](https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/HomeController.cs): `Controllers/HomeController.cs`
- [Administration](https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/AdminController.cs): `Controllers/AdminController.cs`
- [Student clearance](https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/StudentController.cs): `Controllers/StudentController.cs`
- [Instructor review](https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/InstructorController.cs): `Controllers/InstructorController.cs`
- [Staff clearance](https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/StaffController.cs): `Controllers/StaffController.cs`
- [Notifications](https://github.com/ajbarnes20/school_clearance/blob/main/Controllers/NotificationController.cs): `Controllers/NotificationController.cs`

### Persistence

- [Domain models](https://github.com/ajbarnes20/school_clearance/tree/main/Models): `Models`
- [Connection helper](https://github.com/ajbarnes20/school_clearance/blob/main/Models/DbHelper.cs): `Models/DbHelper.cs`
- [EF data context](https://github.com/ajbarnes20/school_clearance/blob/main/Data/ApplicationDbContext.cs): `Data/ApplicationDbContext.cs`
- **MySQL database**

### Messaging

- [Email service](https://github.com/ajbarnes20/school_clearance/blob/main/Data/EmailService.cs): `Data/EmailService.cs`
- **SMTP server**

### Other components

- **User**

## Connections

- User → MVC application: uses (evidence: `README.md`)
- MVC application → Account access: routes (evidence: `Program.cs`)
- MVC application → EF data context: configures (evidence: `Program.cs`)
- MVC application → Email service: registers (evidence: `Program.cs`)
- Account access → Connection helper: opens connection (evidence: `Controllers/HomeController.cs`)
- Administration → Connection helper: opens connection (evidence: `Controllers/AdminController.cs`)
- Student clearance → Connection helper: opens connection (evidence: `Controllers/StudentController.cs`)
- Instructor review → Connection helper: opens connection (evidence: `Controllers/InstructorController.cs`)
- Staff clearance → Connection helper: opens connection (evidence: `Controllers/StaffController.cs`)
- Notifications → Connection helper: opens connection (evidence: `Controllers/NotificationController.cs`)
- Administration → EF data context: queries users (evidence: `Controllers/AdminController.cs`)
- Connection helper → MySQL database: creates connection (evidence: `Models/DbHelper.cs`)
- EF data context → MySQL database: maps entities
- Account access → Email service: sends email (evidence: `Controllers/HomeController.cs`)
- Email service → SMTP server: sends message (evidence: `Data/EmailService.cs`)
