# siddharth-777/parcel-map-frontend architecture

> Architecture diagram of the GitHub repository siddharth-777/parcel-map-frontend, 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/siddharth-777/parcel-map-frontend
- Repository: https://github.com/siddharth-777/parcel-map-frontend

## Overview

GEO-DRAFT is a cadastral mapping platform combining a staged mapping/review interface with a FastAPI feature and dataset API backed by PostGIS. The documented workflow covers imagery upload, georeferencing, extraction, topology validation, review/approval, and export. The sampled inference endpoint explicitly returns mock polygons; it does not demonstrate model execution or persistence. Frontend-to-API request wiring and most router internals were not sampled, so those links are not asserted.

Main entry points: [`BACKEND/app/main.py`](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/main.py) (FastAPI application), [`FRONTEND/src/App.jsx`](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/App.jsx) (Application shell), [`BACKEND/app/crud.py`](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/crud.py) (CRUD operations), [`FRONTEND/src/pages/ReviewPage.jsx`](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/ReviewPage.jsx) (Results review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Mapping interface"]
  node_app["Application shell<br/>[App.jsx]"]
  node_landing["Landing page<br/>[LandingPage.jsx]"]
  node_dashboard["Survey dashboard<br/>[DashboardPage.jsx]"]
  node_workspace["Map workspace<br/>[WorkspacePage.jsx]"]
  node_review["Results review<br/>[ReviewPage.jsx]"]
  node_approval["Approval page<br/>[ApprovalPage.jsx]"]
  node_tiles["Base map tiles<br/>[BaseTileLayer.jsx]"]
end

subgraph group_api["Feature API"]
  node_export["Feature export<br/>[export.py]"]
  node_apiapp["FastAPI application<br/>[main.py]"]
  node_feature_routes["Feature endpoints<br/>[parcels.py]"]
  node_building_routes["Building endpoints<br/>[buildings.py]"]
  node_road_routes["Road endpoints<br/>[roads.py]"]
  node_landuse_routes["Land-use endpoints<br/>[landuse.py]"]
  node_dataset_routes["Dataset endpoints<br/>[datasets.py]"]
  node_health_routes["Health endpoint<br/>[health.py]"]
  node_inference_routes["Inference endpoint<br/>[inference.py]"]
end

subgraph group_store["Persistence and contracts"]
  node_crud["CRUD operations<br/>[crud.py]"]
  node_schemas["Feature contracts<br/>[polygon.py]"]
  node_feature_model["Feature model<br/>[feature.py]"]
  node_dataset_model["Dataset model<br/>[dataset.py]"]
  node_db[("PostGIS database<br/>[database.py]")]
end

subgraph group_workflow["Survey workflow"]
  node_workflow["Upload and georeference<br/>[DashboardPage.jsx]"]
  node_extraction["Feature extraction<br/>[inference.py]"]
  node_validation["Topology validation<br/>[ReviewPage.jsx]"]
end

node_surveyor(("Surveyor"))
node_imagery(("Tile providers"))

node_surveyor -->|"uses"| node_app
node_app -->|"renders"| node_landing
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_workspace
node_app -->|"renders"| node_review
node_app -->|"renders"| node_approval
node_workspace -->|"renders"| node_tiles
node_review -->|"renders"| node_tiles
node_tiles -.->|"requests tiles"| node_imagery
node_dashboard -->|"presents"| node_workflow
node_review -->|"presents results"| node_validation
node_app -.->|"API wiring unspecified"| node_apiapp
node_apiapp -->|"registers"| node_feature_routes
node_apiapp -->|"registers"| node_building_routes
node_apiapp -->|"registers"| node_road_routes
node_apiapp -->|"registers"| node_landuse_routes
node_apiapp -->|"registers"| node_dataset_routes
node_apiapp -->|"registers"| node_health_routes
node_apiapp -->|"registers"| node_inference_routes
node_apiapp -->|"registers"| node_export
node_inference_routes -->|"returns features"| node_schemas
node_feature_routes -.->|"CRUD wiring undocumented"| node_crud
node_building_routes -.->|"CRUD wiring undocumented"| node_crud
node_road_routes -.->|"CRUD wiring undocumented"| node_crud
node_landuse_routes -.->|"CRUD wiring undocumented"| node_crud
node_dataset_routes -.->|"CRUD wiring undocumented"| node_crud
node_crud -.->|"database access"| node_db
node_feature_model -->|"uses base"| node_db
node_dataset_model -->|"uses base"| node_db

click node_app "https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/App.jsx"
click node_landing "https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/LandingPage.jsx"
click node_dashboard "https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/DashboardPage.jsx"
click node_workspace "https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/WorkspacePage.jsx"
click node_review "https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/ReviewPage.jsx"
click node_approval "https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/ApprovalPage.jsx"
click node_tiles "https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/components/BaseTileLayer.jsx"
click node_workflow "https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/DashboardPage.jsx"
click node_extraction "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/inference.py"
click node_validation "https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/ReviewPage.jsx"
click node_export "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/export.py"
click node_apiapp "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/main.py"
click node_feature_routes "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/parcels.py"
click node_building_routes "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/buildings.py"
click node_road_routes "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/roads.py"
click node_landuse_routes "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/landuse.py"
click node_dataset_routes "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/datasets.py"
click node_health_routes "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/health.py"
click node_inference_routes "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/inference.py"
click node_crud "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/crud.py"
click node_schemas "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/schemas/polygon.py"
click node_feature_model "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/models/feature.py"
click node_dataset_model "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/models/dataset.py"
click node_db "https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/core/database.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_dashboard,node_workspace,node_review,node_approval,node_tiles toneBlue
class node_export,node_apiapp,node_feature_routes,node_building_routes,node_road_routes,node_landuse_routes,node_dataset_routes,node_health_routes,node_inference_routes toneAmber
class node_crud,node_schemas,node_feature_model,node_dataset_model,node_db toneMint
class node_workflow,node_extraction,node_validation toneRose
class node_surveyor,node_imagery toneIndigo
```

## Components

### Mapping interface

- [Application shell](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/App.jsx): `FRONTEND/src/App.jsx`
- [Landing page](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/LandingPage.jsx): `FRONTEND/src/pages/LandingPage.jsx`
- [Survey dashboard](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/DashboardPage.jsx): `FRONTEND/src/pages/DashboardPage.jsx`
- [Map workspace](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/WorkspacePage.jsx): `FRONTEND/src/pages/WorkspacePage.jsx`
- [Results review](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/ReviewPage.jsx): `FRONTEND/src/pages/ReviewPage.jsx`
- [Approval page](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/ApprovalPage.jsx): `FRONTEND/src/pages/ApprovalPage.jsx`
- [Base map tiles](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/components/BaseTileLayer.jsx): `FRONTEND/src/components/BaseTileLayer.jsx`

### Feature API

- [Feature export](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/export.py): `BACKEND/app/routers/export.py`
- [FastAPI application](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/main.py): `BACKEND/app/main.py`
- [Feature endpoints](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/parcels.py): `BACKEND/app/routers/parcels.py`
- [Building endpoints](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/buildings.py): `BACKEND/app/routers/buildings.py`
- [Road endpoints](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/roads.py): `BACKEND/app/routers/roads.py`
- [Land-use endpoints](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/landuse.py): `BACKEND/app/routers/landuse.py`
- [Dataset endpoints](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/datasets.py): `BACKEND/app/routers/datasets.py`
- [Health endpoint](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/health.py): `BACKEND/app/routers/health.py`
- [Inference endpoint](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/inference.py): `BACKEND/app/routers/inference.py`

### Persistence and contracts

- [CRUD operations](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/crud.py): `BACKEND/app/crud.py`
- [Feature contracts](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/schemas/polygon.py): `BACKEND/app/schemas/polygon.py`
- [Feature model](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/models/feature.py): `BACKEND/app/models/feature.py`
- [Dataset model](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/models/dataset.py): `BACKEND/app/models/dataset.py`
- [PostGIS database](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/core/database.py): `BACKEND/app/core/database.py`

### Survey workflow

- [Upload and georeference](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/DashboardPage.jsx): `FRONTEND/src/pages/DashboardPage.jsx`
- [Feature extraction](https://github.com/siddharth-777/parcel-map-frontend/blob/master/BACKEND/app/routers/inference.py): `BACKEND/app/routers/inference.py`
- [Topology validation](https://github.com/siddharth-777/parcel-map-frontend/blob/master/FRONTEND/src/pages/ReviewPage.jsx): `FRONTEND/src/pages/ReviewPage.jsx`

### Other components

- **Surveyor**
- **Tile providers**

## Connections

- Surveyor → Application shell: uses
- Application shell → Landing page: renders
- Application shell → Survey dashboard: renders
- Application shell → Map workspace: renders
- Application shell → Results review: renders
- Application shell → Approval page: renders
- Map workspace → Base map tiles: renders
- Results review → Base map tiles: renders
- Base map tiles → Tile providers: requests tiles
- Survey dashboard → Upload and georeference: presents
- Results review → Topology validation: presents results
- Application shell → FastAPI application: API wiring unspecified
- FastAPI application → Feature endpoints: registers
- FastAPI application → Building endpoints: registers
- FastAPI application → Road endpoints: registers
- FastAPI application → Land-use endpoints: registers
- FastAPI application → Dataset endpoints: registers
- FastAPI application → Health endpoint: registers
- FastAPI application → Inference endpoint: registers
- FastAPI application → Feature export: registers
- Inference endpoint → Feature contracts: returns features
- Feature endpoints → CRUD operations: CRUD wiring undocumented
- Building endpoints → CRUD operations: CRUD wiring undocumented
- Road endpoints → CRUD operations: CRUD wiring undocumented
- Land-use endpoints → CRUD operations: CRUD wiring undocumented
- Dataset endpoints → CRUD operations: CRUD wiring undocumented
- CRUD operations → PostGIS database: database access
- Feature model → PostGIS database: uses base
- Dataset model → PostGIS database: uses base
