# gaurav150605/real-estate-scrapping architecture

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

- Interactive diagram: https://gitdiagram.com/gaurav150605/real-estate-scrapping
- Repository: https://github.com/gaurav150605/real-estate-scrapping

## Overview

RealInsight15 is a Pune property-search and intelligence marketplace. A user searches by location; the frontend requests live listings, the API gathers listings and adds anomaly scores, and the UI presents cards and expanded property details. Users can request an explainable price estimate or scam check for a listing, and ask the chatbot about investments and market topics. The README documents these capabilities; the sampled frontend excerpt is partial, so uncertain UI wiring is not shown. The backend source supports the API, scraper and ML relationships shown here.

Main entry points: [`backend/main.py`](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/main.py) (FastAPI service), [`backend/ml_pipeline.py`](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/ml_pipeline.py) (ML pipeline), [`frontend/src/app/page.tsx`](https://github.com/gaurav150605/real-estate-scrapping/blob/main/frontend/src/app/page.tsx) (Search and reports), [`backend/scraper.py`](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/scraper.py) (Listing scraper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Marketplace experience"]
  node_webapp["Search and reports<br/>[page.tsx]"]
end

subgraph group_api["Backend API"]
  node_api_service["FastAPI service<br/>[main.py]"]
  node_locations["Location options<br/>[main.py]"]
end

subgraph group_acquisition["Listing acquisition"]
  node_scraper["Listing scraper<br/>[scraper.py]"]
end

subgraph group_intelligence["ML and advice"]
  node_chatbot["Intent chatbot<br/>[main.py]"]
  node_ml_pipeline["ML pipeline<br/>[ml_pipeline.py]"]
  node_price_model["Price prediction and SHAP<br/>[ml_pipeline.py]"]
  node_anomaly_model["Anomaly detection<br/>[ml_pipeline.py]"]
end

subgraph group_training["Training data"]
  node_training_data["Pune property dataset"]
end

node_buyer(("Property seeker"))
node_magicbricks(("MagicBricks"))

node_buyer -->|"searches and explores"| node_webapp
node_webapp -->|"requests listings"| node_api_service
node_api_service -->|"fetches listings"| node_scraper
node_scraper -->|"requests property pages"| node_magicbricks
node_scraper -->|"returns listing data"| node_api_service
node_api_service -->|"scores listings"| node_ml_pipeline
node_ml_pipeline -->|"checks anomalies"| node_anomaly_model
node_anomaly_model -->|"returns risk score"| node_ml_pipeline
node_api_service -->|"returns listings"| node_webapp
node_webapp -->|"requests price estimate"| node_api_service
node_api_service -->|"requests price analysis"| node_ml_pipeline
node_ml_pipeline -->|"predicts and explains"| node_price_model
node_price_model -->|"returns estimate and SHAP"| node_ml_pipeline
node_webapp -->|"requests scam check"| node_api_service
node_api_service -->|"returns analysis"| node_webapp
node_webapp -->|"sends chat message"| node_api_service
node_api_service -->|"matches intent"| node_chatbot
node_chatbot -->|"returns reply"| node_api_service
node_api_service -->|"serves locations"| node_locations
node_api_service -->|"initializes on startup"| node_ml_pipeline
node_ml_pipeline -->|"reads training data"| node_training_data

click node_webapp "https://github.com/gaurav150605/real-estate-scrapping/blob/main/frontend/src/app/page.tsx"
click node_api_service "https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/main.py"
click node_locations "https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/main.py"
click node_chatbot "https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/main.py"
click node_scraper "https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/scraper.py"
click node_ml_pipeline "https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/ml_pipeline.py"
click node_price_model "https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/ml_pipeline.py"
click node_anomaly_model "https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/ml_pipeline.py"
click node_training_data "https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/data/real_estate_pune.csv"

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 toneBlue
class node_api_service,node_locations toneAmber
class node_scraper toneMint
class node_chatbot,node_ml_pipeline,node_price_model,node_anomaly_model toneRose
class node_training_data,node_buyer,node_magicbricks toneIndigo
```

## Components

### Marketplace experience

- [Search and reports](https://github.com/gaurav150605/real-estate-scrapping/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`

### Backend API

- [FastAPI service](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/main.py): `backend/main.py`
- [Location options](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/main.py): `backend/main.py`

### Listing acquisition

- [Listing scraper](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/scraper.py): `backend/scraper.py`

### ML and advice

- [Intent chatbot](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/main.py): `backend/main.py`
- [ML pipeline](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/ml_pipeline.py): `backend/ml_pipeline.py`
- [Price prediction and SHAP](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/ml_pipeline.py): `backend/ml_pipeline.py`
- [Anomaly detection](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/ml_pipeline.py): `backend/ml_pipeline.py`

### Training data

- [Pune property dataset](https://github.com/gaurav150605/real-estate-scrapping/blob/main/backend/data/real_estate_pune.csv): `backend/data/real_estate_pune.csv`

### Other components

- **Property seeker**
- **MagicBricks**

## Connections

- Property seeker → Search and reports: searches and explores
- Search and reports → FastAPI service: requests listings
- FastAPI service → Listing scraper: fetches listings
- Listing scraper → MagicBricks: requests property pages
- Listing scraper → FastAPI service: returns listing data
- FastAPI service → ML pipeline: scores listings
- ML pipeline → Anomaly detection: checks anomalies
- Anomaly detection → ML pipeline: returns risk score
- FastAPI service → Search and reports: returns listings
- Search and reports → FastAPI service: requests price estimate
- FastAPI service → ML pipeline: requests price analysis
- ML pipeline → Price prediction and SHAP: predicts and explains
- Price prediction and SHAP → ML pipeline: returns estimate and SHAP
- Search and reports → FastAPI service: requests scam check
- FastAPI service → Search and reports: returns analysis
- Search and reports → FastAPI service: sends chat message
- FastAPI service → Intent chatbot: matches intent
- Intent chatbot → FastAPI service: returns reply
- FastAPI service → Location options: serves locations
- FastAPI service → ML pipeline: initializes on startup
- ML pipeline → Pune property dataset: reads training data
