# kevinfide/charlieshop architecture

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

- Interactive diagram: https://gitdiagram.com/kevinfide/charlieshop
- Repository: https://github.com/kevinfide/charlieshop

## Overview

CharlieShop is an ASP.NET MVC shop-management application. The visible entry flow routes browser requests through MVC, beginning at account login by default; authentication and user administration are the best-evidenced workflows. The tree also exposes sales, products, inventory, customers, receivables, reporting, dashboard and assistant areas, but their controller implementations were not excerpted, so their internal data flows are not asserted. Database and email connections are visible in the sampled account and user code; other integrations remain uncertain.

Main entry points: [`CharlieShop/Program.cs`](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Program.cs) (MVC routing), [`CharlieShop/Services/EmailService.cs`](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Services/EmailService.cs) (Email sender), [`CharlieShop/Data/DbConnection.cs`](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Data/DbConnection.cs) (DB connection factory), [`CharlieShop/Controllers/AccountController.cs`](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/AccountController.cs) (Account access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and identity"]
  node_mvc["MVC routing<br/>[Program.cs]"]
  node_account["Account access"]
  node_account_views["Account screens"]
  node_home["Home pages<br/>[HomeController.cs]"]
  node_home_views["Home views"]
end

subgraph group_people["User administration"]
  node_users["User administration"]
  node_user_views["User screens"]
  node_user_models["User models"]
end

subgraph group_shop["Shop operations"]
  node_customers["Customer management"]
  node_receivables["Receivables"]
  node_inventory["Inventory"]
  node_products["Product catalog"]
  node_sales["Sales"]
  node_reports["Reports"]
  node_dashboard["Dashboard"]
  node_assistant["Assistant"]
end

subgraph group_shared["Shared services"]
  node_db_factory["DB connection factory<br/>[DbConnection.cs]"]
  node_database[("PostgreSQL database")]
  node_email["Email sender<br/>[EmailService.cs]"]
  node_smtp["SMTP service"]
  node_email_settings["Email settings<br/>[EmailSettings.cs]"]
end

node_browser(("Browser user"))

node_browser -->|"sends requests"| node_mvc
node_mvc -->|"routes by default"| node_account
node_mvc -->|"routes MVC requests"| node_home
node_account -->|"opens connections"| node_db_factory
node_account -->|"sends recovery email"| node_email
node_users -->|"opens connections"| node_db_factory
node_db_factory -->|"creates PostgreSQL connection"| node_database
node_email -->|"sends mail"| node_smtp
node_mvc -->|"registers service"| node_db_factory
node_mvc -->|"registers service"| node_email
node_mvc -->|"configures options"| node_email_settings
node_email -->|"reads settings"| node_email_settings

click node_mvc "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Program.cs"
click node_account "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/AccountController.cs"
click node_account_views "https://github.com/kevinfide/charlieshop/tree/main/CharlieShop/Views/Home"
click node_home "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/HomeController.cs"
click node_home_views "https://github.com/kevinfide/charlieshop/tree/main/CharlieShop/Views/Home"
click node_users "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/UsuariosController.cs"
click node_user_views "https://github.com/kevinfide/charlieshop/tree/main/CharlieShop/Views/Usuarios"
click node_user_models "https://github.com/kevinfide/charlieshop/tree/main/CharlieShop/Models"
click node_customers "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/ClientesController.cs"
click node_receivables "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/CuentasPorCobrarController.cs"
click node_inventory "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/InventarioController.cs"
click node_products "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/ProductosController.cs"
click node_sales "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/VentasController.cs"
click node_reports "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/ReportesController.cs"
click node_dashboard "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/DashboardController.cs"
click node_assistant "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/AsistenteController.cs"
click node_db_factory "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Data/DbConnection.cs"
click node_email "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Services/EmailService.cs"
click node_email_settings "https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Models/EmailSettings.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_account,node_account_views,node_home,node_home_views,node_browser toneBlue
class node_users,node_user_views,node_user_models toneAmber
class node_customers,node_receivables,node_inventory,node_products,node_sales,node_reports,node_dashboard,node_assistant toneMint
class node_db_factory,node_database,node_email,node_smtp,node_email_settings toneRose
```

## Components

### Web and identity

- [MVC routing](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Program.cs): `CharlieShop/Program.cs`
- [Account access](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/AccountController.cs): `CharlieShop/Controllers/AccountController.cs`
- [Account screens](https://github.com/kevinfide/charlieshop/tree/main/CharlieShop/Views/Home): `CharlieShop/Views/Home`
- [Home pages](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/HomeController.cs): `CharlieShop/Controllers/HomeController.cs`
- [Home views](https://github.com/kevinfide/charlieshop/tree/main/CharlieShop/Views/Home): `CharlieShop/Views/Home`

### User administration

- [User administration](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/UsuariosController.cs): `CharlieShop/Controllers/UsuariosController.cs`
- [User screens](https://github.com/kevinfide/charlieshop/tree/main/CharlieShop/Views/Usuarios): `CharlieShop/Views/Usuarios`
- [User models](https://github.com/kevinfide/charlieshop/tree/main/CharlieShop/Models): `CharlieShop/Models`

### Shop operations

- [Customer management](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/ClientesController.cs): `CharlieShop/Controllers/ClientesController.cs`
- [Receivables](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/CuentasPorCobrarController.cs): `CharlieShop/Controllers/CuentasPorCobrarController.cs`
- [Inventory](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/InventarioController.cs): `CharlieShop/Controllers/InventarioController.cs`
- [Product catalog](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/ProductosController.cs): `CharlieShop/Controllers/ProductosController.cs`
- [Sales](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/VentasController.cs): `CharlieShop/Controllers/VentasController.cs`
- [Reports](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/ReportesController.cs): `CharlieShop/Controllers/ReportesController.cs`
- [Dashboard](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/DashboardController.cs): `CharlieShop/Controllers/DashboardController.cs`
- [Assistant](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Controllers/AsistenteController.cs): `CharlieShop/Controllers/AsistenteController.cs`

### Shared services

- [DB connection factory](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Data/DbConnection.cs): `CharlieShop/Data/DbConnection.cs`
- **PostgreSQL database**
- [Email sender](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Services/EmailService.cs): `CharlieShop/Services/EmailService.cs`
- **SMTP service**
- [Email settings](https://github.com/kevinfide/charlieshop/blob/main/CharlieShop/Models/EmailSettings.cs): `CharlieShop/Models/EmailSettings.cs`

### Other components

- **Browser user**

## Connections

- Browser user → MVC routing: sends requests (evidence: `CharlieShop/Program.cs`)
- MVC routing → Account access: routes by default (evidence: `CharlieShop/Program.cs`)
- MVC routing → Home pages: routes MVC requests (evidence: `CharlieShop/Program.cs`)
- Account access → DB connection factory: opens connections (evidence: `CharlieShop/Controllers/AccountController.cs`)
- Account access → Email sender: sends recovery email (evidence: `CharlieShop/Controllers/AccountController.cs`)
- User administration → DB connection factory: opens connections (evidence: `CharlieShop/Controllers/UsuariosController.cs`)
- DB connection factory → PostgreSQL database: creates PostgreSQL connection (evidence: `CharlieShop/Data/DbConnection.cs`)
- Email sender → SMTP service: sends mail (evidence: `CharlieShop/Services/EmailService.cs`)
- MVC routing → DB connection factory: registers service (evidence: `CharlieShop/Program.cs`)
- MVC routing → Email sender: registers service (evidence: `CharlieShop/Program.cs`)
- MVC routing → Email settings: configures options (evidence: `CharlieShop/Program.cs`)
- Email sender → Email settings: reads settings (evidence: `CharlieShop/Services/EmailService.cs`)
