# myanex/gestioninnorov architecture

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

- Interactive diagram: https://gitdiagram.com/myanex/gestioninnorov
- Repository: https://github.com/myanex/gestioninnorov

## Overview

##### Project type and purpose
- This is a database‐centric project (“GestionInnoRov”) whose sole deliverable is a managed set of SQL artifacts (baseline schemas, incremental migrations, preflight smoke tests, seed data and views).
- There is no application code; the project’s objective is to version, validate and deploy database changes safely across environments.

##### File structure
- Top‐level “db/” folder contains all artifacts:
- Scripts/           – catch‐all SQL files
- baselines/         – initial schema snapshots
- migrations/        – ordered DDL/DML changesets
- preflight/         – scripts to validate migrations (smoke tests)
- seeds/             – demo/test data loaders
- logs/              – migration run history
- maintenance/       – housekeeping or archive scripts
- views/             – presentation layer SQL objects
- Project root has only editor/config files and README.

##### README for additional insights
- Implicit stack: relational database (e.g. PostgreSQL, SQL Server) managed via DBeaver and source control.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer Local Zone
    subgraph "Developer Local" 
        direction TB
        IDE["DBeaver SQL IDE"]:::dev
        IDEConfig[".dbeaver/ (IDE Config)"]:::dev
        GitClient["Git Client"]:::dev
        LocalDB(("Local DB Instance")):::dev
    end

    %% Version Control
    GitRepo["Git Repository\n(db/)"]:::dev

    %% CI/CD Pipeline Zone
    subgraph "CI/CD Pipeline"
        direction TB
        Checkout["Checkout db/ from Git"]:::dev
        Preflight["Run Preflight Smoke Tests"]:::val
        Migrate["Apply Incremental Migrations"]:::prod
        Seed["Execute Seed Data Loaders"]:::prod
        LogUpdate["Update Migration Run History Logs"]:::grey
    end

    %% Database Environments Zone
    subgraph "Database Environments"
        direction TB
        DevDB(("Dev DB")):::prod
        QA_DB(("QA/UAT DB")):::prod
        ProdDB(("Production DB")):::prod
    end

    %% Monitoring
    Monitoring["Monitoring / Logging Dashboard"]:::grey

    %% DB Artifacts Store
    subgraph "db/ Artifacts" 
        direction TB
        Baseline(("Base Schemas")):::grey
        Migrations(("Incremental Migrations")):::grey
        PreflightFolder(("Preflight Smoke Tests")):::grey
        Seeds(("Seed Data Loaders")):::grey
        Views(("Presentation Layer Views")):::grey
        Scripts(("Catch-all SQL Scripts")):::grey
        Maintenance(("Maintenance / Housekeeping Scripts")):::grey
        Logs(("Migration Run History Logs")):::grey
    end

    %% Optional Application Layer
    AppLayer["Application Tier (Consumer)"]:::prod

    %% Flows
    IDE -->|edits SQL files| Baseline
    IDE -->|edits SQL files| Migrations
    IDE -->|edits SQL files| PreflightFolder
    IDE -->|edits SQL files| Seeds
    IDE -->|edits SQL files| Views
    IDE -->|edits SQL files| Scripts
    IDE -->|edits SQL files| Maintenance

    IDE -->|push changes| GitClient
    GitClient -->|commit & push| GitRepo

    GitRepo -->|triggers| Checkout
    Checkout -->|reads| Baseline
    Checkout -->|reads| Migrations
    Checkout -->|reads| PreflightFolder
    Checkout -->|reads| Seeds
    Checkout -->|reads| Views
    Checkout -->|reads| Scripts
    Checkout -->|reads| Maintenance

    Checkout --> Preflight
    Preflight -->|validated| Migrate
    Migrate --> DevDB
    Migrate --> QA_DB
    Migrate --> ProdDB
    Migrate --> Seed
    Seed --> DevDB
    Seed --> QA_DB
    Seed --> ProdDB
    Migrate --> LogUpdate
    LogUpdate --> Logs
    LogUpdate --> Monitoring

    DevDB --> Monitoring
    QA_DB --> Monitoring
    ProdDB --> Monitoring

    ProdDB --> AppLayer

    %% Environment Promotion
    DevDB -->|"promote"| QA_DB
    QA_DB -->|"promote"| ProdDB

    %% Click Events
    click Baseline "https://github.com/myanex/gestioninnorov/blob/main/db/baselines/2025-09-30_v1_1_baseline.sql"
    click Migrations "https://github.com/myanex/gestioninnorov/tree/main/db/migrations/"
    click PreflightFolder "https://github.com/myanex/gestioninnorov/tree/main/db/preflight/"
    click Seeds "https://github.com/myanex/gestioninnorov/tree/main/db/seeds/"
    click Views "https://github.com/myanex/gestioninnorov/tree/main/db/views/"
    click Scripts "https://github.com/myanex/gestioninnorov/tree/main/db/Scripts/"
    click Maintenance "https://github.com/myanex/gestioninnorov/tree/main/db/maintenance/"
    click Logs "https://github.com/myanex/gestioninnorov/tree/main/db/logs/"
    click IDEConfig "https://github.com/myanex/gestioninnorov/tree/main/db/.dbeaver/"
    click GitRepo "https://github.com/myanex/gestioninnorov/blob/main/.editorconfig"

    %% Styles
    classDef dev fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef val fill:#FFA500,stroke:#000,stroke-width:1px
    classDef prod fill:#90EE90,stroke:#000,stroke-width:1px
    classDef grey fill:#D3D3D3,stroke:#000,stroke-width:1px
```
