# fateh-dev/ilogistiques architecture

> Architecture diagram of the GitHub repository fateh-dev/ilogistiques, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fateh-dev/ilogistiques
- Repository: https://github.com/fateh-dev/ilogistiques

## Overview

##### Main Components Identification

Frontend Layer:
- Angular Application (with Material UI)
- Theme Components (Fuse, Material, Basic themes)
- Core Module
- Feature Modules (Account, Audit, Identity, etc.)
- Breeze JS Integration

Backend Layer:
- ASP.NET Core with ABP Framework
- Domain Layer
- Application Layer
- EntityFrameworkCore Layer
- HTTP API Layer
- Identity Server
- SignalR Hub

Database Layer:
- SQLite Database
- Migrations

##### Component Relationships

Following interactions:

Frontend-to-Backend:
- REST API calls (HTTP)
- Real-time communication (SignalR)
- Breeze JS data queries

Backend Internal:
- Domain-driven design flow
- Entity Framework Core data access
- Identity Server authentication flow

##### Key Features to Highlight

Security:
- Two-Factor Authentication flow
- Role-based access control
- Audit logging

Internationalization:
- Multi-language support (FR, EN, AR)

Real-time Features:
- SignalR notifications
- Live updates

##### Specific Implementation Details

Frontend Structure:
- Modular organization (@fuse, abp modules)
- Theme system (Fuse, Material, Basic)
- State management (NGRX)

Backend Structure:
- ABP modules organization
- Entity Framework Core configuration
- API endpoints
- SignalR hubs

a) Client-side Components:
- Angular modules
- Theme components
- Service layers
- State management

b) Server-side Components:
- ABP modules
- Domain services
- Application services
- Entity Framework context
- API controllers

c) Cross-cutting Concerns:
- Authentication flow
- Authorization
- Audit logging
- Notification system

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        ANG["Angular Application"]:::frontend
        click ANG "https://github.com/Fateh-Dev/iLogistiques/tree/main/angular/src/app"
        
        subgraph Modules
            CORE["Core Module"]:::frontend
            click CORE "https://github.com/Fateh-Dev/iLogistiques/tree/main/angular/src/abp/core"
            ACC["Account Module"]:::frontend
            click ACC "https://github.com/Fateh-Dev/iLogistiques/tree/main/angular/src/abp/account"
            AUD["Audit Module"]:::frontend
            click AUD "https://github.com/Fateh-Dev/iLogistiques/tree/main/angular/src/abp/audit"
            IDM["Identity Module"]:::frontend
            click IDM "https://github.com/Fateh-Dev/iLogistiques/tree/main/angular/src/abp/identity"
        end
        
        subgraph Themes
            FUSE["Fuse Theme"]:::frontend
            click FUSE "https://github.com/Fateh-Dev/iLogistiques/blob/main/angular/src/abp/theme.fuse"
            MAT["Material Theme"]:::frontend
            click MAT "https://github.com/Fateh-Dev/iLogistiques/blob/main/angular/src/abp/theme.material"
            BASIC["Basic Theme"]:::frontend
            click BASIC "https://github.com/Fateh-Dev/iLogistiques/blob/main/angular/src/abp/theme.basic"
        end
        
        BREEZE_F["Breeze JS Integration"]:::frontend
        click BREEZE_F "https://github.com/Fateh-Dev/iLogistiques/tree/main/angular/src/abp/breeze"
        I18N["Internationalization"]:::frontend
        click I18N "https://github.com/Fateh-Dev/iLogistiques/tree/main/angular/src/abp/core/@ngx-translate"
        AUTH_G["Auth Guards"]:::auth
        click AUTH_G "https://github.com/Fateh-Dev/iLogistiques/tree/main/angular/src/abp/account/guards"
    end
    
    subgraph Backend
        subgraph "Core Services"
            DOMAIN["Domain Layer"]:::backend
            click DOMAIN "https://github.com/Fateh-Dev/iLogistiques/blob/main/aspnet-core/src/FREETIME.Domain"
            APP["Application Layer"]:::backend
            click APP "https://github.com/Fateh-Dev/iLogistiques/blob/main/aspnet-core/src/FREETIME.Application"
            EF["Entity Framework Core"]:::backend
            click EF "https://github.com/Fateh-Dev/iLogistiques/blob/main/aspnet-core/src/FREETIME.EntityFrameworkCore"
            API["HTTP API Layer"]:::backend
            click API "https://github.com/Fateh-Dev/iLogistiques/blob/main/aspnet-core/src/FREETIME.HttpApi"
        end
        
        subgraph "Authentication"
            IDS["Identity Server"]:::auth
            click IDS "https://github.com/Fateh-Dev/iLogistiques/tree/main/aspnet-core/src/AbpDz/IdentityServer"
            IDS_CONFIG["Identity Server Config"]:::auth
            click IDS_CONFIG "https://github.com/Fateh-Dev/iLogistiques/tree/main/aspnet-core/src/FREETIME.Domain/IdentityServer"
        end
        
        BREEZE_B["Breeze Backend"]:::backend
        click BREEZE_B "https://github.com/Fateh-Dev/iLogistiques/tree/main/aspnet-core/src/AbpDz/Breeze"
        
        SIGNALR["SignalR Hub"]:::realtime
        click SIGNALR "https://github.com/Fateh-Dev/iLogistiques/blob/main/aspnet-core/src/AbpDz/Notifications/Hub/AbpDzNotificationHub.cs"
        
        LOC["Localization Resources"]:::backend
        click LOC "https://github.com/Fateh-Dev/iLogistiques/tree/main/aspnet-core/src/FREETIME.Domain.Shared/Localization/FREETIME"
    end
    
    subgraph Database
        DB["SQLite Database"]:::database
        MIGRATIONS["Migrations"]:::database
        click MIGRATIONS "https://github.com/Fateh-Dev/iLogistiques/tree/main/aspnet-core/src/FREETIME.EntityFrameworkCore.DbMigrations/Migrations"
        DBCONTEXT["DbContext"]:::database
        click DBCONTEXT "https://github.com/Fateh-Dev/iLogistiques/blob/main/aspnet-core/src/FREETIME.EntityFrameworkCore/EntityFrameworkCore/FREETIMEDbContext.cs"
    end
    
    %% Relationships
    ANG --> CORE & ACC & AUD & IDM
    ANG --> FUSE & MAT & BASIC
    ANG --> BREEZE_F
    ANG --> I18N
    ANG --> AUTH_G
    
    BREEZE_F --> BREEZE_B
    AUTH_G --> IDS
    
    API --> DOMAIN
    APP --> DOMAIN
    EF --> DOMAIN
    DOMAIN --> IDS_CONFIG
    
    EF --> DBCONTEXT
    DBCONTEXT --> DB
    MIGRATIONS --> DB
    
    SIGNALR --> ANG
    
    %% Styles
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef backend fill:#2ecc71,stroke:#27ae60,color:white
    classDef auth fill:#f1c40f,stroke:#f39c12,color:black
    classDef database fill:#9b59b6,stroke:#8e44ad,color:white
    classDef realtime fill:#e67e22,stroke:#d35400,color:white
    
    %% Legend
    subgraph Legend
        F["Frontend"]:::frontend
        B["Backend"]:::backend
        A["Auth Components"]:::auth
        D["Database"]:::database
        R["Real-time"]:::realtime
    end
```
