# jeethesh022/landinsight architecture

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

- Interactive diagram: https://gitdiagram.com/jeethesh022/landinsight
- Repository: https://github.com/jeethesh022/landinsight

## Overview

LandInsight is a Flask land-valuation application. Users enter property details in quick or advanced valuation flows; the app resolves and fills property data, predicts price per square foot, adds comparable-based range and reliability information, explains the estimate, and offers reports and saved history. Account access, area lookup, and map-related endpoints are also represented. The source excerpts establish the app-to-explainer integration, but not all internal route calls or template wiring, so uncertain connections are omitted.

Main entry points: [`app.py`](https://github.com/jeethesh022/landinsight/blob/main/app.py) (Flask routes), [`train_model.py`](https://github.com/jeethesh022/landinsight/blob/main/train_model.py) (Model training), [`templates/quick.html`](https://github.com/jeethesh022/landinsight/blob/main/templates/quick.html) (Quick valuation), [`templates/advanced.html`](https://github.com/jeethesh022/landinsight/blob/main/templates/advanced.html) (Advanced valuation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_valuation["Valuation"]
  node_webapp["Flask routes<br/>[app.py]"]
  node_property_inputs["Property input<br/>[app.py]"]
  node_location_resolution["Location resolution<br/>[app.py]"]
  node_area_defaults["Area defaults<br/>[app.py]"]
  node_price_model["Price prediction<br/>[app.py]"]
  node_model_artifacts["Trained models"]
  node_dataset["Land dataset"]
  node_area_lookup["Area lookup<br/>[app.py]"]
  node_training["Model training<br/>[train_model.py]"]
end

subgraph group_insights["Pricing insights"]
  node_comparables["Comparable price range<br/>[app.py]"]
  node_explanation["Feature explanations<br/>[explainer.py]"]
  node_explanation_ui["Explanation display<br/>[why_price.js]"]
  node_report["Valuation report<br/>[app.py]"]
end

subgraph group_accounts["Accounts and history"]
  node_accounts["Registration and login<br/>[app.py]"]
  node_history["Saved valuations<br/>[app.py]"]
  node_database[("SQLite database<br/>[app.py]")]
end

subgraph group_experience["User experience"]
  node_quick_page["Quick valuation<br/>[quick.html]"]
  node_advanced_page["Advanced valuation<br/>[advanced.html]"]
  node_result_page["Valuation result<br/>[result.html]"]
  node_history_page["History page<br/>[history.html]"]
end

node_user(("Property owner"))

node_user -->|"enters details"| node_quick_page
node_user -->|"enters details"| node_advanced_page
node_quick_page -.->|"submits valuation"| node_webapp
node_advanced_page -.->|"submits valuation"| node_webapp
node_webapp -->|"processes input"| node_property_inputs
node_property_inputs -->|"resolves place"| node_location_resolution
node_property_inputs -->|"fills defaults"| node_area_defaults
node_webapp -->|"predicts price"| node_price_model
node_price_model -.->|"loads model"| node_model_artifacts
node_price_model -.->|"uses property data"| node_dataset
node_webapp -->|"computes range"| node_comparables
node_webapp -->|"builds explanation"| node_explanation
node_webapp -.->|"renders result"| node_result_page
node_result_page -.->|"renders explanation"| node_explanation_ui
node_webapp -->|"builds report"| node_report
node_user -.->|"manages account"| node_accounts
node_accounts -->|"reads and writes"| node_database
node_webapp -->|"loads valuations"| node_history
node_history -->|"reads records"| node_database
node_history -->|"renders history"| node_history_page
node_user -.->|"requests area data"| node_area_lookup
node_training -->|"trains from"| node_dataset
node_training -->|"writes model"| node_model_artifacts

click node_webapp "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_property_inputs "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_location_resolution "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_area_defaults "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_price_model "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_model_artifacts "https://github.com/jeethesh022/landinsight/blob/main/land_price_model_final.pkl"
click node_dataset "https://github.com/jeethesh022/landinsight/blob/main/Land_Datasets_2.csv"
click node_comparables "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_explanation "https://github.com/jeethesh022/landinsight/blob/main/explainer.py"
click node_explanation_ui "https://github.com/jeethesh022/landinsight/blob/main/static/why_price.js"
click node_report "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_accounts "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_history "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_database "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_quick_page "https://github.com/jeethesh022/landinsight/blob/main/templates/quick.html"
click node_advanced_page "https://github.com/jeethesh022/landinsight/blob/main/templates/advanced.html"
click node_result_page "https://github.com/jeethesh022/landinsight/blob/main/templates/result.html"
click node_history_page "https://github.com/jeethesh022/landinsight/blob/main/templates/history.html"
click node_area_lookup "https://github.com/jeethesh022/landinsight/blob/main/app.py"
click node_training "https://github.com/jeethesh022/landinsight/blob/main/train_model.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_webapp,node_property_inputs,node_location_resolution,node_area_defaults,node_price_model,node_model_artifacts,node_dataset,node_area_lookup,node_training toneBlue
class node_comparables,node_explanation,node_explanation_ui,node_report toneAmber
class node_accounts,node_history,node_database toneMint
class node_quick_page,node_advanced_page,node_result_page,node_history_page toneRose
class node_user toneIndigo
```

## Components

### Valuation

- [Flask routes](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`
- [Property input](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`
- [Location resolution](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`
- [Area defaults](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`
- [Price prediction](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`
- [Trained models](https://github.com/jeethesh022/landinsight/blob/main/land_price_model_final.pkl): `land_price_model_final.pkl`
- [Land dataset](https://github.com/jeethesh022/landinsight/blob/main/Land_Datasets_2.csv): `Land_Datasets_2.csv`
- [Area lookup](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`
- [Model training](https://github.com/jeethesh022/landinsight/blob/main/train_model.py): `train_model.py`

### Pricing insights

- [Comparable price range](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`
- [Feature explanations](https://github.com/jeethesh022/landinsight/blob/main/explainer.py): `explainer.py`
- [Explanation display](https://github.com/jeethesh022/landinsight/blob/main/static/why_price.js): `static/why_price.js`
- [Valuation report](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`

### Accounts and history

- [Registration and login](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`
- [Saved valuations](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`
- [SQLite database](https://github.com/jeethesh022/landinsight/blob/main/app.py): `app.py`

### User experience

- [Quick valuation](https://github.com/jeethesh022/landinsight/blob/main/templates/quick.html): `templates/quick.html`
- [Advanced valuation](https://github.com/jeethesh022/landinsight/blob/main/templates/advanced.html): `templates/advanced.html`
- [Valuation result](https://github.com/jeethesh022/landinsight/blob/main/templates/result.html): `templates/result.html`
- [History page](https://github.com/jeethesh022/landinsight/blob/main/templates/history.html): `templates/history.html`

### Other components

- **Property owner**

## Connections

- Property owner → Quick valuation: enters details
- Property owner → Advanced valuation: enters details
- Quick valuation → Flask routes: submits valuation
- Advanced valuation → Flask routes: submits valuation
- Flask routes → Property input: processes input (evidence: `app.py`)
- Property input → Location resolution: resolves place (evidence: `app.py`)
- Property input → Area defaults: fills defaults (evidence: `app.py`)
- Flask routes → Price prediction: predicts price (evidence: `app.py`)
- Price prediction → Trained models: loads model
- Price prediction → Land dataset: uses property data
- Flask routes → Comparable price range: computes range (evidence: `app.py`)
- Flask routes → Feature explanations: builds explanation (evidence: `app.py`)
- Flask routes → Valuation result: renders result
- Valuation result → Explanation display: renders explanation
- Flask routes → Valuation report: builds report (evidence: `app.py`)
- Property owner → Registration and login: manages account
- Registration and login → SQLite database: reads and writes (evidence: `app.py`)
- Flask routes → Saved valuations: loads valuations (evidence: `app.py`)
- Saved valuations → SQLite database: reads records (evidence: `app.py`)
- Saved valuations → History page: renders history (evidence: `app.py`)
- Property owner → Area lookup: requests area data
- Model training → Land dataset: trains from (evidence: `train_model.py`)
- Model training → Trained models: writes model (evidence: `train_model.py`)
