# arpit-kumar05/project-house-price-prediction- architecture

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

- Interactive diagram: https://gitdiagram.com/arpit-kumar05/project-house-price-prediction-
- Repository: https://github.com/arpit-kumar05/project-house-price-prediction-

## Overview

This is a Flask house-price prediction app. A user submits property details through the web interface; the app forms model inputs, predicts a price, records the inputs and prediction in SQLite, and renders the result. A separate training script fits and saves the prediction pipeline from the supplied dataset. The excerpts establish the app-to-model and app-to-database relationships; template details were not sampled, so the UI connection is based on the app’s explicit render calls.

Main entry points: [`app.py`](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/app.py) (Flask app), [`train.py`](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/train.py) (Model trainer), [`templates/index.html`](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/templates/index.html) (Prediction page), [`database.py`](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/database.py) (Schema initializer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask app<br/>[app.py]"]
  node_interface["Prediction page<br/>[index.html]"]
  node_verification["Verification file"]
end

subgraph group_ml["Model training"]
  node_training["Model trainer<br/>[train.py]"]
  node_dataset["House dataset"]
  node_model["Trained pipeline<br/>[model.pkl]"]
end

subgraph group_storage["Prediction storage"]
  node_schema["Schema initializer<br/>[database.py]"]
  node_records[("Prediction records<br/>[predictions.db]")]
end

node_user(("Property user"))

node_user -->|"submits details"| node_flask
node_flask -->|"renders page"| node_interface
node_interface -->|"shows result"| node_user
node_training -->|"reads data"| node_dataset
node_training -->|"saves pipeline"| node_model
node_flask -->|"loads and predicts"| node_model
node_flask -->|"initializes schema"| node_schema
node_schema -->|"creates table"| node_records
node_flask -->|"writes prediction"| node_records
node_flask -->|"serves file"| node_verification

click node_flask "https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/app.py"
click node_interface "https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/templates/index.html"
click node_training "https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/train.py"
click node_dataset "https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/House%20Price%20Prediction%20Dataset.csv"
click node_model "https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/model.pkl"
click node_schema "https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/database.py"
click node_records "https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/predictions.db"
click node_verification "https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/static/google58a9c145bd498aaf.html"

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_flask,node_interface,node_verification,node_user toneBlue
class node_training,node_dataset,node_model toneAmber
class node_schema,node_records toneMint
```

## Components

### Web application

- [Flask app](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/app.py): `app.py`
- [Prediction page](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/templates/index.html): `templates/index.html`
- [Verification file](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/static/google58a9c145bd498aaf.html): `static/google58a9c145bd498aaf.html`

### Model training

- [Model trainer](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/train.py): `train.py`
- [House dataset](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/House%20Price%20Prediction%20Dataset.csv): `House Price Prediction Dataset.csv`
- [Trained pipeline](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/model.pkl): `model.pkl`

### Prediction storage

- [Schema initializer](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/database.py): `database.py`
- [Prediction records](https://github.com/arpit-kumar05/project-house-price-prediction-/blob/master/predictions.db): `predictions.db`

### Other components

- **Property user**

## Connections

- Property user → Flask app: submits details (evidence: `app.py`)
- Flask app → Prediction page: renders page (evidence: `app.py`)
- Prediction page → Property user: shows result
- Model trainer → House dataset: reads data (evidence: `train.py`)
- Model trainer → Trained pipeline: saves pipeline (evidence: `train.py`)
- Flask app → Trained pipeline: loads and predicts (evidence: `app.py`)
- Flask app → Schema initializer: initializes schema (evidence: `app.py`)
- Schema initializer → Prediction records: creates table (evidence: `database.py`)
- Flask app → Prediction records: writes prediction (evidence: `app.py`)
- Flask app → Verification file: serves file (evidence: `app.py`)
