# kyrstnxx/vanguard-cms architecture

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

- Interactive diagram: https://gitdiagram.com/kyrstnxx/vanguard-cms
- Repository: https://github.com/kyrstnxx/vanguard-cms

## Overview

Vanguard CMS is an ASP.NET Core MVC complaint-management app. Residents register or sign in, submit categorized reports (optionally with a photo), and track report status; administrators review and filter reports, assign staff, update status with remarks, and inspect the resulting history. Account settings and resident administration support that workflow. The controllers, Identity calls, persistence context, and upload handling are evidenced in sampled source; broader view capabilities are represented from the tree and README.

Main entry points: [`complaint_MS/Controllers/AccountController.cs`](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/AccountController.cs) (Account actions), [`complaint_MS/Controllers/ReportController.cs`](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/ReportController.cs) (Report actions), [`complaint_MS/Controllers/AdminController.cs`](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/AdminController.cs) (Admin actions), [`complaint_MS/Data/ApplicationDbContext.cs`](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Data/ApplicationDbContext.cs) (Persistence context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Accounts"]
  node_account_controller["Account actions"]
  node_account_views["Account pages"]
  node_identity["ASP.NET Identity"]
  node_home_controller["Landing and dashboard<br/>[HomeController.cs]"]
  node_home_views["Home pages"]
end

subgraph group_resident["Resident Reporting"]
  node_report_controller["Report actions"]
  node_report_views["Report pages"]
  node_photo_uploads["Photo uploads"]
end

subgraph group_admin["Administration"]
  node_admin_controller["Admin actions<br/>[AdminController.cs]"]
  node_admin_views["Admin pages"]
end

subgraph group_core["Application Core"]
  node_domain_models["Users and reports"]
  node_account_models["Account view models"]
  node_roles_claims["Roles and claims<br/>[AppRoles.cs]"]
  node_db_context["Persistence context"]
  node_sql_database[("SQL Server database")]
  node_application_host["Application startup<br/>[Program.cs]"]
end

node_resident_actor(("Resident"))
node_admin_actor(("Admin staff"))

node_resident_actor -->|"registers or signs in"| node_account_controller
node_resident_actor -->|"submits and tracks"| node_report_controller
node_resident_actor -->|"manages account"| node_account_controller
node_admin_actor -->|"reviews and manages"| node_admin_controller
node_account_controller -->|"calls"| node_identity
node_account_controller -->|"soft-deletes reports"| node_db_context
node_account_controller -->|"renders"| node_account_views
node_home_controller -->|"renders"| node_home_views
node_home_controller -->|"redirects admins"| node_admin_controller
node_account_controller -->|"redirects after sign-in"| node_home_controller
node_report_controller -->|"gets current user"| node_identity
node_report_controller -->|"writes photos"| node_photo_uploads
node_report_controller -->|"reads and writes reports"| node_db_context
node_report_controller -->|"renders"| node_report_views
node_admin_controller -->|"gets users and roles"| node_identity
node_admin_controller -->|"queries and updates reports"| node_db_context
node_admin_controller -->|"renders"| node_admin_views
node_db_context -->|"persists entities"| node_sql_database
node_identity -->|"stores identity data"| node_sql_database
node_application_host -->|"configures SQL context"| node_db_context
node_application_host -->|"configures Identity"| node_identity
node_report_controller -->|"uses report entities"| node_domain_models
node_admin_controller -->|"uses report entities"| node_domain_models
node_account_controller -->|"binds account forms"| node_account_models

click node_account_controller "https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/AccountController.cs"
click node_account_views "https://github.com/kyrstnxx/vanguard-cms/tree/main/complaint_MS/Views/Account"
click node_home_controller "https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/HomeController.cs"
click node_home_views "https://github.com/kyrstnxx/vanguard-cms/tree/main/complaint_MS/Views/Home"
click node_report_controller "https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/ReportController.cs"
click node_report_views "https://github.com/kyrstnxx/vanguard-cms/tree/main/complaint_MS/Views/Report"
click node_photo_uploads "https://github.com/kyrstnxx/vanguard-cms/tree/main/complaint_MS/wwwroot/uploads"
click node_admin_controller "https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/AdminController.cs"
click node_admin_views "https://github.com/kyrstnxx/vanguard-cms/tree/main/complaint_MS/Views/Admin"
click node_domain_models "https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Models/RegisterViewModel.cs"
click node_account_models "https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Models/SettingsViewModel.cs"
click node_roles_claims "https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Constants/AppRoles.cs"
click node_db_context "https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Data/ApplicationDbContext.cs"
click node_application_host "https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Program.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_account_controller,node_account_views,node_identity,node_home_controller,node_home_views toneBlue
class node_report_controller,node_report_views,node_photo_uploads toneAmber
class node_admin_controller,node_admin_views toneMint
class node_domain_models,node_account_models,node_roles_claims,node_db_context,node_sql_database,node_application_host toneRose
class node_resident_actor,node_admin_actor toneIndigo
```

## Components

### Access and Accounts

- [Account actions](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/AccountController.cs): `complaint_MS/Controllers/AccountController.cs`
- [Account pages](https://github.com/kyrstnxx/vanguard-cms/tree/main/complaint_MS/Views/Account): `complaint_MS/Views/Account`
- **ASP.NET Identity**
- [Landing and dashboard](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/HomeController.cs): `complaint_MS/Controllers/HomeController.cs`
- [Home pages](https://github.com/kyrstnxx/vanguard-cms/tree/main/complaint_MS/Views/Home): `complaint_MS/Views/Home`

### Resident Reporting

- [Report actions](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/ReportController.cs): `complaint_MS/Controllers/ReportController.cs`
- [Report pages](https://github.com/kyrstnxx/vanguard-cms/tree/main/complaint_MS/Views/Report): `complaint_MS/Views/Report`
- [Photo uploads](https://github.com/kyrstnxx/vanguard-cms/tree/main/complaint_MS/wwwroot/uploads): `complaint_MS/wwwroot/uploads`

### Administration

- [Admin actions](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Controllers/AdminController.cs): `complaint_MS/Controllers/AdminController.cs`
- [Admin pages](https://github.com/kyrstnxx/vanguard-cms/tree/main/complaint_MS/Views/Admin): `complaint_MS/Views/Admin`

### Application Core

- [Users and reports](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Models/RegisterViewModel.cs): `complaint_MS/Models/RegisterViewModel.cs`
- [Account view models](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Models/SettingsViewModel.cs): `complaint_MS/Models/SettingsViewModel.cs`
- [Roles and claims](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Constants/AppRoles.cs): `complaint_MS/Constants/AppRoles.cs`
- [Persistence context](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Data/ApplicationDbContext.cs): `complaint_MS/Data/ApplicationDbContext.cs`
- **SQL Server database**
- [Application startup](https://github.com/kyrstnxx/vanguard-cms/blob/main/complaint_MS/Program.cs): `complaint_MS/Program.cs`

### Other components

- **Resident**
- **Admin staff**

## Connections

- Resident → Account actions: registers or signs in
- Resident → Report actions: submits and tracks
- Resident → Account actions: manages account
- Admin staff → Admin actions: reviews and manages
- Account actions → ASP.NET Identity: calls
- Account actions → Persistence context: soft-deletes reports
- Account actions → Account pages: renders
- Landing and dashboard → Home pages: renders
- Landing and dashboard → Admin actions: redirects admins
- Account actions → Landing and dashboard: redirects after sign-in
- Report actions → ASP.NET Identity: gets current user
- Report actions → Photo uploads: writes photos
- Report actions → Persistence context: reads and writes reports
- Report actions → Report pages: renders
- Admin actions → ASP.NET Identity: gets users and roles
- Admin actions → Persistence context: queries and updates reports
- Admin actions → Admin pages: renders
- Persistence context → SQL Server database: persists entities
- ASP.NET Identity → SQL Server database: stores identity data
- Application startup → Persistence context: configures SQL context
- Application startup → ASP.NET Identity: configures Identity
- Report actions → Users and reports: uses report entities
- Admin actions → Users and reports: uses report entities
- Account actions → Account view models: binds account forms
