# azzaeid/skill-assessment-platform architecture

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

- Interactive diagram: https://gitdiagram.com/azzaeid/skill-assessment-platform
- Repository: https://github.com/azzaeid/skill-assessment-platform

## Overview

##### Project type and purpose
- This is a monolithic, layered .NET 7 Web API project (SkillAssessmentPlatform.API).
- It implements a skill‑assessment platform backend: user authentication, applicant tracking, level and stage progression, examiner assignments, evaluations, notifications, file uploads, and email services.
- The README is minimal but the file tree reveals clear layering: API, Application, Core, Infrastructure.

##### File structure
- Top‑level solution: SkillAssessmentPlatform.sln
- Four main projects (layers):
1. SkillAssessmentPlatform.API – HTTP entry point (Controllers, Middleware, static assets, config).
2. SkillAssessmentPlatform.Application – Business logic façade (DTOs, services, mapping).
3. SkillAssessmentPlatform.Core – Domain model and abstractions (Entities, interfaces, enums, exceptions, common wrappers).
4. SkillAssessmentPlatform.Infrastructure – Concrete implementations (EF Core DbContext & migrations, repositories, external services: email, file, unit-of-work).
- Cross‑cutting concerns: error handling middleware, response handler, DI registration in Program.cs.
- Persistence: EF Core migrations under Infrastructure/Data/Migrations.
- External services: Infrastructure/ExternalServices for email and file I/O.

##### README for additional insights
- The README only states “SkillAssessmentPlatform,” but features are implied by folder names (enrollments, tracks, levels, stages, evaluation criteria, notifications, certificates).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client
    Client["Client (Frontend/Postman)"]:::client

    %% API Layer
    subgraph "API Layer"
        Controllers["Controllers"]:::api
        Middleware["ErrorHandlerMiddleware"]:::api
        Program["Program & DI Registration"]:::api
        ResponseHandlerIntf["IResponseHandler"]:::api
        ResponseHandlerImpl["ResponseHandler"]:::api
        StaticFiles["Static File Hosting\n(wwwroot/profile-images)"]:::api
    end

    %% Application Layer
    subgraph "Application Layer"
        DTOs["DTOs"]:::app
        MappingProfile["MappingProfile"]:::app
        Services["Services"]:::app
    end

    %% Core Layer
    subgraph "Core Layer"
        Entities["Entities"]:::core
        Interfaces["Repository & UnitOfWork Interfaces"]:::core
        Enums["Enums"]:::core
        Exceptions["Exceptions"]:::core
        Common["Common Wrapper & Paged Response"]:::core
        Wrappers["Queryable Extensions & PaginatedResult"]:::core
    end

    %% Infrastructure Layer
    subgraph "Infrastructure Layer"
        DbContext["AppDbContext"]:::infra
        UnitOfWork["UnitOfWork"]:::infra
        EntityMappers["Entity Mappers"]:::infra
        Repositories["Repositories"]:::infra
        Migrations["Migrations"]:::infra
        EmailService["EmailConfiguration & EmailServices"]:::infra
        FileService["IFileService & FileService"]:::infra
    end

    %% Database
    DB[(Database)]:::db

    %% Flows
    Client -->|HTTP Request| Controllers
    Controllers -->|handles via| Middleware
    Middleware -->|calls| ResponseHandlerImpl
    Controllers -->|invokes| Services
    Services -->|maps DTOs using| MappingProfile
    Services -->|uses| Interfaces
    Interfaces -->|implemented by| Repositories
    Repositories -->|use| DbContext
    DbContext -->|saves to| DB
    Services -->|uses| UnitOfWork
    Services -->|calls external| EmailService
    Services -->|calls external| FileService
    DbContext -->|applies| Migrations
    ResponseHandlerImpl -->|implements| ResponseHandlerIntf
    Controllers -->|serves files from| StaticFiles
    Controllers -->|bootstrap via| Program

    %% Return paths
    DB -->|returns data| DbContext
    DbContext -->|returns entities| Repositories
    Repositories -->|returns to| Services
    Services -->|returns DTO| Controllers
    Controllers -->|HTTP Response| Client

    %% Click Events
    click Controllers "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.API/Controllers"
    click Middleware "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.API/Middleware/ErrorHandlerMiddleware.cs"
    click Program "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.API/Program.cs"
    click ResponseHandlerIntf "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.API/Responses/IResponseHandler.cs"
    click ResponseHandlerImpl "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.API/Responses/ResponseHandler.cs"
    click StaticFiles "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.API/wwwroot/profile-images"
    click DTOs "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Application/DTOs"
    click MappingProfile "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.Application/Mapping/MappingProfile.cs"
    click Services "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Application/Services"
    click Entities "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Core/Entities"
    click Interfaces "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Core/Interfaces"
    click Enums "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Core/Enums"
    click Exceptions "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Core/Exceptions"
    click Common "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Core/Common"
    click Wrappers "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Core/Wrappers"
    click DbContext "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.Infrastructure/Data/AppDbContext.cs"
    click UnitOfWork "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.Infrastructure/Data/UnitOfWork.cs"
    click EntityMappers "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Infrastructure/EntityMappers"
    click Repositories "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Infrastructure/Repositories"
    click Migrations "https://github.com/azzaeid/skill-assessment-platform/tree/master/SkillAssessmentPlatform.Infrastructure/Migrations"
    click EmailService "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.Infrastructure/ExternalServices/EmailServices.cs"
    click FileService "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.Infrastructure/ExternalServices/FileService.cs"
    click Config1 "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.API/appsettings.json"
    click Config2 "https://github.com/azzaeid/skill-assessment-platform/blob/master/SkillAssessmentPlatform.API/appsettings.Development.json"

    %% Styles
    classDef api fill:#cce5ff,stroke:#4da3ff,color:#004085;
    classDef app fill:#d4edda,stroke:#28a745,color:#155724;
    classDef core fill:#fff3cd,stroke:#ffeeba,color:#856404;
    classDef infra fill:#fce8e6,stroke:#f5c6cb,color:#721c24;
    classDef db fill:#e2e3e5,stroke:#d6d8db,color:#383d41,stroke-dasharray: 5 5;
    classDef client fill:#e8eaf6,stroke:#3f51b5,color:#1a237e;
```
