# marioguilherme/cidadeinteligente architecture

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

- Interactive diagram: https://gitdiagram.com/marioguilherme/cidadeinteligente
- Repository: https://github.com/marioguilherme/cidadeinteligente

## Overview

CidadeInteligente is a project-management system for Fatec de Lins teachers and students: users authenticate, browse or manage projects and their media, while administrators maintain users, courses, and areas. The MVC interface routes work through application CQRS handlers to domain repositories and persistence; authentication recovery also uses transactional email, and project media uses cloud storage. The project-detail and paginated-list query paths are evidenced in handler excerpts. Other subsystem connections follow README capabilities or remain dashed where implementation excerpts were not provided.

Main entry points: [`CidadeInteligente.Mvc/Controllers`](https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Mvc/Controllers) (MVC and API), [`CidadeInteligente.Domain/Repositories/IUnitOfWork.cs`](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Repositories/IUnitOfWork.cs) (Unit of Work), [`CidadeInteligente.Application/Queries/GetProjectById/GetProjectByIdQueryHandler.cs`](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Application/Queries/GetProjectById/GetProjectByIdQueryHandler.cs) (Project detail), [`CidadeInteligente.Application/Queries/GetRelatedProjectsFromUser/GetRelatedProjectsFromUserQueryHandler.cs`](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Application/Queries/GetRelatedProjectsFromUser/GetRelatedProjectsFromUserQueryHandler.cs) (User projects)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_mvc["MVC and API<br/>[Controllers]"]
end

subgraph group_app["Application workflows"]
  node_project_queries["Project queries<br/>[GetProjects]"]
  node_project_detail["Project detail"]
  node_related_projects["User projects"]
  node_project_commands["Project management<br/>[Commands]"]
  node_identity["Account workflows<br/>[CreateUser]"]
  node_authentication["Authentication"]
  node_recovery["Password recovery<br/>[SendEmailRecover]"]
  node_admin_data["Admin catalogs<br/>[CreateArea]"]
end

subgraph group_domain["Domain model"]
  node_notifications["Business notifications"]
  node_project_model["Project model<br/>[Project.cs]"]
  node_user_model["User model<br/>[User.cs]"]
  node_area_course["Area and course<br/>[Area.cs]"]
  node_specifications["Query specifications<br/>[Specification.cs]"]
  node_uow["Unit of Work<br/>[IUnitOfWork.cs]"]
  node_file_contract["File storage contract<br/>[IFileStorage.cs]"]
end

subgraph group_infra["Infrastructure"]
  node_db[("SQL Server")]
  node_email["SendGrid email"]
  node_blob["Azure Blob storage"]
end

node_people(("Visitors and users"))

node_people -.->|"use"| node_mvc
node_mvc -.->|"request"| node_project_queries
node_mvc -.->|"request"| node_project_detail
node_mvc -.->|"manage"| node_project_commands
node_mvc -.->|"authenticate"| node_authentication
node_mvc -.->|"register"| node_identity
node_mvc -.->|"recover password"| node_recovery
node_mvc -.->|"administer"| node_admin_data
node_mvc -.->|"request"| node_related_projects
node_project_detail -->|"query"| node_uow
node_project_detail -->|"build query"| node_specifications
node_project_detail -->|"report missing"| node_notifications
node_project_queries -->|"query page"| node_uow
node_project_queries -->|"build query"| node_specifications
node_related_projects -->|"check and query"| node_uow
node_related_projects -->|"build query"| node_specifications
node_related_projects -->|"report missing"| node_notifications
node_authentication -->|"look up user"| node_uow
node_authentication -->|"build query"| node_specifications
node_uow -.->|"persist data"| node_db
node_project_model -.->|"media capability"| node_file_contract
node_blob -->|"implements"| node_file_contract
node_recovery -.->|"send email"| node_email

