# aymenbenbrik/projetintegre architecture

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

- Interactive diagram: https://gitdiagram.com/aymenbenbrik/projetintegre
- Repository: https://github.com/aymenbenbrik/projetintegre

## Overview

1. **Project purpose**
   This repository is a student project for **client churn analysis and prediction**. The architecture is organized as a full analytics pipeline: raw data preparation, dimensional data modeling, business reporting, machine learning, and a final web application.

2. **Top-level structure**
   The repo is split into numbered phases:
   - `00_documentation/` for project specs and guidance
   - `01_etl/` for extraction, cleaning, and transformation
   - `02_data_warehouse/` for the warehouse schema and loading
   - `03_power_bi/` for KPI dashboards and BI deliverables
   - `04_machine_learning/` for training and model artifacts
   - `05_web_app/` for the application layer
   - `06_rapport/` and `07_presentation/` for final academic deliverables

3. **Documentation layer**
   `00_documentation/` contains the official project framing: problem statement, data description, timeline, and student guide. These files define the expected workflow and act as the project’s architectural contract.

4. **Data boundary**
   The `data/` folder is the ingress boundary for raw datasets. The README explicitly says this folder is **not versioned** and must remain confidential. This means the repository is designed to separate source code from sensitive input data.

5. **Source data and reference files**
   The data folder contains one main churn dataset (`data_churn.csv`) and several dimension/reference tables in Excel format, such as currency, sector, industry, target, transaction, and closure reason dimensions. There is also `anonymize.py`, which indicates a preprocessing step to mask or sanitize sensitive fields before downstream use.

6. **ETL subsystem**
   `01_etl/` is where the repository expects the first processing stage: data cleaning, normalization, feature preparation, and possibly anonymization orchestration. This subsystem converts raw inputs into standardized analytical data suitable for loading into the warehouse and for reuse in ML.

7. **Data warehouse subsystem**
   `02_data_warehouse/` holds the relational analytics model. The presence of separate dimension files in `data/` suggests a dimensional design, likely a star or snowflake schema supporting churn analysis. This layer is the central structured store feeding reporting and potentially ML feature extraction.

8. **Business intelligence layer**
   `03_power_bi/` is the reporting/visualization layer. It is intended for `.pbix` files, KPI documentation, and exported visuals. Architecturally, this layer consumes curated warehouse data rather than raw files, making it the business-facing presentation of churn metrics.

9. **Machine learning subsystem**
   `04_machine_learning/` is the predictive analytics layer. It is expected to contain notebooks, training scripts, and saved models such as `.pkl` artifacts. Its input is likely the cleaned/feature-engineered dataset produced by ETL or the warehouse; its output is a persisted prediction model used later by the app.

10. **Web application layer**
   `05_web_app/` is the deployment-facing interface for the project. The README says a public URL must be delivered, which implies this app is meant to expose churn prediction or related insights to end users. It likely consumes the trained model artifact from the ML layer.

11. **Reporting and presentation outputs**
   `06_rapport/` and `07_presentation/` are documentation deliverables, not core runtime components. They summarize methods, results, and conclusions, and should reflect the same pipeline used in the code to ensure traceability.

12. **Shared engineering constraints**
   The whole repo is designed around **reproducibility** and **data privacy**. The `requirements.txt` suggests a Python-based workflow, and the README emphasizes rerunnable code, regular Git commits, and no raw data in GitHub. That makes the main architectural boundary: code and documentation are versioned; sensitive data stays external.

13. **End-to-end data flow**
   The intended flow is: **raw churn data in `data/` → anonymization/ETL → warehouse modeling/loading → BI dashboards and ML training → web app deployment → report and presentation**. For an architecture diagram, this should be shown as a single pipeline with two downstream consumers from curated data: business intelligence and predictive application.

