# 24heuresinsa/overrun-infra architecture

> Architecture diagram of the GitHub repository 24heuresinsa/overrun-infra, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/24heuresinsa/overrun-infra
- Repository: https://github.com/24heuresinsa/overrun-infra

## Overview

##### Main Components

a) Container Orchestration Layer:
- Docker Compose environment (indicated by docker-compose.yml)
- Container services (to be defined in docker-compose.yml)

b) Reverse Proxy/Load Balancer:
- Traefik (evidenced by assets/traefik directory)
- TLS configuration (shown by assets/traefik/tls.yml)

c) CI/CD Pipeline:
- GitLab CI/CD (indicated by .gitlab-ci.yml)
- Multiple deployment environments (suggested by protected environments in README)

d) Project Components:
- Frontend (indicated by triage policies structure)
- Frontend-user (separate component based on triage policies)
- Backend (indicated by triage policies structure)

**┌─ User Layer ─────────────────────────┐**

- External User Access              │

- Traffic Management Layer ───────────┤

- Traefik Reverse Proxy            │
- TLS Termination                  │

- Application Layer ─────────────────┤

- ┌─────────┐  ┌──────────┐  ┌─────┐  │
- Frontend │  │Frontend- │  │Back- │  │
- user    │  │ end │  │
- ┘  └──────────┘  └─────┘  │

- Infrastructure Layer ──────────────┤

- Docker Compose                    │
- Container Services                │

- ┘

##### Important Details

a) Environment Configuration:
- Flow from .env file to docker-compose
- User ID/GID mapping (from the docker command in README)

b) Security Layer:
- TLS termination at Traefik
- Certificate management

c) CI/CD Pipeline:
- GitLab CI/CD workflow
- Deployment stages

##### Relationships to Highlight

- Traffic flow from users through Traefik to services
- Inter-service communication
- Configuration management flow
- CI/CD pipeline interaction with infrastructure

##### Additional Recommendations

- Version information for key components
- Scaling capabilities
- Monitoring/logging components if present
- Document backup/disaster recovery paths

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and classes
    classDef userLayer fill:#e1f5fe,stroke:#01579b
    classDef trafficLayer fill:#e8f5e9,stroke:#1b5e20
    classDef appLayer fill:#fff3e0,stroke:#e65100
    classDef infraLayer fill:#f5f5f5,stroke:#212121
    classDef security fill:#ffebee,stroke:#b71c1c
    
    %% User Layer
    subgraph UserAccess
        User[External Users]
    end
    
    %% Traffic Management Layer
    subgraph TrafficManagement
        Traefik["Traefik Reverse Proxy"]
        TLS["TLS Termination"]
    end
    
    %% Application Layer
    subgraph AppLayer
        Frontend["Frontend Service"]
        FrontendUser["Frontend-user Service"]
        Backend["Backend Service"]
    end
    
    %% Infrastructure Layer
    subgraph Infrastructure
        Docker["Docker Compose"]
        GitLabCI["GitLab CI/CD"]
        EnvConfig["Environment Config"]
    end
    
    %% Relationships
    User --> Traefik
    Traefik --> TLS
    TLS --> Frontend
    TLS --> FrontendUser
    TLS --> Backend
    
    Frontend --> Docker
    FrontendUser --> Docker
    Backend --> Docker
    
    EnvConfig --> Docker
    GitLabCI --> Docker
    
    %% Click events
    click Traefik "https://github.com/24HeuresINSA/OverRun-infra/tree/main/assets/traefik/"
    click TLS "https://github.com/24HeuresINSA/OverRun-infra/blob/main/assets/traefik/tls.yml"
    click Docker "https://github.com/24HeuresINSA/OverRun-infra/blob/main/docker-compose.yml"
    click EnvConfig "https://github.com/24HeuresINSA/OverRun-infra/blob/main/example.env"
    click GitLabCI "https://github.com/24HeuresINSA/OverRun-infra/blob/main/.gitlab-ci.yml"
    click Frontend "https://github.com/24HeuresINSA/OverRun-infra/tree/main/.gitlab/triage_policies/Frontend/"
    click FrontendUser "https://github.com/24HeuresINSA/OverRun-infra/tree/main/.gitlab/triage_policies/Frontend-user/"
    click Backend "https://github.com/24HeuresINSA/OverRun-infra/tree/main/.gitlab/triage_policies/Backend/"
    
    %% Styling
    class User,UserAccess userLayer
    class Traefik,TLS,TrafficManagement trafficLayer
    class Frontend,FrontendUser,Backend,AppLayer appLayer
    class Docker,GitLabCI,EnvConfig,Infrastructure infraLayer
    
    %% Legend
    subgraph Legend
        L1[User Layer]:::userLayer
        L2[Traffic Management]:::trafficLayer
        L3[Application Layer]:::appLayer
        L4[Infrastructure Layer]:::infraLayer
    end
```
