# strawbang/consultant-tracking architecture

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

- Interactive diagram: https://gitdiagram.com/strawbang/consultant-tracking
- Repository: https://github.com/strawbang/consultant-tracking

## Overview

##### Main Components
- Frontend: The Angular application housed under the “frontend” directory. It is responsible for the user interface, routing, and consuming the backend API.
- Database: MariaDB (not directly shown in the file tree, but indicated in the README and configured in Docker Compose).
- External and Supporting Services: These include Docker Compose (for local orchestration), Adminer (for database management), and the CI/CD pipelines configured in GitHub Actions.
- Containerization/Deployment: Dockerfiles for both frontend and backend, as well as a top-level docker-compose.yml file to bring all containers together.

##### Architectural Patterns and Design Principles
- Domain Layer (with domain models such as Consultant, Evaluation, Project, etc.)
- Application Services (which include business logic encapsulated in service classes)
- Infrastructure Layer (comprising REST Controllers, Repositories, Mappers, and configuration classes)
- Frontend is structured by Angular modules (features, core, and shared modules) with routing and service layers.
- Use clear labels and compartmentalization to emphasize the separation of concerns.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% CI/CD Node
    CI["CI/CD (GitHubActions)"]:::cicd
    click CI "https://github.com/strawbang/consultant-tracking/tree/main/.github/workflows"

    %% Containerization/Orchestration Nodes
    DCP["DockerCompose (Orchestration)"]:::docker
    click DCP "https://github.com/strawbang/consultant-tracking/blob/main/docker-compose.yml"
    
    FD["FrontendDockerfile"]:::docker
    click FD "https://github.com/strawbang/consultant-tracking/tree/main/frontend/Dockerfile"
    
    BD["BackendDockerfile"]:::docker
    click BD "https://github.com/strawbang/consultant-tracking/tree/main/backend/Dockerfile"
    
    %% Frontend Node
    FE["Frontend (Angular+AngularMaterial)"]:::frontend
    click FE "https://github.com/strawbang/consultant-tracking/tree/main/frontend/"
    
    %% Backend Node and its internal layers
    BA["Backend (SpringBoot)"]:::backend
    click BA "https://github.com/strawbang/consultant-tracking/tree/main/backend/"
    
    subgraph "Backend Layers"
        INF["InfrastructureLayer (Controllers/Repos/Mappers)"]:::backendLayer
        click INF "https://github.com/strawbang/consultant-tracking/tree/main/backend/src/main/java/tracking/consultant/backend/infrastructure"
        AS["ApplicationServicesLayer"]:::backendLayer
        click AS "https://github.com/strawbang/consultant-tracking/tree/main/backend/src/main/java/tracking/consultant/backend/application"
        DW["DomainLayer (Models)"]:::backendLayer
        click DW "https://github.com/strawbang/consultant-tracking/tree/main/backend/src/main/java/tracking/consultant/backend/domain"
    end

    %% Database Node
    DB["MariaDB Database"]:::database
    click DB "https://github.com/strawbang/consultant-tracking/blob/main/docker-compose.yml"

    %% Connections for CI/CD and Containerization
    CI --> FE
    CI --> BA
    CI --> DCP

    DCP --> FD
    DCP --> BD
    DCP --> DB

    FD --> FE
    BD --> BA

    %% API and Backend Internal Flow
    FE -->|"RESTAPI"| INF
    BA --> INF
    INF -->|"Calls"| AS
    AS -->|"Uses"| DW
    INF -->|"CRUD"| DB

    %% Style Definitions
    classDef frontend fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef backend fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef backendLayer fill:#FAD7A0,stroke:#E67E22,stroke-width:2px;
    classDef database fill:#D5F5E3,stroke:#27AE60,stroke-width:2px;
    classDef docker fill:#E8DAEF,stroke:#8E44AD,stroke-width:2px;
    classDef cicd fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
```
