# aravindputtapaka-ux/landwise architecture

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

- Interactive diagram: https://gitdiagram.com/aravindputtapaka-ux/landwise
- Repository: https://github.com/aravindputtapaka-ux/landwise

## Overview

LandWise AI is an account-based property-price intelligence application. Users sign up or log in, then submit a property-price or affordability search; the backend gathers current web evidence, validates and normalizes observations, estimates from comparable listings, and can add a historical forecast. Users can revisit and delete saved searches. The README documents the historical-data and affordability capabilities; some implementation details are unsampled, so their links are omitted or marked unverified.

Main entry points: [`backend/app/main.py`](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/main.py) (HTTP API), [`frontend/src/App.tsx`](https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/App.tsx) (App navigation), [`frontend/src/api.ts`](https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/api.ts) (API client), [`frontend/src/pages/Estimator.tsx`](https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/pages/Estimator.tsx) (Estimator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["App navigation<br/>[App.tsx]"]
  node_landing["Landing page<br/>[Landing.tsx]"]
  node_estimator["Estimator<br/>[Estimator.tsx]"]
  node_api["API client<br/>[api.ts]"]
end

subgraph group_identity["Accounts and history"]
  node_authctx["Auth state<br/>[AuthContext.tsx]"]
  node_signup["Signup flow<br/>[Signup.tsx]"]
  node_historyui["Search history UI<br/>[History.tsx]"]
  node_backend["HTTP API<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_email["OTP email<br/>[email_service.py]"]
end

subgraph group_evidence["Evidence collection"]
  node_source["Source discovery and extraction<br/>[source_service.py]"]
  node_tavily["Tavily search and extract"]
  node_parser["Observation parser<br/>[price_parser.py]"]
  node_units["Unit normalization<br/>[unit_utils.py]"]
  node_location["Location lookup"]
end

subgraph group_pricing["Pricing and forecasting"]
  node_historical["Historical retrieval"]
  node_comparable["Comparable estimator<br/>[ml_service.py]"]
  node_models["Request and response models<br/>[models.py]"]
end

subgraph group_persistence["User data"]
  node_observations["Observation access<br/>[storage.py]"]
  node_users[("User store and search history<br/>[user_store.py]")]
end

node_visitor(("Property seeker"))

node_visitor -->|"visits"| node_landing
node_landing -->|"starts navigation"| node_app
node_app -->|"shows signed-in"| node_estimator
node_app -->|"opens history"| node_historyui
node_app -->|"routes signup"| node_signup
node_signup -->|"calls signup"| node_authctx
node_authctx -->|"sends auth requests"| node_api
node_historyui -->|"loads and deletes"| node_api
node_estimator -.->|"submits searches"| node_api
node_api -.->|"requests API"| node_backend
node_backend -->|"validates tokens"| node_auth
node_backend -->|"sends OTP"| node_email
node_backend -->|"collects evidence"| node_source
node_source -.->|"searches and extracts"| node_tavily
node_source -->|"parses observations"| node_parser
node_parser -->|"normalizes units"| node_units
node_backend -->|"retrieves history"| node_historical
node_backend -->|"estimates and forecasts"| node_comparable
node_backend -->|"reads prior evidence"| node_observations
node_observations -->|"queries observations"| node_users
node_backend -.->|"stores search history"| node_users
node_backend -->|"uses API schemas"| node_models
node_estimator -.->|"resolves places"| node_location

click node_app "https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/App.tsx"
click node_landing "https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/pages/Landing.tsx"
click node_estimator "https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/pages/Estimator.tsx"
click node_api "https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/api.ts"
click node_authctx "https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/auth/AuthContext.tsx"
click node_signup "https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/pages/Signup.tsx"
click node_historyui "https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/pages/History.tsx"
click node_backend "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/main.py"
click node_auth "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/auth.py"
click node_email "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/email_service.py"
click node_source "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/source_service.py"
click node_parser "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/price_parser.py"
click node_units "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/unit_utils.py"
click node_historical "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/historical_tavily.py"
click node_comparable "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/ml_service.py"
click node_models "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/models.py"
click node_observations "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/storage.py"
click node_users "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/user_store.py"
click node_location "https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/location_service.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_app,node_landing,node_estimator,node_api toneBlue
class node_authctx,node_signup,node_historyui,node_backend,node_auth,node_email toneAmber
class node_source,node_tavily,node_parser,node_units,node_location toneMint
class node_historical,node_comparable,node_models toneRose
class node_observations,node_users,node_visitor toneIndigo
```

## Components

### Web experience

- [App navigation](https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Landing page](https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/pages/Landing.tsx): `frontend/src/pages/Landing.tsx`
- [Estimator](https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/pages/Estimator.tsx): `frontend/src/pages/Estimator.tsx`
- [API client](https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/api.ts): `frontend/src/api.ts`

### Accounts and history

- [Auth state](https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/auth/AuthContext.tsx): `frontend/src/auth/AuthContext.tsx`
- [Signup flow](https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/pages/Signup.tsx): `frontend/src/pages/Signup.tsx`
- [Search history UI](https://github.com/aravindputtapaka-ux/landwise/blob/main/frontend/src/pages/History.tsx): `frontend/src/pages/History.tsx`
- [HTTP API](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/auth.py): `backend/app/auth.py`
- [OTP email](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/email_service.py): `backend/app/services/email_service.py`

### Evidence collection

- [Source discovery and extraction](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/source_service.py): `backend/app/services/source_service.py`
- **Tavily search and extract**
- [Observation parser](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/price_parser.py): `backend/app/services/price_parser.py`
- [Unit normalization](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/unit_utils.py): `backend/app/unit_utils.py`
- [Location lookup](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/location_service.py): `backend/app/services/location_service.py`

### Pricing and forecasting

- [Historical retrieval](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/historical_tavily.py): `backend/app/services/historical_tavily.py`
- [Comparable estimator](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/ml_service.py): `backend/app/services/ml_service.py`
- [Request and response models](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/models.py): `backend/app/models.py`

### User data

- [Observation access](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/storage.py): `backend/app/services/storage.py`
- [User store and search history](https://github.com/aravindputtapaka-ux/landwise/blob/main/backend/app/services/user_store.py): `backend/app/services/user_store.py`

### Other components

- **Property seeker**

## Connections

- Property seeker → Landing page: visits
- Landing page → App navigation: starts navigation (evidence: `frontend/src/App.tsx`)
- App navigation → Estimator: shows signed-in (evidence: `frontend/src/App.tsx`)
- App navigation → Search history UI: opens history (evidence: `frontend/src/App.tsx`)
- App navigation → Signup flow: routes signup (evidence: `frontend/src/App.tsx`)
- Signup flow → Auth state: calls signup (evidence: `frontend/src/pages/Signup.tsx`)
- Auth state → API client: sends auth requests (evidence: `frontend/src/auth/AuthContext.tsx`)
- Search history UI → API client: loads and deletes (evidence: `frontend/src/pages/History.tsx`)
- Estimator → API client: submits searches (evidence: `frontend/src/pages/Estimator.tsx`)
- API client → HTTP API: requests API (evidence: `README.md`)
- HTTP API → Authentication: validates tokens (evidence: `backend/app/main.py`)
- HTTP API → OTP email: sends OTP (evidence: `backend/app/main.py`)
- HTTP API → Source discovery and extraction: collects evidence (evidence: `backend/app/main.py`)
- Source discovery and extraction → Tavily search and extract: searches and extracts (evidence: `README.md`)
- Source discovery and extraction → Observation parser: parses observations (evidence: `backend/app/services/source_service.py`)
- Observation parser → Unit normalization: normalizes units (evidence: `backend/app/services/price_parser.py`)
- HTTP API → Historical retrieval: retrieves history (evidence: `backend/app/main.py`)
- HTTP API → Comparable estimator: estimates and forecasts (evidence: `backend/app/main.py`)
- HTTP API → Observation access: reads prior evidence (evidence: `backend/app/main.py`)
- Observation access → User store and search history: queries observations (evidence: `backend/app/services/storage.py`)
- HTTP API → User store and search history: stores search history (evidence: `README.md`)
- HTTP API → Request and response models: uses API schemas (evidence: `backend/app/main.py`)
- Estimator → Location lookup: resolves places
