# shruthik2307/landsync architecture

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

- Interactive diagram: https://gitdiagram.com/shruthik2307/landsync
- Repository: https://github.com/shruthik2307/landsync

## Overview

LANDSYNC synchronizes cadastral, municipal, and satellite-derived land data, reconciles parcels, and presents results for review. The main workflow is user upload, document parsing, reconciliation, and result inspection. The frontend is a React client; the README describes a single FastAPI service serving both the SPA and `/api/*`. Major documented capabilities include interactive parcel and imagery maps, conflict review, provenance, labeling, and exports. Some backend route implementations and UI screens were not sampled, so their internal connections are omitted unless documented or indexed.

Main entry points: [`backend/main.py`](https://github.com/shruthik2307/landsync/blob/main/backend/main.py) (FastAPI application), [`backend/services/landsync_service.py`](https://github.com/shruthik2307/landsync/blob/main/backend/services/landsync_service.py) (Dataset and reconciliation service), [`src/App.jsx`](https://github.com/shruthik2307/landsync/blob/main/src/App.jsx) (Application flow), [`src/components/screens/ResultView.jsx`](https://github.com/shruthik2307/landsync/blob/main/src/components/screens/ResultView.jsx) (Results and review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Frontend"]
  node_app["Application flow<br/>[App.jsx]"]
  node_uploadui["Upload screen<br/>[UploadScreen.jsx]"]
  node_clientapi["API client<br/>[api.js]"]
end

subgraph group_api["API and ingestion"]
  node_fastapi["FastAPI application<br/>[main.py]"]
  node_uploadroute["Upload endpoint<br/>[upload.py]"]
  node_ingestion["Document parsing<br/>[router.py]"]
  node_canonical["Canonical parcel model<br/>[models.py]"]
  node_reviewroutes["Conflict, parcel, and process routes"]
  node_exports["Export routes<br/>[export.py]"]
end

subgraph group_reconcile["Reconciliation"]
  node_service["Dataset and reconciliation service"]
  node_pipeline["Reconciliation pipeline<br/>[pipeline.py]"]
  node_engineparts["Matching and conflict analysis"]
  node_tgrac["TGRAC data integration<br/>[tgrac_service.py]"]
  node_ml["ML scoring service<br/>[ml_service.py]"]
end

subgraph group_review["Review and imagery"]
  node_resultsui["Results and review<br/>[ResultView.jsx]"]
  node_mapui["Parcel and imagery maps<br/>[LandsyncMap.jsx]"]
  node_provenanceui["Provenance display<br/>[Provenance.jsx]"]
  node_imagery["Imagery services and routes<br/>[imagery_service.py]"]
  node_labeling["Labeling and provenance routes<br/>[labeling.py]"]
end

subgraph group_platform["Platform services"]
  node_auth["Authentication routes<br/>[auth.py]"]
  node_database[("Database models and sessions<br/>[database.py]")]
end

node_user(("Land data user"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_uploadui
node_uploadui -.->|"submits data"| node_clientapi
node_clientapi -.->|"sends API requests"| node_fastapi
node_fastapi -->|"registers"| node_uploadroute
node_uploadroute -->|"dispatches parsing"| node_ingestion
node_ingestion -->|"normalizes to"| node_canonical
node_fastapi -->|"registers"| node_reviewroutes
node_service -->|"runs"| node_pipeline
node_pipeline -->|"uses"| node_engineparts
node_service -->|"consults"| node_ml
node_service -->|"loads TGRAC data"| node_tgrac
node_fastapi -.->|"registers imagery routes"| node_imagery
node_app -.->|"renders results"| node_resultsui
node_resultsui -.->|"displays parcel map"| node_mapui
node_resultsui -.->|"displays provenance"| node_provenanceui
node_fastapi -->|"registers"| node_auth
node_auth -->|"queries users"| node_database
node_fastapi -->|"registers"| node_labeling
node_fastapi -->|"registers"| node_exports

click node_app "https://github.com/shruthik2307/landsync/blob/main/src/App.jsx"
click node_uploadui "https://github.com/shruthik2307/landsync/blob/main/src/components/screens/UploadScreen.jsx"
click node_resultsui "https://github.com/shruthik2307/landsync/blob/main/src/components/screens/ResultView.jsx"
click node_mapui "https://github.com/shruthik2307/landsync/blob/main/src/components/gis/LandsyncMap.jsx"
click node_provenanceui "https://github.com/shruthik2307/landsync/blob/main/src/components/result/Provenance.jsx"
click node_clientapi "https://github.com/shruthik2307/landsync/blob/main/src/api.js"
click node_fastapi "https://github.com/shruthik2307/landsync/blob/main/backend/main.py"
click node_uploadroute "https://github.com/shruthik2307/landsync/blob/main/backend/routes/upload.py"
click node_ingestion "https://github.com/shruthik2307/landsync/blob/main/backend/ingestion/router.py"
click node_canonical "https://github.com/shruthik2307/landsync/blob/main/backend/ingestion/models.py"
click node_service "https://github.com/shruthik2307/landsync/blob/main/backend/services/landsync_service.py"
click node_pipeline "https://github.com/shruthik2307/landsync/blob/main/engine/pipeline.py"
click node_engineparts "https://github.com/shruthik2307/landsync/tree/main/engine"
click node_reviewroutes "https://github.com/shruthik2307/landsync/tree/main/backend/routes"
click node_imagery "https://github.com/shruthik2307/landsync/blob/main/backend/services/imagery_service.py"
click node_tgrac "https://github.com/shruthik2307/landsync/blob/main/backend/services/tgrac_service.py"
click node_ml "https://github.com/shruthik2307/landsync/blob/main/backend/services/ml_service.py"
click node_auth "https://github.com/shruthik2307/landsync/blob/main/backend/routes/auth.py"
click node_database "https://github.com/shruthik2307/landsync/blob/main/backend/database.py"
click node_labeling "https://github.com/shruthik2307/landsync/blob/main/backend/routes/labeling.py"
click node_exports "https://github.com/shruthik2307/landsync/blob/main/backend/routes/export.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_uploadui,node_clientapi,node_user toneBlue
class node_fastapi,node_uploadroute,node_ingestion,node_canonical,node_reviewroutes,node_exports toneAmber
class node_service,node_pipeline,node_engineparts,node_tgrac,node_ml toneMint
class node_resultsui,node_mapui,node_provenanceui,node_imagery,node_labeling toneRose
class node_auth,node_database toneIndigo
```

## Components

### Frontend

- [Application flow](https://github.com/shruthik2307/landsync/blob/main/src/App.jsx): `src/App.jsx`
- [Upload screen](https://github.com/shruthik2307/landsync/blob/main/src/components/screens/UploadScreen.jsx): `src/components/screens/UploadScreen.jsx`
- [API client](https://github.com/shruthik2307/landsync/blob/main/src/api.js): `src/api.js`

### API and ingestion

- [FastAPI application](https://github.com/shruthik2307/landsync/blob/main/backend/main.py): `backend/main.py`
- [Upload endpoint](https://github.com/shruthik2307/landsync/blob/main/backend/routes/upload.py): `backend/routes/upload.py`
- [Document parsing](https://github.com/shruthik2307/landsync/blob/main/backend/ingestion/router.py): `backend/ingestion/router.py`
- [Canonical parcel model](https://github.com/shruthik2307/landsync/blob/main/backend/ingestion/models.py): `backend/ingestion/models.py`
- [Conflict, parcel, and process routes](https://github.com/shruthik2307/landsync/tree/main/backend/routes): `backend/routes`
- [Export routes](https://github.com/shruthik2307/landsync/blob/main/backend/routes/export.py): `backend/routes/export.py`

### Reconciliation

- [Dataset and reconciliation service](https://github.com/shruthik2307/landsync/blob/main/backend/services/landsync_service.py): `backend/services/landsync_service.py`
- [Reconciliation pipeline](https://github.com/shruthik2307/landsync/blob/main/engine/pipeline.py): `engine/pipeline.py`
- [Matching and conflict analysis](https://github.com/shruthik2307/landsync/tree/main/engine): `engine`
- [TGRAC data integration](https://github.com/shruthik2307/landsync/blob/main/backend/services/tgrac_service.py): `backend/services/tgrac_service.py`
- [ML scoring service](https://github.com/shruthik2307/landsync/blob/main/backend/services/ml_service.py): `backend/services/ml_service.py`

### Review and imagery

- [Results and review](https://github.com/shruthik2307/landsync/blob/main/src/components/screens/ResultView.jsx): `src/components/screens/ResultView.jsx`
- [Parcel and imagery maps](https://github.com/shruthik2307/landsync/blob/main/src/components/gis/LandsyncMap.jsx): `src/components/gis/LandsyncMap.jsx`
- [Provenance display](https://github.com/shruthik2307/landsync/blob/main/src/components/result/Provenance.jsx): `src/components/result/Provenance.jsx`
- [Imagery services and routes](https://github.com/shruthik2307/landsync/blob/main/backend/services/imagery_service.py): `backend/services/imagery_service.py`
- [Labeling and provenance routes](https://github.com/shruthik2307/landsync/blob/main/backend/routes/labeling.py): `backend/routes/labeling.py`

### Platform services

- [Authentication routes](https://github.com/shruthik2307/landsync/blob/main/backend/routes/auth.py): `backend/routes/auth.py`
- [Database models and sessions](https://github.com/shruthik2307/landsync/blob/main/backend/database.py): `backend/database.py`

### Other components

- **Land data user**

## Connections

- Land data user → Application flow: uses
- Application flow → Upload screen: renders (evidence: `src/App.jsx`)
- Upload screen → API client: submits data
- API client → FastAPI application: sends API requests
- FastAPI application → Upload endpoint: registers (evidence: `backend/main.py`)
- Upload endpoint → Document parsing: dispatches parsing (evidence: `backend/routes/upload.py`)
- Document parsing → Canonical parcel model: normalizes to (evidence: `backend/ingestion/router.py`)
- FastAPI application → Conflict, parcel, and process routes: registers (evidence: `backend/main.py`)
- Dataset and reconciliation service → Reconciliation pipeline: runs (evidence: `backend/services/landsync_service.py`)
- Reconciliation pipeline → Matching and conflict analysis: uses (evidence: `engine/pipeline.py`)
- Dataset and reconciliation service → ML scoring service: consults (evidence: `backend/services/landsync_service.py`)
- Dataset and reconciliation service → TGRAC data integration: loads TGRAC data (evidence: `backend/services/landsync_service.py`)
- FastAPI application → Imagery services and routes: registers imagery routes
- Application flow → Results and review: renders results (evidence: `src/App.jsx`)
- Results and review → Parcel and imagery maps: displays parcel map
- Results and review → Provenance display: displays provenance
- FastAPI application → Authentication routes: registers (evidence: `backend/main.py`)
- Authentication routes → Database models and sessions: queries users (evidence: `backend/routes/auth.py`)
- FastAPI application → Labeling and provenance routes: registers (evidence: `backend/main.py`)
- FastAPI application → Export routes: registers (evidence: `backend/main.py`)
