# nitish-11k/founder-kit architecture

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

- Interactive diagram: https://gitdiagram.com/nitish-11k/founder-kit
- Repository: https://github.com/nitish-11k/founder-kit

## Overview

FounderKit is an ASP.NET Core identity API. Users register and verify an OTP sent by email, then log in to receive a JWT; authenticated users can retrieve their profile. The API also supports OTP-based password reset and resend flows. Program.cs wires Identity to EF Core, configures JWT authentication, and validates a system license at startup. The excerpts show these runtime relationships, but the README is empty and the license validator has no source path in the tree, so its implementation is not represented.

Main entry points: [`FounderKit.API/Program.cs`](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.API/Program.cs) (API host), [`FounderKit.API/Controllers/AuthController.cs`](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.API/Controllers/AuthController.cs) (Account auth), [`FounderKit.API/Controllers/ProfileController.cs`](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.API/Controllers/ProfileController.cs) (Profile endpoint), [`FounderKit.Infrastructure/Persistence/AppDbContext.cs`](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.Infrastructure/Persistence/AppDbContext.cs) (Identity context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API endpoints"]
  node_auth["Account auth<br/>[AuthController.cs]"]
  node_profile["Profile endpoint"]
  node_app["API host<br/>[Program.cs]"]
end

subgraph group_identity["Identity data"]
  node_user_model["Application user<br/>[ApplicationUser.cs]"]
  node_identity_manager["Identity manager"]
  node_db_context["Identity context<br/>[AppDbContext.cs]"]
  node_sql[("SQL database")]
end

subgraph group_messaging["Email delivery"]
  node_email_contract["Email contract<br/>[IEmailServices.cs]"]
  node_email_service["SMTP email<br/>[EmailService.cs]"]
end

subgraph group_startup["Startup services"]
  node_license["License validator"]
end

node_user(("API user"))
node_smtp["SMTP server"]

node_user -->|"sends requests"| node_auth
node_user -->|"requests profile"| node_profile
node_app -->|"maps controllers"| node_auth
node_app -->|"maps controllers"| node_profile
node_auth -->|"manages accounts"| node_identity_manager
node_profile -->|"finds account"| node_identity_manager
node_auth -->|"creates and updates"| node_user_model
node_profile -->|"returns profile fields"| node_user_model
node_app -->|"configures SQL context"| node_db_context
node_db_context -->|"stores identity users"| node_user_model
node_app -->|"registers EF stores"| node_identity_manager
node_db_context -->|"uses connection"| node_sql
node_auth -->|"sends OTP email"| node_email_contract
node_app -->|"registers implementation"| node_email_service
node_email_service -->|"implements"| node_email_contract
node_email_service -->|"sends messages"| node_smtp
node_app -->|"validates at startup"| node_license

click node_auth "https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.API/Controllers/AuthController.cs"
click node_profile "https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.API/Controllers/ProfileController.cs"
click node_app "https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.API/Program.cs"
click node_user_model "https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.Domain/Entities/ApplicationUser.cs"
click node_db_context "https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.Infrastructure/Persistence/AppDbContext.cs"
click node_email_contract "https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.Application/Interfaces/IEmailServices.cs"
click node_email_service "https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.Infrastructure/Services/EmailService.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_auth,node_profile,node_app,node_user toneBlue
class node_user_model,node_identity_manager,node_db_context,node_sql toneAmber
class node_email_contract,node_email_service,node_smtp toneMint
class node_license toneRose
```

## Components

### API endpoints

- [Account auth](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.API/Controllers/AuthController.cs): `FounderKit.API/Controllers/AuthController.cs`
- [Profile endpoint](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.API/Controllers/ProfileController.cs): `FounderKit.API/Controllers/ProfileController.cs`
- [API host](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.API/Program.cs): `FounderKit.API/Program.cs`

### Identity data

- [Application user](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.Domain/Entities/ApplicationUser.cs): `FounderKit.Domain/Entities/ApplicationUser.cs`
- **Identity manager**
- [Identity context](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.Infrastructure/Persistence/AppDbContext.cs): `FounderKit.Infrastructure/Persistence/AppDbContext.cs`
- **SQL database**

### Email delivery

- [Email contract](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.Application/Interfaces/IEmailServices.cs): `FounderKit.Application/Interfaces/IEmailServices.cs`
- [SMTP email](https://github.com/nitish-11k/founder-kit/blob/main/FounderKit.Infrastructure/Services/EmailService.cs): `FounderKit.Infrastructure/Services/EmailService.cs`

### Startup services

- **License validator**

### Other components

- **API user**
- **SMTP server**

## Connections

- API user → Account auth: sends requests (evidence: `FounderKit.API/Controllers/AuthController.cs`)
- API user → Profile endpoint: requests profile (evidence: `FounderKit.API/Controllers/ProfileController.cs`)
- API host → Account auth: maps controllers (evidence: `FounderKit.API/Program.cs`)
- API host → Profile endpoint: maps controllers (evidence: `FounderKit.API/Program.cs`)
- Account auth → Identity manager: manages accounts (evidence: `FounderKit.API/Controllers/AuthController.cs`)
- Profile endpoint → Identity manager: finds account (evidence: `FounderKit.API/Controllers/ProfileController.cs`)
- Account auth → Application user: creates and updates (evidence: `FounderKit.API/Controllers/AuthController.cs`)
- Profile endpoint → Application user: returns profile fields (evidence: `FounderKit.API/Controllers/ProfileController.cs`)
- API host → Identity context: configures SQL context (evidence: `FounderKit.API/Program.cs`)
- Identity context → Application user: stores identity users (evidence: `FounderKit.Infrastructure/Persistence/AppDbContext.cs`)
- API host → Identity manager: registers EF stores (evidence: `FounderKit.API/Program.cs`)
- Identity context → SQL database: uses connection
- Account auth → Email contract: sends OTP email (evidence: `FounderKit.API/Controllers/AuthController.cs`)
- API host → SMTP email: registers implementation (evidence: `FounderKit.API/Program.cs`)
- SMTP email → Email contract: implements (evidence: `FounderKit.Infrastructure/Services/EmailService.cs`)
- SMTP email → SMTP server: sends messages (evidence: `FounderKit.Infrastructure/Services/EmailService.cs`)
- API host → License validator: validates at startup (evidence: `FounderKit.API/Program.cs`)
