# ahmdelsayed/egyptian-house-predictor architecture

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

- Interactive diagram: https://gitdiagram.com/ahmdelsayed/egyptian-house-predictor
- Repository: https://github.com/ahmdelsayed/egyptian-house-predictor

## Overview

The product is an Egyptian property-price estimator with a React interface and Flask prediction API. A visitor enters location, property type, area, bedrooms, and bathrooms; the form fetches model-derived options, submits the inputs, and displays an EGP estimate. The README also describes the listing-data cleaning, analysis, and model-training stages behind the saved pipeline, plus community and informational website sections. Source excerpts establish the form/API/model calls and React composition; training-stage relationships are documented in the README, not verified from notebook contents.

Main entry points: [`frontend/src/App.jsx`](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/App.jsx) (Page composition), [`frontend/src/components/EstimatorForm.jsx`](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/EstimatorForm.jsx) (Estimator form), [`backend/app.py`](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/backend/app.py) (Flask API), [`backend/house_price_model.pkl`](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/backend/house_price_model.pkl) (Saved prediction pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["Page composition<br/>[App.jsx]"]
  node_navigation["Navigation<br/>[Navbar.jsx]"]
  node_hero["Hero section<br/>[Hero.jsx]"]
  node_communities["Community listings<br/>[Communities.jsx]"]
  node_about["About section<br/>[WhyUs.jsx]"]
  node_footer["Footer<br/>[Footer.jsx]"]
end

subgraph group_estimate["Estimation flow"]
  node_estimator["Estimator form<br/>[EstimatorForm.jsx]"]
  node_form_controls["Form controls"]
end

subgraph group_service["Prediction service"]
  node_api["Flask API<br/>[app.py]"]
  node_model[("Saved prediction pipeline")]
end

subgraph group_modeling["Model preparation"]
  node_notebook["Cleaning and training<br/>[house_price.ipynb]"]
end

node_visitor(("Property seeker"))
node_dataset["Egyptian listings dataset"]

node_visitor -->|"opens"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"renders"| node_navigation
node_app -->|"renders"| node_hero
node_app -->|"renders"| node_estimator
node_app -->|"renders"| node_communities
node_app -->|"renders"| node_about
node_app -->|"renders"| node_footer
node_estimator -->|"renders"| node_form_controls
node_estimator -->|"fetches options"| node_api
node_estimator -->|"submits inputs"| node_api
node_api -->|"loads pipeline"| node_model
node_api -->|"predicts price"| node_model
node_dataset -.->|"analyzed"| node_notebook
node_notebook -.->|"trains and saves"| node_model

click node_entry "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/main.jsx"
click node_app "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/App.jsx"
click node_navigation "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/Navbar.jsx"
click node_hero "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/Hero.jsx"
click node_communities "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/Communities.jsx"
click node_about "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/WhyUs.jsx"
click node_footer "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/Footer.jsx"
click node_estimator "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/EstimatorForm.jsx"
click node_form_controls "https://github.com/ahmdelsayed/egyptian-house-predictor/tree/master/frontend/src/components/ui"
click node_api "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/backend/app.py"
click node_model "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/backend/house_price_model.pkl"
click node_notebook "https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/backend/house_price.ipynb"

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_entry,node_app,node_navigation,node_hero,node_communities,node_about,node_footer toneBlue
class node_estimator,node_form_controls toneAmber
class node_api,node_model toneMint
class node_notebook toneRose
class node_visitor,node_dataset toneIndigo
```

## Components

### Web experience

- [React entry](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Page composition](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Navigation](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Hero section](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/Hero.jsx): `frontend/src/components/Hero.jsx`
- [Community listings](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/Communities.jsx): `frontend/src/components/Communities.jsx`
- [About section](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/WhyUs.jsx): `frontend/src/components/WhyUs.jsx`
- [Footer](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/Footer.jsx): `frontend/src/components/Footer.jsx`

### Estimation flow

- [Estimator form](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/frontend/src/components/EstimatorForm.jsx): `frontend/src/components/EstimatorForm.jsx`
- [Form controls](https://github.com/ahmdelsayed/egyptian-house-predictor/tree/master/frontend/src/components/ui): `frontend/src/components/ui`

### Prediction service

- [Flask API](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/backend/app.py): `backend/app.py`
- [Saved prediction pipeline](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/backend/house_price_model.pkl): `backend/house_price_model.pkl`

### Model preparation

- [Cleaning and training](https://github.com/ahmdelsayed/egyptian-house-predictor/blob/master/backend/house_price.ipynb): `backend/house_price.ipynb`

### Other components

- **Property seeker**
- **Egyptian listings dataset**

## Connections

- Property seeker → React entry: opens (evidence: `README.md`)
- React entry → Page composition: renders (evidence: `frontend/src/main.jsx`)
- Page composition → Navigation: renders (evidence: `frontend/src/App.jsx`)
- Page composition → Hero section: renders (evidence: `frontend/src/App.jsx`)
- Page composition → Estimator form: renders (evidence: `frontend/src/App.jsx`)
- Page composition → Community listings: renders (evidence: `frontend/src/App.jsx`)
- Page composition → About section: renders (evidence: `frontend/src/App.jsx`)
- Page composition → Footer: renders (evidence: `frontend/src/App.jsx`)
- Estimator form → Form controls: renders (evidence: `frontend/src/components/EstimatorForm.jsx`)
- Estimator form → Flask API: fetches options (evidence: `frontend/src/components/EstimatorForm.jsx`)
- Estimator form → Flask API: submits inputs (evidence: `frontend/src/components/EstimatorForm.jsx`)
- Flask API → Saved prediction pipeline: loads pipeline (evidence: `backend/app.py`)
- Flask API → Saved prediction pipeline: predicts price (evidence: `backend/app.py`)
- Egyptian listings dataset → Cleaning and training: analyzed (evidence: `README.md`)
- Cleaning and training → Saved prediction pipeline: trains and saves (evidence: `README.md`)
