# cesarcmd/slt-web architecture

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

- Interactive diagram: https://gitdiagram.com/cesarcmd/slt-web
- Repository: https://github.com/cesarcmd/slt-web

## Overview

SLT.WEB is an ASP.NET Core MVC logistics administration interface. Users reach MVC controllers, which orchestrate application services that call the external SLT.API and return results for web views or JSON. The documented product covers demand scheduling, fleet and driver management, maintenance, incidents, attachments, frequent locations, dashboards and user access. The graph shows major domains and the shared API boundary; unsampled domain services are included from the repository tree and README, while their internal call details are not asserted.

Main entry points: [`SLT.WEB/Program.cs`](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Program.cs) (MVC routing), [`SLT.WEB.Application/Services`](https://github.com/cesarcmd/slt-web/tree/main/SLT.WEB.Application/Services) (Application services), [`SLT.WEB/Controllers/LoginController.cs`](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/LoginController.cs) (User administration), [`SLT.WEB/Controllers/DemandaController.cs`](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/DemandaController.cs) (Demand scheduling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_mvc["MVC routing<br/>[Program.cs]"]
end

subgraph group_domain["Logistics domains"]
  node_demand["Demand scheduling"]
  node_fleet["Vehicles"]
  node_drivers["Drivers"]
  node_assignments["Driver-vehicle links"]
  node_maintenance["Maintenance"]
  node_incidents["Incidents"]
  node_attachments["Attachments<br/>[AnexoController.cs]"]
  node_locations["Frequent locations"]
  node_dashboard["Operations dashboard<br/>[HomeController.cs]"]
  node_people["People records"]
  node_maintenance_types["Maintenance types"]
end

subgraph group_identity["Identity and access"]
  node_login["User administration<br/>[LoginController.cs]"]
  node_auth["Authentication entry"]
  node_profile["Profile authorization"]
  node_sauron["Sauron identity<br/>[SauronService.cs]"]
end

subgraph group_integration["API integration"]
  node_appservices["Application services<br/>[Services]"]
  node_base["HTTP API client<br/>[BaseService.cs]"]
  node_token["Token forwarding"]
end

node_user(("Web user"))
node_api{{"SLT.API"}}
node_sauron_api{{"SAURON API"}}

node_user -->|"requests pages"| node_mvc
node_mvc -->|"applies access checks"| node_profile
node_mvc -->|"routes requests"| node_auth
node_mvc -.->|"routes requests"| node_demand
node_mvc -.->|"routes requests"| node_fleet
node_mvc -.->|"routes requests"| node_drivers
node_mvc -.->|"routes requests"| node_assignments
node_mvc -.->|"routes requests"| node_maintenance
node_mvc -.->|"routes requests"| node_incidents
node_mvc -.->|"routes requests"| node_attachments
node_mvc -.->|"routes requests"| node_locations
node_mvc -.->|"routes requests"| node_dashboard
node_mvc -.->|"routes requests"| node_people
node_mvc -.->|"routes requests"| node_maintenance_types
node_mvc -.->|"routes requests"| node_login
node_demand -->|"calls services"| node_appservices
node_fleet -.->|"uses services"| node_appservices
node_drivers -.->|"uses services"| node_appservices
node_assignments -.->|"uses services"| node_appservices
node_maintenance -.->|"uses services"| node_appservices
node_incidents -.->|"uses services"| node_appservices
node_attachments -.->|"uses services"| node_appservices
node_locations -.->|"uses services"| node_appservices
node_dashboard -.->|"uses services"| node_appservices
node_people -.->|"uses services"| node_appservices
node_maintenance_types -.->|"uses services"| node_appservices
node_login -->|"calls services"| node_appservices
node_login -->|"syncs profiles"| node_sauron
node_auth -.->|"uses services"| node_appservices
node_appservices -->|"inherits HTTP operations"| node_base
node_base -->|"sends API requests"| node_api
node_token -->|"adds request identity"| node_api
node_sauron -.->|"calls identity API"| node_sauron_api

click node_mvc "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Program.cs"
click node_demand "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/DemandaController.cs"
click node_fleet "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/VeiculoController.cs"
click node_drivers "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/MotoristaController.cs"
click node_assignments "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/MotoristaVeiculoController.cs"
click node_maintenance "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/ManutencaoController.cs"
click node_incidents "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/OcorrenciaController.cs"
click node_attachments "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/AnexoController.cs"
click node_locations "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/LocalidadesController.cs"
click node_dashboard "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/HomeController.cs"
click node_people "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/PessoaController.cs"
click node_maintenance_types "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/TipoManutencaoController.cs"
click node_login "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/LoginController.cs"
click node_auth "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/AutenticacaoController.cs"
click node_profile "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Middlewares/ValidarPerfilMiddleware.cs"
click node_sauron "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB.Application/Services/SauronService.cs"
click node_appservices "https://github.com/cesarcmd/slt-web/tree/main/SLT.WEB.Application/Services"
click node_base "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB.Application/Services/BaseService.cs"
click node_token "https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB.Application/Http/SauronTokenHandler.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_mvc,node_user toneBlue
class node_demand,node_fleet,node_drivers,node_assignments,node_maintenance,node_incidents,node_attachments,node_locations,node_dashboard,node_people,node_maintenance_types toneAmber
class node_login,node_auth,node_profile,node_sauron,node_api,node_sauron_api toneMint
class node_appservices,node_base,node_token toneRose
```

## Components

### Web interface

- [MVC routing](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Program.cs): `SLT.WEB/Program.cs`

### Logistics domains

- [Demand scheduling](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/DemandaController.cs): `SLT.WEB/Controllers/DemandaController.cs`
- [Vehicles](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/VeiculoController.cs): `SLT.WEB/Controllers/VeiculoController.cs`
- [Drivers](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/MotoristaController.cs): `SLT.WEB/Controllers/MotoristaController.cs`
- [Driver-vehicle links](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/MotoristaVeiculoController.cs): `SLT.WEB/Controllers/MotoristaVeiculoController.cs`
- [Maintenance](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/ManutencaoController.cs): `SLT.WEB/Controllers/ManutencaoController.cs`
- [Incidents](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/OcorrenciaController.cs): `SLT.WEB/Controllers/OcorrenciaController.cs`
- [Attachments](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/AnexoController.cs): `SLT.WEB/Controllers/AnexoController.cs`
- [Frequent locations](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/LocalidadesController.cs): `SLT.WEB/Controllers/LocalidadesController.cs`
- [Operations dashboard](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/HomeController.cs): `SLT.WEB/Controllers/HomeController.cs`
- [People records](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/PessoaController.cs): `SLT.WEB/Controllers/PessoaController.cs`
- [Maintenance types](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/TipoManutencaoController.cs): `SLT.WEB/Controllers/TipoManutencaoController.cs`

### Identity and access

- [User administration](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/LoginController.cs): `SLT.WEB/Controllers/LoginController.cs`
- [Authentication entry](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Controllers/AutenticacaoController.cs): `SLT.WEB/Controllers/AutenticacaoController.cs`
- [Profile authorization](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB/Middlewares/ValidarPerfilMiddleware.cs): `SLT.WEB/Middlewares/ValidarPerfilMiddleware.cs`
- [Sauron identity](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB.Application/Services/SauronService.cs): `SLT.WEB.Application/Services/SauronService.cs`

### API integration

- [Application services](https://github.com/cesarcmd/slt-web/tree/main/SLT.WEB.Application/Services): `SLT.WEB.Application/Services`
- [HTTP API client](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB.Application/Services/BaseService.cs): `SLT.WEB.Application/Services/BaseService.cs`
- [Token forwarding](https://github.com/cesarcmd/slt-web/blob/main/SLT.WEB.Application/Http/SauronTokenHandler.cs): `SLT.WEB.Application/Http/SauronTokenHandler.cs`

### Other components

- **Web user**
- **SLT.API**
- **SAURON API**

## Connections

- Web user → MVC routing: requests pages (evidence: `SLT.WEB/Program.cs`)
- MVC routing → Profile authorization: applies access checks (evidence: `SLT.WEB/Program.cs`)
- MVC routing → Authentication entry: routes requests (evidence: `SLT.WEB/Program.cs`)
- MVC routing → Demand scheduling: routes requests
- MVC routing → Vehicles: routes requests
- MVC routing → Drivers: routes requests
- MVC routing → Driver-vehicle links: routes requests
- MVC routing → Maintenance: routes requests
- MVC routing → Incidents: routes requests
- MVC routing → Attachments: routes requests
- MVC routing → Frequent locations: routes requests
- MVC routing → Operations dashboard: routes requests
- MVC routing → People records: routes requests
- MVC routing → Maintenance types: routes requests
- MVC routing → User administration: routes requests
- Demand scheduling → Application services: calls services (evidence: `SLT.WEB/Controllers/DemandaController.cs`)
- Vehicles → Application services: uses services
- Drivers → Application services: uses services
- Driver-vehicle links → Application services: uses services
- Maintenance → Application services: uses services
- Incidents → Application services: uses services
- Attachments → Application services: uses services
- Frequent locations → Application services: uses services
- Operations dashboard → Application services: uses services
- People records → Application services: uses services
- Maintenance types → Application services: uses services
- User administration → Application services: calls services (evidence: `SLT.WEB/Controllers/LoginController.cs`)
- User administration → Sauron identity: syncs profiles (evidence: `SLT.WEB/Controllers/LoginController.cs`)
- Authentication entry → Application services: uses services
- Application services → HTTP API client: inherits HTTP operations (evidence: `SLT.WEB.Application/Services/AnexoService.cs`)
- HTTP API client → SLT.API: sends API requests (evidence: `SLT.WEB.Application/Services/BaseService.cs`)
- Token forwarding → SLT.API: adds request identity (evidence: `SLT.WEB.Application/Http/SauronTokenHandler.cs`)
- Sauron identity → SAURON API: calls identity API
