# thomast-dev-dot/startuphub architecture

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

- Interactive diagram: https://gitdiagram.com/thomast-dev-dot/startuphub
- Repository: https://github.com/thomast-dev-dot/startuphub

## Overview

StartupHub is an ASP.NET MVC application for managing startup organizations and their founders. Users browse or create records, maintain founder-to-startup associations, archive or restore startups, and view portfolio statistics. MVC controllers coordinate these operations through the shared Entity Framework context, which persists startup, founder, and Identity data in SQL Server; Razor views present the results. The source excerpts establish these controller-to-context interactions, but do not show view rendering references or Identity UI internals, so those links are omitted or marked unverified.

Main entry points: [`StartupHub/Program.cs`](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Program.cs) (MVC endpoints), [`StartupHub/Models/ApplicationDbContext.cs`](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/ApplicationDbContext.cs) (EF data context), [`StartupHub/Controllers/StartupsController.cs`](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Controllers/StartupsController.cs) (Startup operations), [`StartupHub/Controllers/HomeController.cs`](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Controllers/HomeController.cs) (Home pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_mvc["MVC endpoints<br/>[Program.cs]"]
  node_home["Home pages<br/>[HomeController.cs]"]
  node_razor["Razor views"]
end

subgraph group_management["Startup management"]
  node_startup_ops["Startup operations"]
  node_founder_ops["Founder operations"]
  node_stats["Portfolio summary"]
end

subgraph group_identity["Identity and persistence"]
  node_context["EF data context"]
  node_sql[("SQL Server database")]
  node_identity_ui["Identity UI<br/>[Program.cs]"]
end

subgraph group_domain["Domain data"]
  node_startup_model["Startup records<br/>[Startup.cs]"]
  node_founder_model["Founder records<br/>[Founder.cs]"]
  node_error_model["Error details<br/>[ErrorViewModel.cs]"]
end

node_user(("Browser user"))

node_user -.->|"sends requests"| node_mvc
node_mvc -.->|"routes requests"| node_home
node_mvc -.->|"routes requests"| node_startup_ops
node_mvc -.->|"routes requests"| node_founder_ops
node_mvc -.->|"maps MVC views"| node_razor
node_startup_ops -->|"queries and saves"| node_context
node_founder_ops -->|"queries and saves"| node_context
node_home -->|"creates error model"| node_error_model
node_startup_ops -->|"builds summary"| node_stats
node_context -->|"maps records"| node_startup_model
node_context -->|"maps records"| node_founder_model
node_founder_model -->|"references startup"| node_startup_model
node_context -.->|"persists data"| node_sql
node_mvc -->|"configures service"| node_context
node_mvc -->|"maps Razor Pages"| node_identity_ui

click node_mvc "https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Program.cs"
click node_home "https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Controllers/HomeController.cs"
click node_startup_ops "https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Controllers/StartupsController.cs"
click node_founder_ops "https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Controllers/FoundersController.cs"
click node_stats "https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/StartupStatsViewModel.cs"
click node_startup_model "https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/Startup.cs"
click node_founder_model "https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/Founder.cs"
click node_error_model "https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/ErrorViewModel.cs"
click node_context "https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/ApplicationDbContext.cs"
click node_identity_ui "https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Program.cs"
click node_razor "https://github.com/thomast-dev-dot/startuphub/tree/master/StartupHub/Views"

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_home,node_razor,node_user toneBlue
class node_startup_ops,node_founder_ops,node_stats toneAmber
class node_context,node_sql,node_identity_ui toneMint
class node_startup_model,node_founder_model,node_error_model toneRose
```

## Components

### Web experience

- [MVC endpoints](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Program.cs): `StartupHub/Program.cs`
- [Home pages](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Controllers/HomeController.cs): `StartupHub/Controllers/HomeController.cs`
- [Razor views](https://github.com/thomast-dev-dot/startuphub/tree/master/StartupHub/Views): `StartupHub/Views`

### Startup management

- [Startup operations](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Controllers/StartupsController.cs): `StartupHub/Controllers/StartupsController.cs`
- [Founder operations](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Controllers/FoundersController.cs): `StartupHub/Controllers/FoundersController.cs`
- [Portfolio summary](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/StartupStatsViewModel.cs): `StartupHub/Models/StartupStatsViewModel.cs`

### Identity and persistence

- [EF data context](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/ApplicationDbContext.cs): `StartupHub/Models/ApplicationDbContext.cs`
- **SQL Server database**
- [Identity UI](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Program.cs): `StartupHub/Program.cs`

### Domain data

- [Startup records](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/Startup.cs): `StartupHub/Models/Startup.cs`
- [Founder records](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/Founder.cs): `StartupHub/Models/Founder.cs`
- [Error details](https://github.com/thomast-dev-dot/startuphub/blob/master/StartupHub/Models/ErrorViewModel.cs): `StartupHub/Models/ErrorViewModel.cs`

### Other components

- **Browser user**

## Connections

- Browser user → MVC endpoints: sends requests
- MVC endpoints → Home pages: routes requests
- MVC endpoints → Startup operations: routes requests
- MVC endpoints → Founder operations: routes requests
- MVC endpoints → Razor views: maps MVC views
- Startup operations → EF data context: queries and saves (evidence: `StartupHub/Controllers/StartupsController.cs`)
- Founder operations → EF data context: queries and saves (evidence: `StartupHub/Controllers/FoundersController.cs`)
- Home pages → Error details: creates error model (evidence: `StartupHub/Controllers/HomeController.cs`)
- Startup operations → Portfolio summary: builds summary (evidence: `StartupHub/Controllers/StartupsController.cs`)
- EF data context → Startup records: maps records (evidence: `StartupHub/Models/ApplicationDbContext.cs`)
- EF data context → Founder records: maps records (evidence: `StartupHub/Models/ApplicationDbContext.cs`)
- Founder records → Startup records: references startup (evidence: `StartupHub/Models/Founder.cs`)
- EF data context → SQL Server database: persists data
- MVC endpoints → EF data context: configures service (evidence: `StartupHub/Program.cs`)
- MVC endpoints → Identity UI: maps Razor Pages (evidence: `StartupHub/Program.cs`)
