# fullstackhero/dotnet-starter-kit architecture

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

- Interactive diagram: https://gitdiagram.com/fullstackhero/dotnet-starter-kit
- Repository: https://github.com/fullstackhero/dotnet-starter-kit

## Overview

FullStackHero is a source-owned, multi-tenant SaaS starter kit: a modular .NET API backend and separate operator and tenant React applications. The main user workflow is to sign in, use an app’s domain screens, and exchange data with the API; the backend routes work into bounded-context modules backed by shared persistence and services. The README also documents CLI scaffolding, migrations, real-time features, and external infrastructure. Several backend modules and integrations are unsampled, so those branches reflect README-level capabilities rather than inspected implementation details.

Main entry points: [`src/Host/FSH.Starter.Api/Program.cs`](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Host/FSH.Starter.Api/Program.cs) (Minimal API host), [`src/Modules/Auditing/Modules.Auditing/Features/v1/GetAudits/GetAuditsQueryHandler.cs`](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Auditing/Modules.Auditing/Features/v1/GetAudits/GetAuditsQueryHandler.cs) (Audit queries), [`src/BuildingBlocks/Storage/QuotaMeteredStorageService.cs`](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/BuildingBlocks/Storage/QuotaMeteredStorageService.cs) (Quota-metered storage), [`clients/admin/src/routes.tsx`](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/clients/admin/src/routes.tsx) (Admin console)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React applications"]
  node_admin_app["Admin console<br/>[routes.tsx]"]
  node_tenant_app["Tenant dashboard<br/>[routes.tsx]"]
end

subgraph group_backend["API and domain modules"]
  node_api["Minimal API host<br/>[Program.cs]"]
  node_identity["Identity and access<br/>[IdentityModule.cs]"]
  node_tenancy["Tenant management"]
  node_billing["Billing<br/>[Modules.Billing]"]
  node_catalog_tickets["Catalog and tickets<br/>[Modules.Catalog]"]
  node_chat["Chat and realtime"]
  node_files["File management<br/>[Modules.Files]"]
  node_webhooks["Webhooks<br/>[Modules.Webhooks]"]
  node_auditing["Audit queries"]
  node_audit_store[("Audit persistence<br/>[AuditDbContext.cs]")]
end

subgraph group_platform["Shared platform services"]
  node_shared_contracts["Shared domain context"]
  node_storage_quota["Quota-metered storage"]
  node_s3_storage["S3 storage"]
  node_local_storage["Local storage"]
end

subgraph group_operations["Provisioning and infrastructure"]
  node_migrator["Database migrator<br/>[Program.cs]"]
  node_cli["fsh CLI<br/>[Program.cs]"]
  node_database[("PostgreSQL")]
  node_cache_jobs["Valkey and Hangfire"]
  node_object_store[("S3-compatible store")]
  node_realtime_service["SignalR and SSE"]
end

node_operator(("Operator"))
node_tenant_user(("Tenant user"))

node_operator -->|"uses"| node_admin_app
node_tenant_user -->|"uses"| node_tenant_app
node_admin_app -->|"requests data"| node_api
node_tenant_app -->|"requests data"| node_api
node_api -->|"dispatches to"| node_identity
node_api -->|"dispatches to"| node_tenancy
node_api -->|"dispatches to"| node_billing
node_api -->|"dispatches to"| node_catalog_tickets
node_api -->|"dispatches to"| node_chat
node_api -->|"dispatches to"| node_files
node_api -->|"dispatches to"| node_webhooks
node_api -->|"dispatches to"| node_auditing
node_auditing -->|"queries"| node_audit_store
node_auditing -->|"checks permission"| node_identity
node_chat -->|"queries messages"| node_database
node_audit_store -->|"persists audit records"| node_database
node_api -->|"uses shared context"| node_shared_contracts
node_storage_quota -->|"delegates storage"| node_s3_storage
node_storage_quota -->|"delegates storage"| node_local_storage
node_api -.->|"uses services"| node_cache_jobs
node_files -->|"uses storage"| node_storage_quota
node_s3_storage -->|"reads and writes"| node_object_store
node_api -.->|"serves realtime"| node_realtime_service
node_migrator -->|"migrates schema"| node_database
node_cli -->|"scaffolds project"| node_operator

