# isaacojeda/devtoposts architecture

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

- Interactive diagram: https://gitdiagram.com/isaacojeda/devtoposts
- Repository: https://github.com/isaacojeda/devtoposts

## Overview

##### Overall structure
- Realize that the repository is not a single application but a collection of independent projects/samples.

##### Main components
- For full‑stack demos, clearly distinguish the client (typically Angular/Blazor code in directories like “ClientApp”, “Components” or “Pages”) from the server (API, SignalR hubs, Controllers, Program.cs, etc.). For instance, in AngularJwtBFF or SignalRExample, show the separation between the Angular (or Blazor) client and the corresponding .NET back‑end.
- For API or authentication examples, highlight the API endpoints, middleware components, database access layers (Persistence, Migrations, DbContext) and any authentication handlers (e.g. ApiKeySchemeHandler, Token/Authorization controllers).

##### Interactions and dependencies
- For multitenancy projects (MultiTenantApi and MultiTenantSingleDatabase), show how requests are routed via a tenant resolution strategy, with a shared database layer and the separation of tenant and admin contexts.

##### Architectural patterns and technology choices
- Areas where design principles or patterns are used: for example, the DecoratorPattern project clearly demonstrates layering (a basic WeatherService decorated with caching and logging).
- That many projects employ the .NET “minimal API” style (e.g., MinimalAPIFluentValidation, MinimalApiScrutor, MinimalApis) with dependency injection, middleware, and configuration layers.
– Rounded rectangles for back‑end components (Controllers, Services, Workers)

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Full-Stack Demos"
        AJ_Client["AngularJwtBFF - Client"]:::frontend
        AJ_Server["AngularJwtBFF - Server"]:::backend
        SE_AngClient["SignalRExample - Angular Client"]:::frontend
        SE_API["SignalRExample - API/SignalR Hub"]:::backend
        AJ_Client -->|"HTTP_Request"| AJ_Server
        SE_AngClient -->|"WebSocket"| SE_API
    end

    subgraph "Auth & Security Samples"
        AKCA["ApiKeyCustomAuth"]:::backend
        OIE["OpenIddictExample"]:::backend
        SCE["SecureCookiesExample"]:::backend
        WA["WebApiJwt"]:::backend
        AKCA ---|"Alternative_Auth"| WA
        OIE ---|"Provides_Tokens"| WA
        SCE ---|"Secure_Session"| WA
    end

    subgraph "Messaging & Integration Patterns"
        DE["DomainEventsExample"]:::integration
        OPE["OutboxPatternExample"]:::integration
        IEE["IntegrationEventsExample"]:::integration
        DE -->|"Triggers"| OPE
        OPE -->|"Processes"| IEE
    end

    subgraph "Minimal API Samples"
        MAFV["MinimalAPIFluentValidation"]:::minimal
        MAS["MinimalApiScrutor"]:::minimal
        MA["MinimalApis"]:::minimal
        MAFV -->|"Uses_DI"| MA
        MAS -->|"Adds_Extensions"| MA
    end

    subgraph "Multi-Tenant Infrastructure"
        MTA["MultiTenantApi"]:::multiTenant
        MTSD["MultiTenantSingleDatabase"]:::multiTenant
        MTA -->|"Routes_Tenant_Requests"| MTSD
    end

    subgraph "Experimental"
        DCE["DistributedCacheExample"]:::experimental
        DT["DurableTask"]:::experimental
        DCE ---|"Orchestrates"| DT
    end

    subgraph "Architectural Pattern"
        DP["DecoratorPattern"]:::backend
    end

    subgraph "Testing & Integration"
        TC["TestContainers"]:::integration
    end

    %% Click Events
    click AJ_Client "https://github.com/isaacojeda/devtoposts/tree/main/AngularJwtBFF/"
    click AJ_Server "https://github.com/isaacojeda/devtoposts/tree/main/AngularJwtBFF/"
    click SE_AngClient "https://github.com/isaacojeda/devtoposts/tree/main/SignalRExample/"
    click SE_API "https://github.com/isaacojeda/devtoposts/tree/main/SignalRExample/"
    click AKCA "https://github.com/isaacojeda/devtoposts/tree/main/ApiKeyCustomAuth/"
    click OIE "https://github.com/isaacojeda/devtoposts/tree/main/OpenIddictExample/"
    click SCE "https://github.com/isaacojeda/devtoposts/tree/main/SecureCookiesExample/"
    click WA "https://github.com/isaacojeda/devtoposts/tree/main/WebApiJwt/"
    click DE "https://github.com/isaacojeda/devtoposts/tree/main/DomainEventsExample/"
    click OPE "https://github.com/isaacojeda/devtoposts/tree/main/OutboxPatternExample/"
    click IEE "https://github.com/isaacojeda/devtoposts/tree/main/IntegrationEventsExample/"
    click MAFV "https://github.com/isaacojeda/devtoposts/tree/main/MinimalAPIFluentValidation/"
    click MAS "https://github.com/isaacojeda/devtoposts/tree/main/MinimalApiScrutor/"
    click MA "https://github.com/isaacojeda/devtoposts/tree/main/MinimalApis/"
    click MTA "https://github.com/isaacojeda/devtoposts/tree/main/MultiTenantApi/"
    click MTSD "https://github.com/isaacojeda/devtoposts/tree/main/MultiTenantSingleDatabase/"
    click DCE "https://github.com/isaacojeda/devtoposts/tree/main/DistributedCacheExample/"
    click DT "https://github.com/isaacojeda/devtoposts/tree/main/DurableTask/"
    click DP "https://github.com/isaacojeda/devtoposts/tree/main/DecoratorPattern/"
    click TC "https://github.com/isaacojeda/devtoposts/tree/main/TestContainers/"

    %% Styles
    classDef frontend fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef backend fill:#A9DFBF,stroke:#145A32,stroke-width:2px;
    classDef integration fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef minimal fill:#D6EAF8,stroke:#1F618D,stroke-width:2px;
    classDef multiTenant fill:#FADBD8,stroke:#922B21,stroke-width:2px;
    classDef experimental fill:#E8DAEF,stroke:#6C3483,stroke-width:2px;
```
