# germann-ux/acc-complex architecture

> Architecture diagram of the GitHub repository germann-ux/acc-complex, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/germann-ux/acc-complex
- Repository: https://github.com/germann-ux/acc-complex

## Overview

##### Project type and purpose
- From the file tree and minimal README (“ACC‐Complex”), it’s clear this is a full-stack .NET solution for an educational platform (“ACC”) that includes a Blazor-based frontend, a RESTful API, data persistence via EF Core, shared DTOs/services, external integrations (e.g., a compile service), identity management, and tests.
- Key features: interactive C compiler page, course content navigation, classroom views (students/teachers), library, progress tracking, notifications, and user/account management.

##### File structure
- Top-level solution projects:
- ACC.WebApp & ACC.WebApp.Client – Blazor Server/Client Web UI and static asset hosting, plus authentication components.
- src/ACC.API – ASP.NET Core Web API with Controllers → Services → Interfaces layered structure.
- src/ACC.Data – EF Core DbContext + Entities + Migrations for a SQL database.
- src/ACC.Shared – Shared DTOs, interfaces, core services (e.g., CompileService, ServiceResult).
- src/ACC.ExternalClients – clients/integrations for external services (e.g., external compilers, SMS, email).
- src/ACC.AppHost – generic host project (likely used to wire up/run the API in some environments).
- ACC.ServiceDefaults – shared default configuration and extension helpers.
- tests/ACC.Tests – unit tests for services (e.g., NavegacionContenidoServiceTests).

##### README for architecture hints
- The README only names the project “ACC-Complex,” so we rely on code structure to infer architecture: a layered, modular design with clear separation of concerns and dependency-injected services.

##### Essential details to capture
- Authentication flow: Browser → Identity components in ACC.WebApp → Protected API endpoints.
- Compile flow: Compiler page → CompilerController → CompileService → External compile engine.
- Expose the Shared DTO boundary between client and server.
- Migrations updating the database schema.
- Unit tests as a separate validation overlay against service implementations.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Entity
    Browser["Browser"]:::external

    %% UI Layer
    subgraph "UI Layer"
        direction TB
        Host["ACC.WebApp (Host)"]:::frontend
        Client["ACC.WebApp.Client (Blazor WASM)"]:::frontend
        Identity["Account Components"]:::frontend
    end

    %% API Layer
    subgraph "API Layer"
        direction TB
        Controllers["Controllers"]:::api
        Services["Services"]:::api
        Interfaces["Service Interfaces"]:::api
        Mapping["AutoMapper Profile"]:::api
    end

    %% Data Layer
    subgraph "Data Layer"
        direction TB
        DbContext["ACCDbContext"]:::data
        Entities["Entities"]:::data
        Migrations["Migrations"]:::data
        DB["SQL Database"]:::data
    end

    %% External Services
    subgraph "External Services"
        direction TB
        ExternalClients["External Integrations"]:::external
    end

    %% Shared Libraries
    subgraph "Shared Libraries"
        direction TB
        DTOs["DTOs"]:::shared
        SharedInterfaces["Service Interfaces"]:::shared
        Core["Core Services"]:::shared
    end

    %% Infrastructure
    subgraph "Infrastructure"
        direction TB
        AppHost["AppHost"]:::infra
        ServiceDefaults["ServiceDefaults"]:::infra
    end

    %% Tests
    subgraph "Tests"
        direction TB
        UnitTests["ACC.Tests"]:::tests
    end

    %% Relationships
    Browser -->|"HTTP(S)"| Host
    Host -->|serves| Client
    Host -->|auth flows| Identity
    Client -->|API calls| Controllers
    Controllers -->|use| Services
    Controllers -->|use| Mapping
    Services -->|implement| Interfaces
    Services -->|DI| Core
    Services -->|calls| ExternalClients
    Interfaces -->|reference| SharedInterfaces
    Controllers -->|exchange DTOs| DTOs
    DbContext -->|manages| Entities
    DbContext -->|applied by| Migrations
    DbContext -->|connects to| DB
    Services -->|persist/retrieve| DbContext
    UnitTests -->|validate| Services

    %% Shared references
    Client -.->|references| DTOs
    Client -.->|references| SharedInterfaces
    Host -.->|DI config| ServiceDefaults
    Controllers -.->|DI config| AppHost

    %% Click Events
    click Host "https://github.com/germann-ux/acc-complex/blob/main/ACC.WebApp/ACC.WebApp"
    click Client "https://github.com/germann-ux/acc-complex/blob/main/ACC.WebApp/ACC.WebApp.Client"
    click Identity "https://github.com/germann-ux/acc-complex/tree/main/ACC.WebApp/ACC.WebApp/Components/Account"
    click Controllers "https://github.com/germann-ux/acc-complex/tree/main/src/ACC.API/Controllers"
    click Services "https://github.com/germann-ux/acc-complex/tree/main/src/ACC.API/Services"
    click Interfaces "https://github.com/germann-ux/acc-complex/tree/main/src/ACC.API/Interfaces"
    click Mapping "https://github.com/germann-ux/acc-complex/blob/main/src/ACC.API/Extensions/ACCmappingProfile.cs"
    click DbContext "https://github.com/germann-ux/acc-complex/blob/main/src/ACC.Data/ACCDbContext.cs"
    click Entities "https://github.com/germann-ux/acc-complex/tree/main/src/ACC.Data/Entities"
    click Migrations "https://github.com/germann-ux/acc-complex/tree/main/src/ACC.Data/Migrations"
    click DTOs "https://github.com/germann-ux/acc-complex/tree/main/src/ACC.Shared/DTOs"
    click SharedInterfaces "https://github.com/germann-ux/acc-complex/tree/main/src/ACC.Shared/Interfaces"
    click Core "https://github.com/germann-ux/acc-complex/tree/main/src/ACC.Shared/Core"
    click ExternalClients "https://github.com/germann-ux/acc-complex/blob/main/src/ACC.ExternalClients"
    click AppHost "https://github.com/germann-ux/acc-complex/blob/main/src/ACC.AppHost"
    click ServiceDefaults "https://github.com/germann-ux/acc-complex/blob/main/ACC.ServiceDefaults"
    click UnitTests "https://github.com/germann-ux/acc-complex/blob/main/tests/ACC.Tests"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,color:#000
    classDef api fill:#8FBC8F,stroke:#000,color:#000
    classDef data fill:#FFA500,stroke:#000,color:#000
    classDef external fill:#9370DB,stroke:#000,color:#000
    classDef shared fill:#D3D3D3,stroke:#000,color:#000
    classDef infra fill:#A9A9A9,stroke:#000,color:#000
    classDef tests fill:#F0E68C,stroke:#000,color:#000
    classDef external fill:#CCCCCC,stroke:#000,color:#000
```