click node_admin_app "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/clients/admin/src/routes.tsx"
click node_tenant_app "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/clients/dashboard/src/routes.tsx"
click node_api "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Host/FSH.Starter.Api/Program.cs"
click node_identity "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Identity/Modules.Identity/IdentityModule.cs"
click node_tenancy "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Multitenancy/Modules.Multitenancy/MultitenancyModule.cs"
click node_billing "https://github.com/fullstackhero/dotnet-starter-kit/tree/main/src/Modules/Billing/Modules.Billing"
click node_catalog_tickets "https://github.com/fullstackhero/dotnet-starter-kit/tree/main/src/Modules/Catalog/Modules.Catalog"
click node_chat "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Chat/Modules.Chat/Features/v1/Search/SearchMessagesQueryHandler.cs"
click node_files "https://github.com/fullstackhero/dotnet-starter-kit/tree/main/src/Modules/Files/Modules.Files"
click node_webhooks "https://github.com/fullstackhero/dotnet-starter-kit/tree/main/src/Modules/Webhooks/Modules.Webhooks"
click node_auditing "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Auditing/Modules.Auditing/Features/v1/GetAudits/GetAuditsQueryHandler.cs"
click node_audit_store "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Auditing/Modules.Auditing/Persistence/AuditDbContext.cs"
click node_shared_contracts "https://github.com/fullstackhero/dotnet-starter-kit/tree/main/src/BuildingBlocks/Shared"
click node_storage_quota "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/BuildingBlocks/Storage/QuotaMeteredStorageService.cs"
click node_s3_storage "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/BuildingBlocks/Storage/S3/S3StorageService.cs"
click node_local_storage "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/BuildingBlocks/Storage/Local/LocalStorageService.cs"
click node_migrator "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Host/FSH.Starter.DbMigrator/Program.cs"
click node_cli "https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Tools/CLI/Program.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_admin_app,node_tenant_app,node_tenant_user toneBlue
class node_api,node_identity,node_tenancy,node_billing,node_catalog_tickets,node_chat,node_files,node_webhooks,node_auditing,node_audit_store toneAmber
class node_shared_contracts,node_storage_quota,node_s3_storage,node_local_storage toneMint
class node_migrator,node_cli,node_database,node_cache_jobs,node_object_store,node_realtime_service toneRose
class node_operator toneIndigo
```

## Components

### React applications

- [Admin console](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/clients/admin/src/routes.tsx): `clients/admin/src/routes.tsx`
- [Tenant dashboard](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/clients/dashboard/src/routes.tsx): `clients/dashboard/src/routes.tsx`

### API and domain modules

- [Minimal API host](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Host/FSH.Starter.Api/Program.cs): `src/Host/FSH.Starter.Api/Program.cs`
- [Identity and access](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Identity/Modules.Identity/IdentityModule.cs): `src/Modules/Identity/Modules.Identity/IdentityModule.cs`
- [Tenant management](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Multitenancy/Modules.Multitenancy/MultitenancyModule.cs): `src/Modules/Multitenancy/Modules.Multitenancy/MultitenancyModule.cs`
- [Billing](https://github.com/fullstackhero/dotnet-starter-kit/tree/main/src/Modules/Billing/Modules.Billing): `src/Modules/Billing/Modules.Billing`
- [Catalog and tickets](https://github.com/fullstackhero/dotnet-starter-kit/tree/main/src/Modules/Catalog/Modules.Catalog): `src/Modules/Catalog/Modules.Catalog`
- [Chat and realtime](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Chat/Modules.Chat/Features/v1/Search/SearchMessagesQueryHandler.cs): `src/Modules/Chat/Modules.Chat/Features/v1/Search/SearchMessagesQueryHandler.cs`
- [File management](https://github.com/fullstackhero/dotnet-starter-kit/tree/main/src/Modules/Files/Modules.Files): `src/Modules/Files/Modules.Files`
- [Webhooks](https://github.com/fullstackhero/dotnet-starter-kit/tree/main/src/Modules/Webhooks/Modules.Webhooks): `src/Modules/Webhooks/Modules.Webhooks`
- [Audit queries](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Auditing/Modules.Auditing/Features/v1/GetAudits/GetAuditsQueryHandler.cs): `src/Modules/Auditing/Modules.Auditing/Features/v1/GetAudits/GetAuditsQueryHandler.cs`
- [Audit persistence](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Modules/Auditing/Modules.Auditing/Persistence/AuditDbContext.cs): `src/Modules/Auditing/Modules.Auditing/Persistence/AuditDbContext.cs`

### Shared platform services

- [Shared domain context](https://github.com/fullstackhero/dotnet-starter-kit/tree/main/src/BuildingBlocks/Shared): `src/BuildingBlocks/Shared`
- [Quota-metered storage](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/BuildingBlocks/Storage/QuotaMeteredStorageService.cs): `src/BuildingBlocks/Storage/QuotaMeteredStorageService.cs`
- [S3 storage](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/BuildingBlocks/Storage/S3/S3StorageService.cs): `src/BuildingBlocks/Storage/S3/S3StorageService.cs`
- [Local storage](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/BuildingBlocks/Storage/Local/LocalStorageService.cs): `src/BuildingBlocks/Storage/Local/LocalStorageService.cs`

### Provisioning and infrastructure

- [Database migrator](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Host/FSH.Starter.DbMigrator/Program.cs): `src/Host/FSH.Starter.DbMigrator/Program.cs`
- [fsh CLI](https://github.com/fullstackhero/dotnet-starter-kit/blob/main/src/Tools/CLI/Program.cs): `src/Tools/CLI/Program.cs`
- **PostgreSQL**
- **Valkey and Hangfire**
- **S3-compatible store**
- **SignalR and SSE**

### Other components

- **Operator**
- **Tenant user**

## Connections

- Operator → Admin console: uses
- Tenant user → Tenant dashboard: uses
- Admin console → Minimal API host: requests data
- Tenant dashboard → Minimal API host: requests data
- Minimal API host → Identity and access: dispatches to (evidence: `src/Host/FSH.Starter.Api/Program.cs`)
- Minimal API host → Tenant management: dispatches to (evidence: `src/Host/FSH.Starter.Api/Program.cs`)
- Minimal API host → Billing: dispatches to (evidence: `src/Host/FSH.Starter.Api/Program.cs`)
- Minimal API host → Catalog and tickets: dispatches to (evidence: `src/Host/FSH.Starter.Api/Program.cs`)
- Minimal API host → Chat and realtime: dispatches to
- Minimal API host → File management: dispatches to (evidence: `src/Host/FSH.Starter.Api/Program.cs`)
- Minimal API host → Webhooks: dispatches to (evidence: `src/Host/FSH.Starter.Api/Program.cs`)
- Minimal API host → Audit queries: dispatches to
- Audit queries → Audit persistence: queries (evidence: `src/Modules/Auditing/Modules.Auditing/Features/v1/GetAudits/GetAuditsQueryHandler.cs`)
- Audit queries → Identity and access: checks permission (evidence: `src/Modules/Auditing/Modules.Auditing/Features/v1/GetAudits/GetAuditsQueryHandler.cs`)
- Chat and realtime → PostgreSQL: queries messages (evidence: `src/Modules/Chat/Modules.Chat/Features/v1/Search/SearchMessagesQueryHandler.cs`)
- Audit persistence → PostgreSQL: persists audit records
- Minimal API host → Shared domain context: uses shared context (evidence: `src/Host/FSH.Starter.Api/Program.cs`)
- Quota-metered storage → S3 storage: delegates storage (evidence: `src/BuildingBlocks/Storage/QuotaMeteredStorageService.cs`)
- Quota-metered storage → Local storage: delegates storage (evidence: `src/BuildingBlocks/Storage/QuotaMeteredStorageService.cs`)
- Minimal API host → Valkey and Hangfire: uses services
- File management → Quota-metered storage: uses storage
- S3 storage → S3-compatible store: reads and writes (evidence: `src/BuildingBlocks/Storage/S3/S3StorageService.cs`)
- Minimal API host → SignalR and SSE: serves realtime
- Database migrator → PostgreSQL: migrates schema
- fsh CLI → Operator: scaffolds project
