# ducdaiii/wwwrootmanage architecture

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

- Interactive diagram: https://gitdiagram.com/ducdaiii/wwwrootmanage
- Repository: https://github.com/ducdaiii/wwwrootmanage

## Overview

1. This repository is a single ASP.NET Core Razor Pages application, not a split frontend/backend system. The PageModels under `Pages/` are the main application boundary: they handle HTTP requests, orchestrate service calls, and render server-side HTML.

2. The core business domain is FortiManager/Fortinet site management. The main user-facing areas are `Sites`, `Locations`, `MacObjects`, `Report`, and `Dashboard`, with a separate `Account` area for sign-in, password reset, trusted devices, and device verification.

3. Persistence is centered on Entity Framework Core with SQL Server. `Data/ApplicationDbContext.cs`, entity configurations, and `Migrations/` define the schema and relationships. The model set includes users, roles, permissions, site/location permissions, trusted login devices, password reset tokens, login verification challenges, CLI credentials, audit/API logs, and Fortinet-related site data.

4. Authentication and authorization are custom-built on top of the app’s own user/role/permission tables rather than relying only on defaults. `ClaimsTransformer` suggests claims are enriched after login, and the presence of `TrustedLoginDevice`, `LoginVerificationChallenge`, and `PasswordResetToken` shows support for multi-step login and account recovery flows.

5. Admin capabilities are a distinct subsystem. The `Pages/Admin/*` area manages users, permissions, trusted devices, and CLI credentials. This is where operational settings and security state are maintained rather than exposed in the main workflow pages.

6. Fortinet integration is handled by dedicated services, especially `FortinetApiService` and `FortinetTokenService`. These services encapsulate external device/API communication so the UI and persistence layers do not speak to Fortinet directly.

7. Backup/automation is another important subsystem. `FortigateBackupService`, `FortigateBackupScheduler`, and the `fortigate_backup.py` script indicate a scheduled or scripted backup workflow around FortiGate devices. This is separate from the interactive site-management flow and likely runs as background/ops work.

8. The app also has a clear notification channel. `IEmailSender` and `SmtpEmailSender` handle outbound email, with HTML templates stored under `wwwroot/email-templates/`. This supports password reset and verification-related user journeys.

9. Logging and auditability are first-class concerns. `ApiLog`, `AuditLog`, and `Services/Logging/AuditDbLoggerProvider.cs` show that operational actions and external calls are persisted for traceability, which is important for an admin/security-oriented tool.

10. The data model also covers network-adjacent management concerns beyond sites: `DHCP*` models, `FortiSiteIP`, and permission join tables (`UserSitePermission`, `UserLocationPermission`, `RolePermission`, `UserRole`) suggest the app manages both inventory and access boundaries, not just simple CRUD records.

11. In terms of data flow, the typical pattern is: a PageModel receives a user action, calls a domain service or DbContext operation, and the result is stored in SQL Server. External reads/writes to Fortinet devices are funneled through the Fortinet services, then translated into persisted entities.

12. Operationally, the app is self-contained: static assets live in `wwwroot/`, the UI uses Bootstrap/jQuery assets bundled locally, and deployment automation is defined in `.github/workflows/deploy.yml`. This looks like a traditional monolith deployed as one unit, with SQL Server and Fortinet/SMTP as the main external dependencies.