Main entry points: [`02_data_warehouse`](https://github.com/aymenbenbrik/projetintegre/tree/main/02_data_warehouse) (Warehouse), [`01_etl`](https://github.com/aymenbenbrik/projetintegre/tree/main/01_etl) (ETL), [`04_machine_learning`](https://github.com/aymenbenbrik/projetintegre/tree/main/04_machine_learning) (Machine learning), [`03_power_bi`](https://github.com/aymenbenbrik/projetintegre/tree/main/03_power_bi) (Power BI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_docs["Documentation"]
  node_root_readme["Project README<br/>repo contract<br/>[README.md]"]
  node_doc_project["Project brief<br/>spec doc"]
  node_doc_data["Data guide<br/>spec doc"]
  node_doc_timeline["Timeline<br/>spec doc<br/>[3_timeline.md]"]
  node_doc_guide["Student guide<br/>spec doc"]
end

subgraph group_grp_data["Data boundary"]
  node_data_raw[("Churn data<br/>raw dataset<br/>[data_churn.csv]")]
  node_data_dims[("Reference dims<br/>dimension refs")]
  node_data_mask["Anonymizer<br/>privacy prep<br/>[anonymize.py]"]
end

subgraph group_grp_core["Analytics pipeline"]
  node_etl_stage["ETL<br/>data prep"]
  node_warehouse_stage[("Warehouse<br/>dimensional model")]
  node_bi_stage["Power BI<br/>reporting"]
  node_ml_stage["Machine learning<br/>predictive model"]
  node_web_stage["Web app<br/>deployment app"]
end

subgraph group_grp_outputs["Deliverables"]
  node_report_stage["Report<br/>academic deliverable"]
  node_pres_stage["Presentation<br/>academic deliverable"]
end

node_root_readme -->|"defines"| node_doc_project
node_root_readme -.->|"uses"| node_data_raw
node_doc_project -->|"guides"| node_etl_stage
node_doc_data -->|"describes"| node_data_raw
node_data_raw -->|"sanitized by"| node_data_mask
node_data_mask -->|"feeds"| node_etl_stage
node_data_dims -->|"models"| node_warehouse_stage
node_etl_stage -->|"loads"| node_warehouse_stage
node_warehouse_stage -->|"serves"| node_bi_stage
node_etl_stage -->|"features"| node_ml_stage
node_warehouse_stage -.->|"supports"| node_ml_stage
node_ml_stage -->|"powers"| node_web_stage
node_warehouse_stage -.->|"enriches"| node_web_stage
node_bi_stage -->|"informs"| node_report_stage
node_ml_stage -->|"documents"| node_report_stage
node_web_stage -->|"presents"| node_pres_stage
node_bi_stage -->|"summarizes"| node_pres_stage

click node_root_readme "https://github.com/aymenbenbrik/projetintegre/blob/main/README.md"
click node_doc_project "https://github.com/aymenbenbrik/projetintegre/blob/main/00_documentation/1_description_projet.md"
click node_doc_data "https://github.com/aymenbenbrik/projetintegre/blob/main/00_documentation/2_description_donnees.md"
click node_doc_timeline "https://github.com/aymenbenbrik/projetintegre/blob/main/00_documentation/3_timeline.md"
click node_doc_guide "https://github.com/aymenbenbrik/projetintegre/blob/main/00_documentation/4_guide_etudiant.md"
click node_data_raw "https://github.com/aymenbenbrik/projetintegre/blob/main/data/data_churn.csv"
click node_data_dims "https://github.com/aymenbenbrik/projetintegre/tree/main/data"
click node_data_mask "https://github.com/aymenbenbrik/projetintegre/blob/main/data/anonymize.py"
click node_etl_stage "https://github.com/aymenbenbrik/projetintegre/tree/main/01_etl"
click node_warehouse_stage "https://github.com/aymenbenbrik/projetintegre/tree/main/02_data_warehouse"
click node_bi_stage "https://github.com/aymenbenbrik/projetintegre/tree/main/03_power_bi"
click node_ml_stage "https://github.com/aymenbenbrik/projetintegre/tree/main/04_machine_learning"
click node_web_stage "https://github.com/aymenbenbrik/projetintegre/tree/main/05_web_app"
click node_report_stage "https://github.com/aymenbenbrik/projetintegre/tree/main/06_rapport"
click node_pres_stage "https://github.com/aymenbenbrik/projetintegre/tree/main/07_presentation"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_root_readme,node_doc_project,node_doc_data,node_doc_timeline,node_doc_guide toneBlue
class node_data_raw,node_data_dims,node_data_mask toneAmber
class node_etl_stage,node_warehouse_stage,node_bi_stage,node_ml_stage,node_web_stage toneMint
class node_report_stage,node_pres_stage toneRose
```

## Components

### Documentation

Project framing, workflow guidance, and academic specifications.

- [Project README](https://github.com/aymenbenbrik/projetintegre/blob/main/README.md): repo contract · Top-level architectural overview and delivery expectations. · `README.md`
- [Project brief](https://github.com/aymenbenbrik/projetintegre/blob/main/00_documentation/1_description_projet.md): spec doc · Problem statement and project framing. · `00_documentation/1_description_projet.md`
- [Data guide](https://github.com/aymenbenbrik/projetintegre/blob/main/00_documentation/2_description_donnees.md): spec doc · Dataset description and data handling guidance. · `00_documentation/2_description_donnees.md`
- [Timeline](https://github.com/aymenbenbrik/projetintegre/blob/main/00_documentation/3_timeline.md): spec doc · Work plan and milestone sequencing. · `00_documentation/3_timeline.md`
- [Student guide](https://github.com/aymenbenbrik/projetintegre/blob/main/00_documentation/4_guide_etudiant.md): spec doc · Process rules and expected workflow. · `00_documentation/4_guide_etudiant.md`

### Data boundary

External raw inputs and privacy-sensitive source files kept out of version control.

- [Churn data](https://github.com/aymenbenbrik/projetintegre/blob/main/data/data_churn.csv): raw dataset · Main churn source file kept outside version control. · `data/data_churn.csv`
- [Reference dims](https://github.com/aymenbenbrik/projetintegre/tree/main/data): dimension refs · Excel reference tables used for analytical modeling. · `data`
- [Anonymizer](https://github.com/aymenbenbrik/projetintegre/blob/main/data/anonymize.py): privacy prep · Sanitizes sensitive fields before downstream processing. · `data/anonymize.py`

### Analytics pipeline

ETL, warehouse, reporting, machine learning, and application runtime.

- [ETL](https://github.com/aymenbenbrik/projetintegre/tree/main/01_etl): data prep · Cleaning, normalization, and feature preparation stage. · `01_etl`
- [Warehouse](https://github.com/aymenbenbrik/projetintegre/tree/main/02_data_warehouse): dimensional model · Curated relational analytics layer for churn analysis. · `02_data_warehouse`
- [Power BI](https://github.com/aymenbenbrik/projetintegre/tree/main/03_power_bi): reporting · Business dashboards and KPI deliverables. · `03_power_bi`
- [Machine learning](https://github.com/aymenbenbrik/projetintegre/tree/main/04_machine_learning): predictive model · Training and persisted model artifacts for churn prediction. · `04_machine_learning`
- [Web app](https://github.com/aymenbenbrik/projetintegre/tree/main/05_web_app): deployment app · End-user interface consuming prediction outputs. · `05_web_app`

### Deliverables

Final written and presentation outputs.

- [Report](https://github.com/aymenbenbrik/projetintegre/tree/main/06_rapport): academic deliverable · Final written analysis and conclusions. · `06_rapport`
- [Presentation](https://github.com/aymenbenbrik/projetintegre/tree/main/07_presentation): academic deliverable · Final oral presentation materials. · `07_presentation`

## Connections

- Project README → Project brief: defines · Repository README frames the project and deliverables.
- Project README → Churn data: uses · README describes the confidential data boundary.
- Project brief → ETL: guides · Project framing informs the processing pipeline.
- Data guide → Churn data: describes · Data documentation explains the source dataset.
- Churn data → Anonymizer: sanitized by · Raw churn data is anonymized before reuse.
- Anonymizer → ETL: feeds · Privacy-prepared data enters ETL.
- Reference dims → Warehouse: models · Reference dimensions support the warehouse schema.
- ETL → Warehouse: loads · Curated data is loaded into the analytics warehouse.
- Warehouse → Power BI: serves · BI dashboards consume curated warehouse data.
- ETL → Machine learning: features · ML training uses cleaned and engineered data.
- Warehouse → Machine learning: supports · Warehouse data can also feed model features.
- Machine learning → Web app: powers · Persisted models are exposed through the web app.
- Warehouse → Web app: enriches · Application can use curated reference data or scores.
- Power BI → Report: informs · Dashboards provide figures and KPIs for the report.
- Machine learning → Report: documents · Model results are summarized in the final report.
- Web app → Presentation: presents · Application outcomes are presented in the final slides.
- Power BI → Presentation: summarizes · BI outputs are included in the presentation.
