# garthigan/house-price-prediction architecture

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

- Interactive diagram: https://gitdiagram.com/garthigan/house-price-prediction
- Repository: https://github.com/garthigan/house-price-prediction

## Overview

##### Project Type and Purpose
- This is a full-stack machine-learning web application for end-to-end prediction of Bangalore house prices.
- The repository includes:
- Data collection and exploration (Jupyter notebooks, raw CSV)
- Model training artifacts (pickle file, columns.json)
- A Python-based backend server
- A browser-based frontend (HTML/CSS/JS)

##### File Structure Analysis
Top-level
- House_predictor.ipynb, Bengaluru_House_Data.csv: exploratory analysis and model training
- bangalore_house_prices_model.pickle, columns.json: model artifacts
BHP/
- client/: standalone front-end (app.html, app.js, app.css)
- model/: backup of training artifacts and notebook
- server/:
– server.py, util.py: Python web server (likely Flask/FastAPI)
– artifacts/: model and metadata
– static/: served static files (index.html, app.js, app.css)
Configuration & tooling directories: .vscode, .idea, .ipynb_checkpoints

##### README Insights
- “End-to-End Bangalore House Price Prediction” emphasizing full pipeline from data ingestion through deployment.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Offline ML Pipeline
    subgraph "Offline ML Pipeline"
        direction TB
        CSV["Bengaluru_House_Data.csv"]:::data
        click CSV "https://github.com/garthigan/house-price-prediction/blob/master//Bengaluru_House_Data.csv"

        Notebook["House_predictor.ipynb\n(EDA & Training)"]:::notebook
        click Notebook "https://github.com/garthigan/house-price-prediction/blob/master//House_predictor.ipynb"

        BackupNotebook["bhp.ipynb\n(Backup Notebook)"]:::notebook
        click BackupNotebook "https://github.com/garthigan/house-price-prediction/blob/master//BHP/model/bhp.ipynb"

        CSV -->|"read data"| Notebook
        Notebook -->|"trains model"| ArtifactsOutput
    end

    %% Model Artifacts Store
    subgraph "Model Artifacts Store"
        direction TB
        ArtifactsOutput["Model Artifacts\n(banglore_house_prices_model.pickle,\ncolumns.json)"]:::artifact
        DeploymentStore["Deployment Store\n(/BHP/server/artifacts)"]:::artifact
        BackupStore["Backup Store\n(/BHP/model)"]:::artifact

        ArtifactsOutput --> BackupStore
        ArtifactsOutput --> DeploymentStore

        click ArtifactsOutput "https://github.com/garthigan/house-price-prediction/blob/master//bangalore_house_prices_model.pickle"
        click ArtifactsOutput "https://github.com/garthigan/house-price-prediction/blob/master//columns.json"
        click BackupStore "https://github.com/garthigan/house-price-prediction/blob/master//BHP/model/bangalore_house_prices_model.pickle"
        click BackupStore "https://github.com/garthigan/house-price-prediction/blob/master//BHP/model/columns.json"
        click DeploymentStore "https://github.com/garthigan/house-price-prediction/blob/master//BHP/server/artifacts/bangalore_house_prices_model.pickle"
        click DeploymentStore "https://github.com/garthigan/house-price-prediction/blob/master//BHP/server/artifacts/columns.json"
    end

    %% Online Inference Pipeline
    subgraph "Online Inference Pipeline"
        direction TB
        Browser["Web Browser"]:::user

        subgraph Frontend
            direction TB
            DevClient["Dev Client\n(app.html, app.css, app.js)"]:::frontend
            click DevClient "https://github.com/garthigan/house-price-prediction/blob/master//BHP/client/app.html"
            click DevClient "https://github.com/garthigan/house-price-prediction/blob/master//BHP/client/app.css"
            click DevClient "https://github.com/garthigan/house-price-prediction/blob/master//BHP/client/app.js"
            StaticClient["Static Client\n(index.html, app.css, app.js)"]:::frontend
            click StaticClient "https://github.com/garthigan/house-price-prediction/blob/master//BHP/server/static/index.html"
            click StaticClient "https://github.com/garthigan/house-price-prediction/blob/master//BHP/server/static/app.css"
            click StaticClient "https://github.com/garthigan/house-price-prediction/blob/master//BHP/server/static/app.js"
        end

        subgraph Backend
            direction TB
            Server["API Server\n(/predict)"]:::backend
            click Server "https://github.com/garthigan/house-price-prediction/blob/master//BHP/server/server.py"
            Util["Preprocessor & Utils"]:::backend
            click Util "https://github.com/garthigan/house-price-prediction/blob/master//BHP/server/util.py"
        end

        Browser -->|HTTP POST JSON| Server
        Server -->|loads artifacts\nPickle + JSON| DeploymentStore
        Server --> Util
        Util --> DeploymentStore
        Server -->|prediction response\nJSON| Browser
    end

    classDef data fill:#aed6f1,stroke:#1f618d,color:#1b2631
    classDef notebook fill:#fad7a0,stroke:#b9770e,color:#1b2631
    classDef artifact fill:#fcf3cf,stroke:#b7950b,color:#1b2631
    classDef backend fill:#abebc6,stroke:#1d8348,color:#1b2631
    classDef frontend fill:#d7bde2,stroke:#7d3c98,color:#1b2631
    classDef user fill:#f5b7b1,stroke:#922b21,color:#1b2631
```