Main entry points: [`wwwrootmanage/Data/ApplicationDbContext.cs`](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Data/ApplicationDbContext.cs) (DbContext), [`wwwrootmanage/Program.cs`](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Program.cs) (Program), [`wwwrootmanage/Pages/Sites/Index.cshtml.cs`](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Sites/Index.cshtml.cs) (Sites), [`wwwrootmanage/Services/FortinetApiService.cs`](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/FortinetApiService.cs) (Fortinet API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Razor Pages"]
  node_dashboard["Dashboard<br/>page"]
  node_sites["Sites<br/>page group<br/>[Index.cshtml.cs]"]
  node_locations["Locations<br/>page group<br/>[Index.cshtml.cs]"]
  node_macobjects["MacObjects<br/>page group<br/>[Index.cshtml.cs]"]
  node_report["Report<br/>page<br/>[Index.cshtml.cs]"]
end

subgraph group_auth["Account"]
  node_login["Login<br/>auth page<br/>[Login.cshtml.cs]"]
  node_recovery["Recovery<br/>auth pages"]
  node_verify["Verify Device<br/>auth page"]
end

subgraph group_admin["Admin"]
  node_users["Users<br/>admin page<br/>[Index.cshtml.cs]"]
  node_permissions["Permissions<br/>admin page<br/>[Index.cshtml.cs]"]
  node_devices["Trusted Devices<br/>admin page<br/>[Index.cshtml.cs]"]
  node_cli["CLI Credentials<br/>admin page"]
end

subgraph group_core["Core Services"]
  node_program["Program<br/>startup<br/>[Program.cs]"]
  node_claims["Claims Transformer<br/>auth service"]
  node_fortinet["Fortinet API<br/>integration service"]
  node_token["Token Service<br/>integration service"]
  node_backup["Backup Service<br/>ops service"]
  node_scheduler["Backup Scheduler<br/>ops service"]
  node_email["Email Sender<br/>notification service<br/>[IEmailSender.cs]"]
  node_smtp["SMTP Sender<br/>notification service<br/>[SmtpEmailSender.cs]"]
  node_auditlog["Audit Logger<br/>logging provider"]
end

subgraph group_data["Persistence"]
  node_db[("DbContext<br/>ef core context")]
  node_user(("User<br/>entity<br/>[User.cs]"))
  node_site(("FortiSite<br/>entity<br/>[FortiSite.cs]"))
  node_location(("Location<br/>entity<br/>[Location.cs]"))
  node_perm(("Permission<br/>entity<br/>[Permission.cs]"))
  node_device(("Trusted Device<br/>entity"))
  node_reset(("Reset Token<br/>entity"))
  node_challenge(("Login Challenge<br/>entity"))
  node_audit(("Audit Log<br/>entity<br/>[AuditLog.cs]"))
  node_api(("API Log<br/>entity<br/>[ApiLog.cs]"))
  node_clientity(("CLI Credentials<br/>entity<br/>[CliCredentials.cs]"))
  node_dhcp(("DHCP Models<br/>entity set"))
  node_siteip(("Site IP<br/>entity<br/>[FortiSiteIP.cs]"))
end

node_program -->|"registers"| node_db
node_program -->|"adds"| node_claims
node_program -->|"adds"| node_fortinet
node_program -->|"adds"| node_backup
node_program -->|"adds"| node_email
node_program -->|"adds"| node_auditlog
node_dashboard -->|"reads"| node_db
node_sites -->|"reads/writes"| node_db
node_sites -->|"syncs"| node_fortinet
node_sites -->|"persists"| node_site
node_sites -->|"persists"| node_siteip
node_locations -->|"reads/writes"| node_db
node_locations -->|"persists"| node_location
node_macobjects -->|"reads/writes"| node_db
node_report -->|"reads"| node_db
node_login -->|"uses"| node_claims
node_login -->|"authenticates"| node_db
node_recovery -->|"sends"| node_email
node_recovery -->|"stores"| node_db
node_verify -->|"checks"| node_db
node_users -->|"reads/writes"| node_db
node_permissions -->|"reads/writes"| node_db
node_devices -->|"reads/writes"| node_db
node_cli -->|"reads/writes"| node_db
node_fortinet -->|"uses"| node_token
node_backup -->|"calls"| node_fortinet
node_scheduler -->|"triggers"| node_backup
node_smtp -->|"implements"| node_email
node_auditlog -->|"writes"| node_db
node_db -->|"maps"| node_user
node_db -->|"maps"| node_perm
node_db -->|"maps"| node_device
node_db -->|"maps"| node_reset
node_db -->|"maps"| node_challenge
node_db -->|"maps"| node_audit
node_db -->|"maps"| node_api
node_db -->|"maps"| node_clientity
node_db -->|"maps"| node_dhcp

click node_program "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Program.cs"
click node_dashboard "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Dashboard.cshtml.cs"
click node_sites "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Sites/Index.cshtml.cs"
click node_locations "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Locations/Index.cshtml.cs"
click node_macobjects "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/MacObjects/Index.cshtml.cs"
click node_report "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Report/Index.cshtml.cs"
click node_login "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Account/Login.cshtml.cs"
click node_recovery "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Account/ForgotPassword.cshtml.cs"
click node_verify "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Account/VerifyDevice.cshtml.cs"
click node_users "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Admin/Users/Index.cshtml.cs"
click node_permissions "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Admin/Permissions/Index.cshtml.cs"
click node_devices "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Admin/TrustedDevices/Index.cshtml.cs"
click node_cli "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Admin/CliCredentials.cshtml.cs"
click node_claims "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/ClaimsTransformer.cs"
click node_fortinet "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/FortinetApiService.cs"
click node_token "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/FortinetTokenService.cs"
click node_backup "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/FortigateBackupService.cs"
click node_scheduler "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/FortigateBackupScheduler.cs"
click node_email "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/IEmailSender.cs"
click node_smtp "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/SmtpEmailSender.cs"
click node_auditlog "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/Logging/AuditDbLoggerProvider.cs"
click node_db "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Data/ApplicationDbContext.cs"
click node_user "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/User.cs"
click node_site "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/FortiSite.cs"
click node_location "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/Location.cs"
click node_perm "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/Permission.cs"
click node_device "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/TrustedLoginDevice.cs"
click node_reset "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/PasswordResetToken.cs"
click node_challenge "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/LoginVerificationChallenge.cs"
click node_audit "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/AuditLog.cs"
click node_api "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/ApiLog.cs"
click node_clientity "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/CliCredentials.cs"
click node_dhcp "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/DhcpMonitorLeaseDetail.cs"
click node_siteip "https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/FortiSiteIP.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_dashboard,node_sites,node_locations,node_macobjects,node_report toneBlue
class node_login,node_recovery,node_verify toneAmber
class node_users,node_permissions,node_devices,node_cli toneMint
class node_program,node_claims,node_fortinet,node_token,node_backup,node_scheduler,node_email,node_smtp,node_auditlog toneRose
class node_db,node_user,node_site,node_location,node_perm,node_device,node_reset,node_challenge,node_audit,node_api,node_clientity,node_dhcp,node_siteip toneIndigo
```

## Components

### Razor Pages

Server-rendered application entrypoints and user workflows

- [Dashboard](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Dashboard.cshtml.cs): page · Entry dashboard for site and operational status · `wwwrootmanage/Pages/Dashboard.cshtml.cs`
- [Sites](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Sites/Index.cshtml.cs): page group · Primary site inventory and detail workflow · `wwwrootmanage/Pages/Sites/Index.cshtml.cs`
- [Locations](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Locations/Index.cshtml.cs): page group · Location management and assignment workflow · `wwwrootmanage/Pages/Locations/Index.cshtml.cs`
- [MacObjects](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/MacObjects/Index.cshtml.cs): page group · MAC object management workflow · `wwwrootmanage/Pages/MacObjects/Index.cshtml.cs`
- [Report](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Report/Index.cshtml.cs): page · Reporting and operational views · `wwwrootmanage/Pages/Report/Index.cshtml.cs`

### Account

Sign-in and recovery flows

- [Login](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Account/Login.cshtml.cs): auth page · Authentication and device verification entry · `wwwrootmanage/Pages/Account/Login.cshtml.cs`
- [Recovery](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Account/ForgotPassword.cshtml.cs): auth pages · Password reset and trusted device flows · `wwwrootmanage/Pages/Account/ForgotPassword.cshtml.cs`
- [Verify Device](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Account/VerifyDevice.cshtml.cs): auth page · Multi-step login verification challenge · `wwwrootmanage/Pages/Account/VerifyDevice.cshtml.cs`

### Admin

Operational management surfaces

- [Users](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Admin/Users/Index.cshtml.cs): admin page · User administration and access management · `wwwrootmanage/Pages/Admin/Users/Index.cshtml.cs`
- [Permissions](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Admin/Permissions/Index.cshtml.cs): admin page · Permission and role administration · `wwwrootmanage/Pages/Admin/Permissions/Index.cshtml.cs`
- [Trusted Devices](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Admin/TrustedDevices/Index.cshtml.cs): admin page · Trusted login device administration · `wwwrootmanage/Pages/Admin/TrustedDevices/Index.cshtml.cs`
- [CLI Credentials](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Pages/Admin/CliCredentials.cshtml.cs): admin page · Managed credentials for device access · `wwwrootmanage/Pages/Admin/CliCredentials.cshtml.cs`

### Core Services

Business logic, integration, and background operations

- [Program](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Program.cs): startup · Wires services, auth, pages, and middleware · `wwwrootmanage/Program.cs`
- [Claims Transformer](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/ClaimsTransformer.cs): auth service · Enriches user claims after sign-in · `wwwrootmanage/Services/ClaimsTransformer.cs`
- [Fortinet API](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/FortinetApiService.cs): integration service · External FortiManager/FortiGate API access · `wwwrootmanage/Services/FortinetApiService.cs`
- [Token Service](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/FortinetTokenService.cs): integration service · Manages Fortinet authentication tokens · `wwwrootmanage/Services/FortinetTokenService.cs`
- [Backup Service](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/FortigateBackupService.cs): ops service · FortiGate backup execution and orchestration · `wwwrootmanage/Services/FortigateBackupService.cs`
- [Backup Scheduler](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/FortigateBackupScheduler.cs): ops service · Schedules automated backup runs · `wwwrootmanage/Services/FortigateBackupScheduler.cs`
- [Email Sender](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/IEmailSender.cs): notification service · Outbound email abstraction for account flows · `wwwrootmanage/Services/IEmailSender.cs`
- [SMTP Sender](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/SmtpEmailSender.cs): notification service · SMTP implementation for outbound mail · `wwwrootmanage/Services/SmtpEmailSender.cs`
- [Audit Logger](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Services/Logging/AuditDbLoggerProvider.cs): logging provider · Persists audit and operational logs · `wwwrootmanage/Services/Logging/AuditDbLoggerProvider.cs`

### Persistence

EF Core context, schema, and domain entities

- [DbContext](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Data/ApplicationDbContext.cs): ef core context · Central SQL Server persistence boundary · `wwwrootmanage/Data/ApplicationDbContext.cs`
- [User](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/User.cs): entity · Application user and security state · `wwwrootmanage/Models/User.cs`
- [FortiSite](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/FortiSite.cs): entity · Managed Fortinet site record · `wwwrootmanage/Models/FortiSite.cs`
- [Location](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/Location.cs): entity · Physical or logical location record · `wwwrootmanage/Models/Location.cs`
- [Permission](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/Permission.cs): entity · Named permission capability · `wwwrootmanage/Models/Permission.cs`
- [Trusted Device](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/TrustedLoginDevice.cs): entity · Trusted login device record · `wwwrootmanage/Models/TrustedLoginDevice.cs`
- [Reset Token](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/PasswordResetToken.cs): entity · Password reset token record · `wwwrootmanage/Models/PasswordResetToken.cs`
- [Login Challenge](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/LoginVerificationChallenge.cs): entity · Device verification challenge record · `wwwrootmanage/Models/LoginVerificationChallenge.cs`
- [Audit Log](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/AuditLog.cs): entity · Security and operational audit trail · `wwwrootmanage/Models/AuditLog.cs`
- [API Log](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/ApiLog.cs): entity · External API call log · `wwwrootmanage/Models/ApiLog.cs`
- [CLI Credentials](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/CliCredentials.cs): entity · Stored credentials for administrative device access · `wwwrootmanage/Models/CliCredentials.cs`
- [DHCP Models](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/DhcpMonitorLeaseDetail.cs): entity set · Reserved lease and monitor data for network operations · `wwwrootmanage/Models/DhcpMonitorLeaseDetail.cs`
- [Site IP](https://github.com/ducdaiii/wwwrootmanage/blob/master/wwwrootmanage/Models/FortiSiteIP.cs): entity · IP association for a managed site · `wwwrootmanage/Models/FortiSiteIP.cs`

## Connections

- Program → DbContext: registers · Configures EF Core and app services
- Program → Claims Transformer: adds · Registers claims enrichment after authentication
- Program → Fortinet API: adds · Registers Fortinet integration services
- Program → Backup Service: adds · Registers backup orchestration
- Program → Email Sender: adds · Registers notification abstraction
- Program → Audit Logger: adds · Registers audit logging provider
- Dashboard → DbContext: reads · Loads dashboard state from persisted data
- Sites → DbContext: reads/writes · Manages sites and related records
- Sites → Fortinet API: syncs · Uses Fortinet API for device-backed site data
- Sites → FortiSite: persists · Creates and updates site entities
- Sites → Site IP: persists · Maintains site IP associations
- Locations → DbContext: reads/writes · Manages location entities and permissions
- Locations → Location: persists · Creates and updates location entities
- MacObjects → DbContext: reads/writes · Manages MAC-related operational records
- Report → DbContext: reads · Builds reports from persisted domain data
- Login → Claims Transformer: uses · Consumes enriched claims after sign-in
- Login → DbContext: authenticates · Validates users and login state
- Recovery → Email Sender: sends · Delivers reset and verification mail
- Recovery → DbContext: stores · Persists reset tokens and trusted device state
- Verify Device → DbContext: checks · Validates login verification challenges
- Users → DbContext: reads/writes · Administers user accounts and assignments
- Permissions → DbContext: reads/writes · Administers roles and permissions
- Trusted Devices → DbContext: reads/writes · Administers trusted device records
- CLI Credentials → DbContext: reads/writes · Manages CLI credential records
- Fortinet API → Token Service: uses · Acquires and refreshes API tokens
- Backup Service → Fortinet API: calls · Uses Fortinet connectivity for backup operations
- Backup Scheduler → Backup Service: triggers · Schedules automated backup runs
- SMTP Sender → Email Sender: implements · SMTP backs the mail abstraction
- Audit Logger → DbContext: writes · Persists audit and operational events
- DbContext → User: maps · Holds user table and security tables
- DbContext → Permission: maps · Holds permission tables and joins
- DbContext → Trusted Device: maps · Holds trusted login devices
- DbContext → Reset Token: maps · Holds password reset tokens
- DbContext → Login Challenge: maps · Holds device verification challenges
- DbContext → Audit Log: maps · Holds audit trail entries
- DbContext → API Log: maps · Holds external API logs
- DbContext → CLI Credentials: maps · Holds CLI credential records
- DbContext → DHCP Models: maps · Holds DHCP-related operational data