click node_mvc "https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Mvc/Controllers"
click node_project_queries "https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Application/Queries/GetProjects"
click node_project_detail "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Application/Queries/GetProjectById/GetProjectByIdQueryHandler.cs"
click node_related_projects "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Application/Queries/GetRelatedProjectsFromUser/GetRelatedProjectsFromUserQueryHandler.cs"
click node_project_commands "https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Application/Commands"
click node_identity "https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Application/Commands/CreateUser"
click node_authentication "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Application/Queries/AuthenticateUser/AuthenticateUserQueryHandler.cs"
click node_recovery "https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Application/Commands/SendEmailRecover"
click node_admin_data "https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Application/Commands/CreateArea"
click node_notifications "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Notifications/INotificationContext.cs"
click node_project_model "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Entities/Project.cs"
click node_user_model "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Entities/User.cs"
click node_area_course "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Entities/Area.cs"
click node_specifications "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Specifications/Specification.cs"
click node_uow "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Repositories/IUnitOfWork.cs"
click node_db "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Infrastructure/Persistence/CidadeInteligenteDbContext.cs"
click node_email "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Infrastructure/Services/SendGridEmailService.cs"
click node_blob "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Infrastructure/Services/AzureStorageService.cs"
click node_file_contract "https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Services/IFileStorage.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_people toneBlue
class node_project_queries,node_project_detail,node_related_projects,node_project_commands,node_identity,node_authentication,node_recovery,node_admin_data toneAmber
class node_notifications,node_project_model,node_user_model,node_area_course,node_specifications,node_uow,node_file_contract toneMint
class node_db,node_email,node_blob toneRose
```

## Components

### Web interface

- [MVC and API](https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Mvc/Controllers): `CidadeInteligente.Mvc/Controllers`

### Application workflows

- [Project queries](https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Application/Queries/GetProjects): `CidadeInteligente.Application/Queries/GetProjects`
- [Project detail](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Application/Queries/GetProjectById/GetProjectByIdQueryHandler.cs): `CidadeInteligente.Application/Queries/GetProjectById/GetProjectByIdQueryHandler.cs`
- [User projects](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Application/Queries/GetRelatedProjectsFromUser/GetRelatedProjectsFromUserQueryHandler.cs): `CidadeInteligente.Application/Queries/GetRelatedProjectsFromUser/GetRelatedProjectsFromUserQueryHandler.cs`
- [Project management](https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Application/Commands): `CidadeInteligente.Application/Commands`
- [Account workflows](https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Application/Commands/CreateUser): `CidadeInteligente.Application/Commands/CreateUser`
- [Authentication](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Application/Queries/AuthenticateUser/AuthenticateUserQueryHandler.cs): `CidadeInteligente.Application/Queries/AuthenticateUser/AuthenticateUserQueryHandler.cs`
- [Password recovery](https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Application/Commands/SendEmailRecover): `CidadeInteligente.Application/Commands/SendEmailRecover`
- [Admin catalogs](https://github.com/marioguilherme/cidadeinteligente/tree/master/CidadeInteligente.Application/Commands/CreateArea): `CidadeInteligente.Application/Commands/CreateArea`

### Domain model

- [Business notifications](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Notifications/INotificationContext.cs): `CidadeInteligente.Domain/Notifications/INotificationContext.cs`
- [Project model](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Entities/Project.cs): `CidadeInteligente.Domain/Entities/Project.cs`
- [User model](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Entities/User.cs): `CidadeInteligente.Domain/Entities/User.cs`
- [Area and course](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Entities/Area.cs): `CidadeInteligente.Domain/Entities/Area.cs`
- [Query specifications](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Specifications/Specification.cs): `CidadeInteligente.Domain/Specifications/Specification.cs`
- [Unit of Work](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Repositories/IUnitOfWork.cs): `CidadeInteligente.Domain/Repositories/IUnitOfWork.cs`
- [File storage contract](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Domain/Services/IFileStorage.cs): `CidadeInteligente.Domain/Services/IFileStorage.cs`

### Infrastructure

- [SQL Server](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Infrastructure/Persistence/CidadeInteligenteDbContext.cs): `CidadeInteligente.Infrastructure/Persistence/CidadeInteligenteDbContext.cs`
- [SendGrid email](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Infrastructure/Services/SendGridEmailService.cs): `CidadeInteligente.Infrastructure/Services/SendGridEmailService.cs`
- [Azure Blob storage](https://github.com/marioguilherme/cidadeinteligente/blob/master/CidadeInteligente.Infrastructure/Services/AzureStorageService.cs): `CidadeInteligente.Infrastructure/Services/AzureStorageService.cs`

### Other components

- **Visitors and users**

## Connections

- Visitors and users → MVC and API: use
- MVC and API → Project queries: request (evidence: `CidadeInteligente.Mvc/Controllers/ProjectsController.cs`)
- MVC and API → Project detail: request
- MVC and API → Project management: manage (evidence: `CidadeInteligente.Mvc/Controllers/v1/ProjectsApiController.cs`)
- MVC and API → Authentication: authenticate
- MVC and API → Account workflows: register
- MVC and API → Password recovery: recover password
- MVC and API → Admin catalogs: administer
- MVC and API → User projects: request
- Project detail → Unit of Work: query (evidence: `CidadeInteligente.Application/Queries/GetProjectById/GetProjectByIdQueryHandler.cs`)
- Project detail → Query specifications: build query (evidence: `CidadeInteligente.Application/Queries/GetProjectById/GetProjectByIdQueryHandler.cs`)
- Project detail → Business notifications: report missing (evidence: `CidadeInteligente.Application/Queries/GetProjectById/GetProjectByIdQueryHandler.cs`)
- Project queries → Unit of Work: query page (evidence: `CidadeInteligente.Application/Queries/GetProjects/GetProjectsQueryHandler.cs`)
- Project queries → Query specifications: build query (evidence: `CidadeInteligente.Application/Queries/GetProjects/GetProjectsQueryHandler.cs`)
- User projects → Unit of Work: check and query (evidence: `CidadeInteligente.Application/Queries/GetRelatedProjectsFromUser/GetRelatedProjectsFromUserQueryHandler.cs`)
- User projects → Query specifications: build query (evidence: `CidadeInteligente.Application/Queries/GetRelatedProjectsFromUser/GetRelatedProjectsFromUserQueryHandler.cs`)
- User projects → Business notifications: report missing (evidence: `CidadeInteligente.Application/Queries/GetRelatedProjectsFromUser/GetRelatedProjectsFromUserQueryHandler.cs`)
- Authentication → Unit of Work: look up user (evidence: `CidadeInteligente.Application/Queries/AuthenticateUser/AuthenticateUserQueryHandler.cs`)
- Authentication → Query specifications: build query (evidence: `CidadeInteligente.Application/Queries/AuthenticateUser/AuthenticateUserQueryHandler.cs`)
- Unit of Work → SQL Server: persist data
- Project model → File storage contract: media capability
- Azure Blob storage → File storage contract: implements (evidence: `CidadeInteligente.Infrastructure/Services/AzureStorageService.cs`)
- Password recovery → SendGrid email: send email
