# tolgatopaloglu/turkiye_konut_price_predictor architecture

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

- Interactive diagram: https://gitdiagram.com/tolgatopaloglu/turkiye_konut_price_predictor
- Repository: https://github.com/tolgatopaloglu/turkiye_konut_price_predictor

## Overview

This is a Turkish housing-price prediction project with a small FastAPI web interface and a documented machine-learning workflow. The serving path is clear in `main.py`: the app renders a page, accepts housing features at `/predict`, and calls a loaded model to return a price range. The README describes data preparation, regression experiments, tuning, evaluation and MLflow tracking, but the notebook was not sampled. There is also a filename mismatch: the app opens `TOKI_price_regression.pkl1`, while the tree contains `TOKI_price_regression.pkl`; the artifact link is therefore uncertain.

Main entry points: [`Turkey_Housing_Price_Prediction.ipynb`](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb) (Training workflow), [`main.py`](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/main.py) (FastAPI app), [`turkiye_konut_projeleri_2026.csv`](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/turkiye_konut_projeleri_2026.csv) (Housing dataset), [`templates/index.html`](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/templates/index.html) (Housing page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web serving"]
  node_ui["Housing page<br/>[index.html]"]
  node_app["FastAPI app<br/>[main.py]"]
  node_features["Feature input<br/>[main.py]"]
  node_predict["Price prediction<br/>[main.py]"]
end

subgraph group_ml["Model development"]
  node_notebook["Training workflow"]
  node_prep["Data preparation"]
  node_experiments["Model experiments"]
  node_evaluation["Model evaluation"]
  node_tracking["Experiment tracking"]
  node_artifact["Serialized model"]
end

subgraph group_data["Project data"]
  node_dataset["Housing dataset"]
end

node_user(("User"))

node_user -->|"opens page"| node_app
node_app -->|"renders template"| node_ui
node_user -->|"submits features"| node_features
node_features -->|"provides input"| node_predict
node_app -->|"calls predict"| node_predict
node_dataset -->|"supplies data"| node_prep
node_notebook -->|"documents workflow"| node_prep
node_notebook -->|"documents workflow"| node_experiments
node_notebook -->|"documents workflow"| node_evaluation
node_notebook -.->|"documents workflow"| node_tracking
node_predict -.->|"loads model"| node_artifact

click node_ui "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/templates/index.html"
click node_app "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/main.py"
click node_features "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/main.py"
click node_predict "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/main.py"
click node_dataset "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/turkiye_konut_projeleri_2026.csv"
click node_notebook "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb"
click node_prep "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb"
click node_experiments "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb"
click node_evaluation "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb"
click node_tracking "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb"
click node_artifact "https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/TOKI_price_regression.pkl"

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_ui,node_app,node_features,node_predict,node_user toneBlue
class node_notebook,node_prep,node_experiments,node_evaluation,node_tracking,node_artifact toneAmber
class node_dataset toneMint
```

## Components

### Web serving

- [Housing page](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/templates/index.html): `templates/index.html`
- [FastAPI app](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/main.py): `main.py`
- [Feature input](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/main.py): `main.py`
- [Price prediction](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/main.py): `main.py`

### Model development

- [Training workflow](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb): `Turkey_Housing_Price_Prediction.ipynb`
- [Data preparation](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb): `Turkey_Housing_Price_Prediction.ipynb`
- [Model experiments](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb): `Turkey_Housing_Price_Prediction.ipynb`
- [Model evaluation](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb): `Turkey_Housing_Price_Prediction.ipynb`
- [Experiment tracking](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/Turkey_Housing_Price_Prediction.ipynb): `Turkey_Housing_Price_Prediction.ipynb`
- [Serialized model](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/TOKI_price_regression.pkl): `TOKI_price_regression.pkl`

### Project data

- [Housing dataset](https://github.com/tolgatopaloglu/turkiye_konut_price_predictor/blob/main/turkiye_konut_projeleri_2026.csv): `turkiye_konut_projeleri_2026.csv`

### Other components

- **User**

## Connections

- User → FastAPI app: opens page
- FastAPI app → Housing page: renders template
- User → Feature input: submits features
- Feature input → Price prediction: provides input
- FastAPI app → Price prediction: calls predict
- Housing dataset → Data preparation: supplies data
- Training workflow → Data preparation: documents workflow
- Training workflow → Model experiments: documents workflow
- Training workflow → Model evaluation: documents workflow
- Training workflow → Experiment tracking: documents workflow
- Price prediction → Serialized model: loads model
