# dhnguyencs/classschedulingproject architecture

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

- Interactive diagram: https://gitdiagram.com/dhnguyencs/classschedulingproject
- Repository: https://github.com/dhnguyencs/classschedulingproject

## Overview

ClassSchedulingProject is a class-scheduling web application with an Electron client variant. The main workflow is users signing in, then retrieving or editing term-based course events and calendars; the controller persists scheduling and account data through Entity Framework. The data model also covers institutions, departments, programs, courses, rooms, sessions, and finalized calendars. The excerpts show controller-to-database operations, but not the browser’s request wiring or most calendar workflows, so those links are marked unverified or omitted.

Main entry points: [`ClassSchedulingProject/Controllers/HomeController.cs`](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Controllers/HomeController.cs) (Home controller), [`ClassSchedulingProject/data/ClassSchedulerDbContext.cs`](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/data/ClassSchedulerDbContext.cs) (EF database context), [`ClassSchedulingProjectElectron/root/js`](https://github.com/dhnguyencs/classschedulingproject/tree/main/ClassSchedulingProjectElectron/root/js) (Electron UI), [`ClassSchedulingProject/wwwroot/js`](https://github.com/dhnguyencs/classschedulingproject/tree/main/ClassSchedulingProject/wwwroot/js) (Web client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Client interfaces"]
  node_webui["Web client"]
  node_electron["Electron client"]
  node_electronui["Electron UI"]
end

subgraph group_web["Web application"]
  node_host["Web host<br/>[Program.cs]"]
  node_controller["Home controller<br/>[HomeController.cs]"]
end

subgraph group_scheduling["Scheduling domain"]
  node_events["Course events<br/>[ApiEvents.cs]"]
  node_course_templates["Course templates"]
  node_programs_departments["Programs and departments"]
  node_calendar["Calendar data<br/>[CalenderData.cs]"]
  node_finalized["Finalized calendars"]
  node_facilities["Buildings and rooms<br/>[Buildings.cs]"]
end

subgraph group_identity["Accounts and institutions"]
  node_accounts["User accounts<br/>[UserInformation.cs]"]
  node_sessions["Session tokens<br/>[SessionTokens.cs]"]
  node_institutions["Institution registry"]
  node_sessions_dates["Term dates<br/>[SessionDates.cs]"]
end

subgraph group_persistence["Persistence"]
  node_dbcontext["EF database context"]
  node_database[("SQL Server database")]
end

node_user(("Scheduler user"))

node_user -.->|"uses"| node_webui
node_webui -.->|"sends requests"| node_controller
node_user -.->|"uses"| node_electronui
node_electronui -.->|"sends requests"| node_controller
node_host -.->|"routes actions"| node_controller
node_controller -->|"queries and saves"| node_dbcontext
node_dbcontext -->|"maps and persists"| node_database
node_controller -->|"reads and writes"| node_events
node_controller -->|"creates templates"| node_course_templates
node_controller -->|"builds calendar data"| node_calendar
node_controller -->|"creates calendar"| node_finalized
node_controller -->|"looks up users"| node_accounts
node_controller -->|"creates sessions"| node_sessions
node_controller -->|"uses program data"| node_programs_departments
node_dbcontext -->|"maps entity"| node_institutions
node_dbcontext -->|"maps entities"| node_facilities
node_dbcontext -->|"maps entity"| node_sessions_dates
node_electron -.->|"hosts UI"| node_electronui

click node_webui "https://github.com/dhnguyencs/classschedulingproject/tree/main/ClassSchedulingProject/wwwroot/js"
click node_electron "https://github.com/dhnguyencs/classschedulingproject/tree/main/ClassSchedulingProjectElectron"
click node_electronui "https://github.com/dhnguyencs/classschedulingproject/tree/main/ClassSchedulingProjectElectron/root/js"
click node_host "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Program.cs"
click node_controller "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Controllers/HomeController.cs"
click node_events "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/ApiEvents.cs"
click node_course_templates "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/CourseOfferingsTemplates.cs"
click node_programs_departments "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/ProgramOfferings.cs"
click node_calendar "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/HelperClasses/CalenderData.cs"
click node_finalized "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/FinalizedCalendar.cs"
click node_facilities "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/Buildings.cs"
click node_accounts "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/UserInformation.cs"
click node_sessions "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/SessionTokens.cs"
click node_institutions "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/InstitutionsRegistry.cs"
click node_sessions_dates "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/SessionDates.cs"
click node_dbcontext "https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/data/ClassSchedulerDbContext.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_webui,node_electron,node_electronui toneBlue
class node_host,node_controller toneAmber
class node_events,node_course_templates,node_programs_departments,node_calendar,node_finalized,node_facilities toneMint
class node_accounts,node_sessions,node_institutions,node_sessions_dates,node_user toneRose
class node_dbcontext,node_database toneIndigo
```

## Components

### Client interfaces

- [Web client](https://github.com/dhnguyencs/classschedulingproject/tree/main/ClassSchedulingProject/wwwroot/js): `ClassSchedulingProject/wwwroot/js`
- [Electron client](https://github.com/dhnguyencs/classschedulingproject/tree/main/ClassSchedulingProjectElectron): `ClassSchedulingProjectElectron`
- [Electron UI](https://github.com/dhnguyencs/classschedulingproject/tree/main/ClassSchedulingProjectElectron/root/js): `ClassSchedulingProjectElectron/root/js`

### Web application

- [Web host](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Program.cs): `ClassSchedulingProject/Program.cs`
- [Home controller](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Controllers/HomeController.cs): `ClassSchedulingProject/Controllers/HomeController.cs`

### Scheduling domain

- [Course events](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/ApiEvents.cs): `ClassSchedulingProject/Models/ApiEvents.cs`
- [Course templates](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/CourseOfferingsTemplates.cs): `ClassSchedulingProject/Models/CourseOfferingsTemplates.cs`
- [Programs and departments](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/ProgramOfferings.cs): `ClassSchedulingProject/Models/ProgramOfferings.cs`
- [Calendar data](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/HelperClasses/CalenderData.cs): `ClassSchedulingProject/Models/HelperClasses/CalenderData.cs`
- [Finalized calendars](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/FinalizedCalendar.cs): `ClassSchedulingProject/Models/FinalizedCalendar.cs`
- [Buildings and rooms](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/Buildings.cs): `ClassSchedulingProject/Models/Buildings.cs`

### Accounts and institutions

- [User accounts](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/UserInformation.cs): `ClassSchedulingProject/Models/UserInformation.cs`
- [Session tokens](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/SessionTokens.cs): `ClassSchedulingProject/Models/SessionTokens.cs`
- [Institution registry](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/InstitutionsRegistry.cs): `ClassSchedulingProject/Models/InstitutionsRegistry.cs`
- [Term dates](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/Models/SessionDates.cs): `ClassSchedulingProject/Models/SessionDates.cs`

### Persistence

- [EF database context](https://github.com/dhnguyencs/classschedulingproject/blob/main/ClassSchedulingProject/data/ClassSchedulerDbContext.cs): `ClassSchedulingProject/data/ClassSchedulerDbContext.cs`
- **SQL Server database**

### Other components

- **Scheduler user**

## Connections

- Scheduler user → Web client: uses
- Web client → Home controller: sends requests
- Scheduler user → Electron UI: uses
- Electron UI → Home controller: sends requests
- Web host → Home controller: routes actions
- Home controller → EF database context: queries and saves (evidence: `ClassSchedulingProject/Controllers/HomeController.cs`)
- EF database context → SQL Server database: maps and persists (evidence: `ClassSchedulingProject/data/ClassSchedulerDbContext.cs`)
- Home controller → Course events: reads and writes (evidence: `ClassSchedulingProject/Controllers/HomeController.cs`)
- Home controller → Course templates: creates templates (evidence: `ClassSchedulingProject/Controllers/HomeController.cs`)
- Home controller → Calendar data: builds calendar data (evidence: `ClassSchedulingProject/Controllers/HomeController.cs`)
- Home controller → Finalized calendars: creates calendar (evidence: `ClassSchedulingProject/Controllers/HomeController.cs`)
- Home controller → User accounts: looks up users (evidence: `ClassSchedulingProject/Controllers/HomeController.cs`)
- Home controller → Session tokens: creates sessions (evidence: `ClassSchedulingProject/Controllers/HomeController.cs`)
- Home controller → Programs and departments: uses program data (evidence: `ClassSchedulingProject/Controllers/HomeController.cs`)
- EF database context → Institution registry: maps entity (evidence: `ClassSchedulingProject/data/ClassSchedulerDbContext.cs`)
- EF database context → Buildings and rooms: maps entities (evidence: `ClassSchedulingProject/data/ClassSchedulerDbContext.cs`)
- EF database context → Term dates: maps entity (evidence: `ClassSchedulingProject/data/ClassSchedulerDbContext.cs`)
- Electron client → Electron UI: hosts UI
