# armelzomahoun/prix architecture

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

- Interactive diagram: https://gitdiagram.com/armelzomahoun/prix
- Repository: https://github.com/armelzomahoun/prix

## Overview

LocaPay is a housing-price estimation application: users choose property and location details in the web interface, submit them to the API, and receive an estimated monthly price with a confidence interval and warnings. Its supporting workflow prepares and analyzes housing data, trains and evaluates candidate models, and serves the selected model. The repository also includes model explainability and configuration experiments. The README is empty; unsampled deployment and analysis details are not inferred beyond the source index and shown excerpts.

Main entry points: [`deploiement.py`](https://github.com/armelzomahoun/prix/blob/main/deploiement.py) (FastAPI service), [`static/app.js`](https://github.com/armelzomahoun/prix/blob/main/static/app.js) (Prediction interface), [`config.py`](https://github.com/armelzomahoun/prix/blob/main/config.py) (Shared configuration), [`locapay_clean.csv`](https://github.com/armelzomahoun/prix/blob/main/locapay_clean.csv) (Clean housing data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_frontend["Prediction interface<br/>[app.js]"]
  node_webpage["Web page<br/>[index.html]"]
end

subgraph group_api["Prediction API"]
  node_api_service["FastAPI service<br/>[deploiement.py]"]
  node_input_validation["Input validation<br/>[deploiement.py]"]
  node_reference_lists["Property references<br/>[deploiement.py]"]
  node_price_estimator["Price and interval<br/>[deploiement.py]"]
  node_model_info["Model information<br/>[deploiement.py]"]
end

subgraph group_model["Model lifecycle"]
  node_model_artifact["Saved model"]
  node_configuration["Shared configuration<br/>[config.py]"]
  node_training["Model training<br/>[entrainement.py]"]
end

subgraph group_data["Data preparation"]
  node_raw_data["Raw housing data"]
  node_analysis["Data audit and analysis<br/>[analyse.py]"]
  node_clean_data["Clean housing data<br/>[locapay_clean.csv]"]
end

subgraph group_research["Model analysis"]
  node_experiments["Feature experiments<br/>[experimentation.py]"]
  node_explainability["Model explainability<br/>[explicabilité.py]"]
end

node_visitor(("Housing seeker"))

node_visitor -->|"enters details"| node_frontend
node_frontend -->|"updates interface"| node_webpage
node_api_service -->|"serves page"| node_webpage
node_frontend -->|"requests options"| node_api_service
node_frontend -->|"requests model info"| node_api_service
node_frontend -->|"submits prediction"| node_api_service
node_api_service -->|"returns options"| node_reference_lists
node_api_service -->|"returns metrics"| node_model_info
node_api_service -->|"validates input"| node_input_validation
node_api_service -->|"requests estimate"| node_price_estimator
node_price_estimator -.->|"predicts with"| node_model_artifact
node_analysis -->|"loads data"| node_raw_data
node_analysis -.->|"writes cleaned data"| node_clean_data
node_training -->|"loads data"| node_clean_data
node_training -->|"saves winner"| node_model_artifact
node_experiments -->|"loads data"| node_clean_data
node_explainability -->|"loads data"| node_clean_data
node_explainability -->|"loads model"| node_model_artifact
node_analysis -->|"uses settings"| node_configuration
node_training -->|"uses settings"| node_configuration
node_experiments -->|"uses settings"| node_configuration
node_explainability -->|"uses settings"| node_configuration
node_api_service -->|"uses settings"| node_configuration

click node_frontend "https://github.com/armelzomahoun/prix/blob/main/static/app.js"
click node_webpage "https://github.com/armelzomahoun/prix/blob/main/static/index.html"
click node_api_service "https://github.com/armelzomahoun/prix/blob/main/deploiement.py"
click node_input_validation "https://github.com/armelzomahoun/prix/blob/main/deploiement.py"
click node_reference_lists "https://github.com/armelzomahoun/prix/blob/main/deploiement.py"
click node_price_estimator "https://github.com/armelzomahoun/prix/blob/main/deploiement.py"
click node_model_info "https://github.com/armelzomahoun/prix/blob/main/deploiement.py"
click node_model_artifact "https://github.com/armelzomahoun/prix/blob/main/modele_output/meilleur_modele_locapay.pkl"
click node_raw_data "https://github.com/armelzomahoun/prix/blob/main/locapay_logements.csv"
click node_analysis "https://github.com/armelzomahoun/prix/blob/main/analyse.py"
click node_clean_data "https://github.com/armelzomahoun/prix/blob/main/locapay_clean.csv"
click node_configuration "https://github.com/armelzomahoun/prix/blob/main/config.py"
click node_training "https://github.com/armelzomahoun/prix/blob/main/entrainement.py"
click node_experiments "https://github.com/armelzomahoun/prix/blob/main/experimentation.py"
click node_explainability "https://github.com/armelzomahoun/prix/blob/main/explicabilit%C3%A9.py"

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_frontend,node_webpage toneBlue
class node_api_service,node_input_validation,node_reference_lists,node_price_estimator,node_model_info toneAmber
class node_model_artifact,node_configuration,node_training toneMint
class node_raw_data,node_analysis,node_clean_data toneRose
class node_experiments,node_explainability,node_visitor toneIndigo
```

## Components

### Web experience

- [Prediction interface](https://github.com/armelzomahoun/prix/blob/main/static/app.js): `static/app.js`
- [Web page](https://github.com/armelzomahoun/prix/blob/main/static/index.html): `static/index.html`

### Prediction API

- [FastAPI service](https://github.com/armelzomahoun/prix/blob/main/deploiement.py): `deploiement.py`
- [Input validation](https://github.com/armelzomahoun/prix/blob/main/deploiement.py): `deploiement.py`
- [Property references](https://github.com/armelzomahoun/prix/blob/main/deploiement.py): `deploiement.py`
- [Price and interval](https://github.com/armelzomahoun/prix/blob/main/deploiement.py): `deploiement.py`
- [Model information](https://github.com/armelzomahoun/prix/blob/main/deploiement.py): `deploiement.py`

### Model lifecycle

- [Saved model](https://github.com/armelzomahoun/prix/blob/main/modele_output/meilleur_modele_locapay.pkl): `modele_output/meilleur_modele_locapay.pkl`
- [Shared configuration](https://github.com/armelzomahoun/prix/blob/main/config.py): `config.py`
- [Model training](https://github.com/armelzomahoun/prix/blob/main/entrainement.py): `entrainement.py`

### Data preparation

- [Raw housing data](https://github.com/armelzomahoun/prix/blob/main/locapay_logements.csv): `locapay_logements.csv`
- [Data audit and analysis](https://github.com/armelzomahoun/prix/blob/main/analyse.py): `analyse.py`
- [Clean housing data](https://github.com/armelzomahoun/prix/blob/main/locapay_clean.csv): `locapay_clean.csv`

### Model analysis

- [Feature experiments](https://github.com/armelzomahoun/prix/blob/main/experimentation.py): `experimentation.py`
- [Model explainability](https://github.com/armelzomahoun/prix/blob/main/explicabilit%C3%A9.py): `explicabilité.py`

### Other components

- **Housing seeker**

## Connections

- Housing seeker → Prediction interface: enters details (evidence: `static/app.js`)
- Prediction interface → Web page: updates interface (evidence: `static/app.js`)
- FastAPI service → Web page: serves page (evidence: `deploiement.py`)
- Prediction interface → FastAPI service: requests options (evidence: `static/app.js`)
- Prediction interface → FastAPI service: requests model info (evidence: `static/app.js`)
- Prediction interface → FastAPI service: submits prediction (evidence: `static/app.js`)
- FastAPI service → Property references: returns options (evidence: `deploiement.py`)
- FastAPI service → Model information: returns metrics (evidence: `deploiement.py`)
- FastAPI service → Input validation: validates input (evidence: `deploiement.py`)
- FastAPI service → Price and interval: requests estimate (evidence: `deploiement.py`)
- Price and interval → Saved model: predicts with
- Data audit and analysis → Raw housing data: loads data (evidence: `analyse.py`)
- Data audit and analysis → Clean housing data: writes cleaned data
- Model training → Clean housing data: loads data (evidence: `entrainement.py`)
- Model training → Saved model: saves winner (evidence: `entrainement.py`)
- Feature experiments → Clean housing data: loads data (evidence: `experimentation.py`)
- Model explainability → Clean housing data: loads data (evidence: `explicabilité.py`)
- Model explainability → Saved model: loads model (evidence: `explicabilité.py`)
- Data audit and analysis → Shared configuration: uses settings (evidence: `analyse.py`)
- Model training → Shared configuration: uses settings (evidence: `entrainement.py`)
- Feature experiments → Shared configuration: uses settings (evidence: `experimentation.py`)
- Model explainability → Shared configuration: uses settings (evidence: `explicabilité.py`)
- FastAPI service → Shared configuration: uses settings (evidence: `deploiement.py`)
