# gveluchamy/ics2 architecture

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

- Interactive diagram: https://gitdiagram.com/gveluchamy/ics2
- Repository: https://github.com/gveluchamy/ics2

## Overview

ICSLockers is an ASP.NET locker-management application with role-based accounts and administration of locations, divisions, lockers, users, and guardian records. The main workflow is account login or registration, followed by staff/admin actions to manage locker inventory and review dashboard or user-report data. Controllers coordinate repositories and direct database operations; repositories and Identity handle account and administrative operations over the EF context. The tree also shows staff and reporting browser scripts, but their server-side wiring is not established by the sampled excerpts.

Main entry points: [`ICSLockers/Controllers/AdminController.cs`](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Controllers/AdminController.cs) (Admin endpoints), [`ICSLockers/Data/ApplicationDbContext.cs`](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Data/ApplicationDbContext.cs) (EF and Identity store), [`ICSLockers/Repository/AdminRepository.cs`](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Repository/AdminRepository.cs) (Admin operations), [`ICSLockers/Repository/AccountManager.cs`](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Repository/AccountManager.cs) (Account and Identity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Accounts and access"]
  node_account_controller["Account endpoints"]
  node_account_contract["Account contract<br/>[IAccountManager.cs]"]
  node_account_manager["Account and Identity<br/>[AccountManager.cs]"]
  node_account_helper["Password helper<br/>[AccountHelper.cs]"]
  node_home_controller["Home endpoints<br/>[HomeController.cs]"]
end

subgraph group_management["Locker administration"]
  node_admin_controller["Admin endpoints<br/>[AdminController.cs]"]
  node_admin_contract["Admin contract"]
  node_admin_repository["Admin operations<br/>[AdminRepository.cs]"]
  node_staff_controller["Staff endpoints<br/>[StaffController.cs]"]
end

subgraph group_persistence["Data and domain"]
  node_db[("EF and Identity store")]
  node_user_model["Account model<br/>[ApplicationUser.cs]"]
  node_location["Location model<br/>[LocationModel.cs]"]
  node_division["Division model<br/>[DivisionModel.cs]"]
  node_locker["Locker model<br/>[LockerUnitModel.cs]"]
  node_guardian["Guardian model<br/>[GuardianModel.cs]"]
  node_event["User event model<br/>[UserEvent.cs]"]
  node_dashboard["Dashboard model<br/>[AdminDashboard.cs]"]
  node_reports["Report model"]
  node_login_model["Login input<br/>[LoginViewModel.cs]"]
  node_registration_model["Registration input"]
end

subgraph group_client["Browser features"]
  node_admin_js["Admin browser UI<br/>[Admin.js]"]
  node_staff_js["Staff browser UI<br/>[Staff.js]"]
  node_reports_js["Reports browser UI<br/>[UserReports.js]"]
  node_account_js["Account browser UI<br/>[Account.js]"]
end

node_user(("User"))

node_user -->|"submits account actions"| node_account_controller
node_account_controller -->|"calls"| node_account_contract
node_account_manager -->|"implements"| node_account_contract
node_account_manager -->|"creates password"| node_account_helper
node_account_manager -->|"records events"| node_db
node_account_manager -->|"uses"| node_user_model
node_account_manager -->|"accepts"| node_login_model
node_account_manager -->|"accepts"| node_registration_model
node_admin_controller -->|"calls"| node_admin_contract
node_admin_repository -->|"implements"| node_admin_contract
node_admin_controller -->|"queries and updates"| node_db
node_admin_repository -->|"queries and updates"| node_db
node_admin_repository -->|"manages"| node_location
node_admin_repository -->|"manages"| node_division
node_admin_repository -->|"manages"| node_locker
node_admin_repository -->|"builds"| node_dashboard
node_admin_repository -->|"builds"| node_reports
node_admin_repository -->|"reads"| node_event
node_admin_controller -->|"saves"| node_guardian
node_admin_controller -->|"uses"| node_location
node_admin_controller -->|"uses"| node_division
node_admin_controller -->|"uses"| node_locker
node_admin_controller -->|"uses"| node_reports
node_admin_controller -->|"uses"| node_event
node_admin_controller -->|"queries"| node_user_model
node_db -->|"maps"| node_user_model
node_db -->|"maps"| node_location
node_db -->|"maps"| node_division
node_db -->|"maps"| node_locker
node_db -->|"maps"| node_event
node_db -->|"maps"| node_guardian

click node_account_controller "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Controllers/AccountController.cs"
click node_account_contract "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Repository/IRepository/IAccountManager.cs"
click node_account_manager "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Repository/AccountManager.cs"
click node_account_helper "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Helpers/AccountHelper.cs"
click node_admin_controller "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Controllers/AdminController.cs"
click node_admin_contract "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Repository/IRepository/IAdminRepository.cs"
click node_admin_repository "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Repository/AdminRepository.cs"
click node_staff_controller "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Controllers/StaffController.cs"
click node_home_controller "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Controllers/HomeController.cs"
click node_db "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Data/ApplicationDbContext.cs"
click node_user_model "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/ApplicationUser.cs"
click node_location "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/LocationModel.cs"
click node_division "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/DivisionModel.cs"
click node_locker "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/LockerUnitModel.cs"
click node_guardian "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/GuardianModel.cs"
click node_event "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/UserEvent.cs"
click node_dashboard "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/AdminDashboard.cs"
click node_reports "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/UserReportsModel.cs"
click node_login_model "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/LoginViewModel.cs"
click node_registration_model "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/RegistrationModel.cs"
click node_admin_js "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/wwwroot/js/Admin.js"
click node_staff_js "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/wwwroot/js/Staff.js"
click node_reports_js "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/wwwroot/js/UserReports.js"
click node_account_js "https://github.com/gveluchamy/ics2/blob/main/ICSLockers/wwwroot/js/Account.js"

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_account_controller,node_account_contract,node_account_manager,node_account_helper,node_home_controller,node_user toneBlue
class node_admin_controller,node_admin_contract,node_admin_repository,node_staff_controller toneAmber
class node_db,node_user_model,node_location,node_division,node_locker,node_guardian,node_event,node_dashboard,node_reports,node_login_model,node_registration_model toneMint
class node_admin_js,node_staff_js,node_reports_js,node_account_js toneRose
```

## Components

### Accounts and access

- [Account endpoints](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Controllers/AccountController.cs): `ICSLockers/Controllers/AccountController.cs`
- [Account contract](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Repository/IRepository/IAccountManager.cs): `ICSLockers/Repository/IRepository/IAccountManager.cs`
- [Account and Identity](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Repository/AccountManager.cs): `ICSLockers/Repository/AccountManager.cs`
- [Password helper](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Helpers/AccountHelper.cs): `ICSLockers/Helpers/AccountHelper.cs`
- [Home endpoints](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Controllers/HomeController.cs): `ICSLockers/Controllers/HomeController.cs`

### Locker administration

- [Admin endpoints](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Controllers/AdminController.cs): `ICSLockers/Controllers/AdminController.cs`
- [Admin contract](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Repository/IRepository/IAdminRepository.cs): `ICSLockers/Repository/IRepository/IAdminRepository.cs`
- [Admin operations](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Repository/AdminRepository.cs): `ICSLockers/Repository/AdminRepository.cs`
- [Staff endpoints](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Controllers/StaffController.cs): `ICSLockers/Controllers/StaffController.cs`

### Data and domain

- [EF and Identity store](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Data/ApplicationDbContext.cs): `ICSLockers/Data/ApplicationDbContext.cs`
- [Account model](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/ApplicationUser.cs): `ICSLockers/Models/ApplicationUser.cs`
- [Location model](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/LocationModel.cs): `ICSLockers/Models/LocationModel.cs`
- [Division model](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/DivisionModel.cs): `ICSLockers/Models/DivisionModel.cs`
- [Locker model](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/LockerUnitModel.cs): `ICSLockers/Models/LockerUnitModel.cs`
- [Guardian model](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/GuardianModel.cs): `ICSLockers/Models/GuardianModel.cs`
- [User event model](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/UserEvent.cs): `ICSLockers/Models/UserEvent.cs`
- [Dashboard model](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/AdminDashboard.cs): `ICSLockers/Models/AdminDashboard.cs`
- [Report model](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/UserReportsModel.cs): `ICSLockers/Models/UserReportsModel.cs`
- [Login input](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/LoginViewModel.cs): `ICSLockers/Models/LoginViewModel.cs`
- [Registration input](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/Models/RegistrationModel.cs): `ICSLockers/Models/RegistrationModel.cs`

### Browser features

- [Admin browser UI](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/wwwroot/js/Admin.js): `ICSLockers/wwwroot/js/Admin.js`
- [Staff browser UI](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/wwwroot/js/Staff.js): `ICSLockers/wwwroot/js/Staff.js`
- [Reports browser UI](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/wwwroot/js/UserReports.js): `ICSLockers/wwwroot/js/UserReports.js`
- [Account browser UI](https://github.com/gveluchamy/ics2/blob/main/ICSLockers/wwwroot/js/Account.js): `ICSLockers/wwwroot/js/Account.js`

### Other components

- **User**

## Connections

- User → Account endpoints: submits account actions (evidence: `ICSLockers/Controllers/AccountController.cs`)
- Account endpoints → Account contract: calls (evidence: `ICSLockers/Controllers/AccountController.cs`)
- Account and Identity → Account contract: implements (evidence: `ICSLockers/Repository/AccountManager.cs`)
- Account and Identity → Password helper: creates password (evidence: `ICSLockers/Repository/AccountManager.cs`)
- Account and Identity → EF and Identity store: records events (evidence: `ICSLockers/Repository/AccountManager.cs`)
- Account and Identity → Account model: uses (evidence: `ICSLockers/Repository/AccountManager.cs`)
- Account and Identity → Login input: accepts (evidence: `ICSLockers/Repository/AccountManager.cs`)
- Account and Identity → Registration input: accepts (evidence: `ICSLockers/Repository/AccountManager.cs`)
- Admin endpoints → Admin contract: calls (evidence: `ICSLockers/Controllers/AdminController.cs`)
- Admin operations → Admin contract: implements (evidence: `ICSLockers/Repository/AdminRepository.cs`)
- Admin endpoints → EF and Identity store: queries and updates (evidence: `ICSLockers/Controllers/AdminController.cs`)
- Admin operations → EF and Identity store: queries and updates (evidence: `ICSLockers/Repository/AdminRepository.cs`)
- Admin operations → Location model: manages (evidence: `ICSLockers/Repository/AdminRepository.cs`)
- Admin operations → Division model: manages (evidence: `ICSLockers/Repository/AdminRepository.cs`)
- Admin operations → Locker model: manages (evidence: `ICSLockers/Repository/AdminRepository.cs`)
- Admin operations → Dashboard model: builds (evidence: `ICSLockers/Repository/AdminRepository.cs`)
- Admin operations → Report model: builds (evidence: `ICSLockers/Repository/AdminRepository.cs`)
- Admin operations → User event model: reads (evidence: `ICSLockers/Repository/AdminRepository.cs`)
- Admin endpoints → Guardian model: saves (evidence: `ICSLockers/Controllers/AdminController.cs`)
- Admin endpoints → Location model: uses (evidence: `ICSLockers/Controllers/AdminController.cs`)
- Admin endpoints → Division model: uses (evidence: `ICSLockers/Controllers/AdminController.cs`)
- Admin endpoints → Locker model: uses (evidence: `ICSLockers/Controllers/AdminController.cs`)
- Admin endpoints → Report model: uses (evidence: `ICSLockers/Controllers/AdminController.cs`)
- Admin endpoints → User event model: uses (evidence: `ICSLockers/Controllers/AdminController.cs`)
- Admin endpoints → Account model: queries (evidence: `ICSLockers/Controllers/AdminController.cs`)
- EF and Identity store → Account model: maps (evidence: `ICSLockers/Data/ApplicationDbContext.cs`)
- EF and Identity store → Location model: maps (evidence: `ICSLockers/Data/ApplicationDbContext.cs`)
- EF and Identity store → Division model: maps (evidence: `ICSLockers/Data/ApplicationDbContext.cs`)
- EF and Identity store → Locker model: maps (evidence: `ICSLockers/Data/ApplicationDbContext.cs`)
- EF and Identity store → User event model: maps (evidence: `ICSLockers/Data/ApplicationDbContext.cs`)
- EF and Identity store → Guardian model: maps (evidence: `ICSLockers/Data/ApplicationDbContext.cs`)
