# josuebatasema9-ux/deforestation-app architecture

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

- Interactive diagram: https://gitdiagram.com/josuebatasema9-ux/deforestation-app
- Repository: https://github.com/josuebatasema9-ux/deforestation-app

## Overview

This is a Streamlit deforestation-detection application. Users sign in, import a zipped study-area shapefile, configure satellite sensors and dates, search Earth Engine imagery, apply preprocessing, and build a multiband stack for viewing. The homepage documents later training, Random Forest classification, change detection, hotspot analysis, and report exports, but the sampled repository shows these as planned or incomplete rather than an implemented analysis pipeline. Dashed links indicate relationships not verified in the excerpts; no README content was provided.

Main entry points: [`page_traitement.py`](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_traitement.py) (Processing interface), [`application_principale.py`](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/application_principale.py) (Streamlit application), [`outils_donnees_satellitaires.py`](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/outils_donnees_satellitaires.py) (Sensor and search controls), [`pretraitement_stacking_earth_engine.py`](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/pretraitement_stacking_earth_engine.py) (Composite and stack builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application and access"]
  node_app["Streamlit application"]
  node_accounts["Account management"]
  node_translations["French-English text"]
  node_home["Home and workflow guide<br/>[page_accueil.py]"]
end

subgraph group_workflow["Study and configuration"]
  node_processing["Processing interface<br/>[page_traitement.py]"]
  node_studyarea["Study-area reader"]
  node_satellite_ui["Sensor and search controls"]
  node_preprocess_ui["Preprocessing and stack controls"]
end

subgraph group_imagery["Satellite processing"]
  node_catalogue["Sensor and index catalogue"]
  node_ee_connection["Earth Engine connection"]
  node_search["Image search and previews"]
  node_filters["Image masks and filters"]
  node_stacking["Composite and stack builder"]
  node_earth_engine{{"Google Earth Engine"}}
end

subgraph group_outcomes["Analysis and reporting"]
  node_classification["Training and classification<br/>[page_traitement.py]"]
  node_change["Deforestation change detection<br/>[page_traitement.py]"]
  node_dashboard["Dashboard and report"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"checks accounts"| node_accounts
node_app -->|"translates labels"| node_translations
node_app -->|"renders"| node_home
node_app -->|"renders"| node_processing
node_app -->|"renders"| node_dashboard
node_user -.->|"configures workflow"| node_processing
node_processing -->|"loads uploaded zone"| node_studyarea
node_processing -.->|"dispatches tools"| node_satellite_ui
node_processing -.->|"dispatches tools"| node_preprocess_ui
node_satellite_ui -->|"initializes connection"| node_ee_connection
node_ee_connection -->|"authenticates"| node_earth_engine
node_satellite_ui -.->|"uses sensor definitions"| node_catalogue
node_satellite_ui -.->|"requests imagery search"| node_search
node_search -.->|"queries collections"| node_earth_engine
node_search -.->|"uses cloud masks"| node_filters
node_preprocess_ui -->|"builds stack"| node_stacking
node_stacking -.->|"applies preprocessing"| node_filters
node_stacking -.->|"builds composites"| node_earth_engine
node_stacking -.->|"uses sensor and index definitions"| node_catalogue
node_processing -.->|"offers workflow stage"| node_classification
node_processing -.->|"offers workflow stage"| node_change
node_dashboard -.->|"presents results"| node_user

click node_app "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/application_principale.py"
click node_accounts "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/gestion_comptes_utilisateurs.py"
click node_translations "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/traductions_fr_en.py"
click node_home "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_accueil.py"
click node_processing "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_traitement.py"
click node_studyarea "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/lecture_zone_etude.py"
click node_satellite_ui "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/outils_donnees_satellitaires.py"
click node_preprocess_ui "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/outils_pretraitement_stacking.py"
click node_catalogue "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/catalogue_capteurs_indices.py"
click node_ee_connection "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/connexion_earth_engine.py"
click node_search "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/recherche_images_earth_engine.py"
click node_filters "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/filtres_masques_earth_engine.py"
click node_stacking "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/pretraitement_stacking_earth_engine.py"
click node_classification "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_traitement.py"
click node_change "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_traitement.py"
click node_dashboard "https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_tableau_bord_rapport.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_app,node_accounts,node_translations,node_home,node_user toneBlue
class node_processing,node_studyarea,node_satellite_ui,node_preprocess_ui toneAmber
class node_catalogue,node_ee_connection,node_search,node_filters,node_stacking,node_earth_engine toneMint
class node_classification,node_change,node_dashboard toneRose
```

## Components

### Application and access

- [Streamlit application](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/application_principale.py): `application_principale.py`
- [Account management](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/gestion_comptes_utilisateurs.py): `gestion_comptes_utilisateurs.py`
- [French-English text](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/traductions_fr_en.py): `traductions_fr_en.py`
- [Home and workflow guide](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_accueil.py): `page_accueil.py`

### Study and configuration

- [Processing interface](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_traitement.py): `page_traitement.py`
- [Study-area reader](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/lecture_zone_etude.py): `lecture_zone_etude.py`
- [Sensor and search controls](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/outils_donnees_satellitaires.py): `outils_donnees_satellitaires.py`
- [Preprocessing and stack controls](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/outils_pretraitement_stacking.py): `outils_pretraitement_stacking.py`

### Satellite processing

- [Sensor and index catalogue](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/catalogue_capteurs_indices.py): `catalogue_capteurs_indices.py`
- [Earth Engine connection](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/connexion_earth_engine.py): `connexion_earth_engine.py`
- [Image search and previews](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/recherche_images_earth_engine.py): `recherche_images_earth_engine.py`
- [Image masks and filters](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/filtres_masques_earth_engine.py): `filtres_masques_earth_engine.py`
- [Composite and stack builder](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/pretraitement_stacking_earth_engine.py): `pretraitement_stacking_earth_engine.py`
- **Google Earth Engine**

### Analysis and reporting

- [Training and classification](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_traitement.py): `page_traitement.py`
- [Deforestation change detection](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_traitement.py): `page_traitement.py`
- [Dashboard and report](https://github.com/josuebatasema9-ux/deforestation-app/blob/main/page_tableau_bord_rapport.py): `page_tableau_bord_rapport.py`

### Other components

- **User**

## Connections

- User → Streamlit application: uses (evidence: `application_principale.py`)
- Streamlit application → Account management: checks accounts (evidence: `application_principale.py`)
- Streamlit application → French-English text: translates labels (evidence: `application_principale.py`)
- Streamlit application → Home and workflow guide: renders (evidence: `application_principale.py`)
- Streamlit application → Processing interface: renders (evidence: `application_principale.py`)
- Streamlit application → Dashboard and report: renders (evidence: `application_principale.py`)
- User → Processing interface: configures workflow
- Processing interface → Study-area reader: loads uploaded zone (evidence: `page_traitement.py`)
- Processing interface → Sensor and search controls: dispatches tools (evidence: `page_traitement.py`)
- Processing interface → Preprocessing and stack controls: dispatches tools (evidence: `page_traitement.py`)
- Sensor and search controls → Earth Engine connection: initializes connection (evidence: `outils_donnees_satellitaires.py`)
- Earth Engine connection → Google Earth Engine: authenticates (evidence: `connexion_earth_engine.py`)
- Sensor and search controls → Sensor and index catalogue: uses sensor definitions (evidence: `outils_donnees_satellitaires.py`)
- Sensor and search controls → Image search and previews: requests imagery search (evidence: `outils_donnees_satellitaires.py`)
- Image search and previews → Google Earth Engine: queries collections
- Image search and previews → Image masks and filters: uses cloud masks (evidence: `recherche_images_earth_engine.py`)
- Preprocessing and stack controls → Composite and stack builder: builds stack (evidence: `outils_pretraitement_stacking.py`)
- Composite and stack builder → Image masks and filters: applies preprocessing (evidence: `pretraitement_stacking_earth_engine.py`)
- Composite and stack builder → Google Earth Engine: builds composites
- Composite and stack builder → Sensor and index catalogue: uses sensor and index definitions (evidence: `pretraitement_stacking_earth_engine.py`)
- Processing interface → Training and classification: offers workflow stage (evidence: `page_traitement.py`)
- Processing interface → Deforestation change detection: offers workflow stage (evidence: `page_traitement.py`)
- Dashboard and report → User: presents results
