# ravichhabra1501-prog/land-validation architecture

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

- Interactive diagram: https://gitdiagram.com/ravichhabra1501-prog/land-validation
- Repository: https://github.com/ravichhabra1501-prog/land-validation

## Overview

BhumiRecord AI is a land-record digitization and administration portal. Officers enter scanned records or use QR lookup, then review and validate records, manage changes, and inspect land records and cadastral maps; the app also supports citizen appointments, reporting, and offline operation. The shown App code loads cached or sample records, validates them, and queues offline edits for later cloud synchronization. Several feature links are based on indexed references rather than shown call sites, so those links are marked unverified; the README is empty.

Main entry points: [`src/App.tsx`](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/App.tsx) (Portal shell), [`src/services/landRecordService.ts`](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/services/landRecordService.ts) (Validation engine), [`src/components/VerificationStationView.tsx`](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/VerificationStationView.tsx) (Verification station), [`src/components/CadastralGisView.tsx`](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/CadastralGisView.tsx) (Cadastral GIS)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Portal and access"]
  node_app["Portal shell<br/>[App.tsx]"]
  node_login["Sign-in<br/>[LoginView.tsx]"]
  node_dashboard["Records dashboard<br/>[DashboardView.tsx]"]
  node_appointments["Citizen appointments"]
  node_appointment_data[("Appointment samples")]
end

subgraph group_records["Record processing"]
  node_ingestion["Document ingestion"]
  node_qr["QR scanner"]
  node_record_data[("Record datasets<br/>[sampleRecords.ts]")]
  node_master_data[("DILRMP master data<br/>[dilrmpDatabase.ts]")]
end

subgraph group_verification["Review and reporting"]
  node_validation["Validation engine"]
  node_station["Verification station"]
  node_rules_view["Validation rules"]
  node_history["Modification history"]
  node_change_log["Change log<br/>[changeLogUtils.ts]"]
  node_pdf["Archival PDF service"]
end

subgraph group_cadastral["Cadastral information"]
  node_gis["Cadastral GIS"]
  node_map["Google map view"]
  node_plots[("Cadastral plots")]
  node_villages[("Village specifications")]
end

subgraph group_persistence["Storage and sync"]
  node_offline[("Offline cache<br/>[offlineStorage.ts]")]
  node_firebase["Firebase service<br/>[firebase.ts]"]
end

node_officer(("Officer or citizen"))

node_officer -->|"uses portal"| node_app
node_app -->|"loads and saves"| node_offline
node_app -->|"runs validation"| node_validation
node_app -->|"syncs pending edits"| node_firebase
node_app -.->|"routes to"| node_login
node_app -.->|"routes to"| node_dashboard
node_app -.->|"routes to"| node_ingestion
node_ingestion -.->|"offers scan mode"| node_qr
node_ingestion -.->|"submits records"| node_validation
node_qr -.->|"looks up records"| node_master_data
node_qr -.->|"uses record service"| node_validation
node_validation -->|"cross-checks"| node_master_data
node_app -->|"loads initial records"| node_record_data
node_app -.->|"routes to"| node_station
node_app -.->|"routes to"| node_rules_view
node_station -->|"generates DILRMP XML"| node_validation
node_station -.->|"uses history rules"| node_history
node_station -.->|"uses change log"| node_change_log
node_station -.->|"uses archival reports"| node_pdf
node_rules_view -.->|"uses validation engine"| node_validation
node_app -.->|"routes to"| node_gis
node_gis -.->|"embeds map view"| node_map
node_gis -.->|"uses plot data"| node_plots
node_gis -.->|"uses village data"| node_villages
node_app -.->|"routes to"| node_appointments
node_appointments -.->|"uses appointment samples"| node_appointment_data

click node_app "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/App.tsx"
click node_login "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/LoginView.tsx"
click node_dashboard "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/DashboardView.tsx"
click node_ingestion "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/DocumentIngestionView.tsx"
click node_qr "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/QrCodeScannerModule.tsx"
click node_record_data "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/data/sampleRecords.ts"
click node_validation "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/services/landRecordService.ts"
click node_master_data "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/data/dilrmpDatabase.ts"
click node_station "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/VerificationStationView.tsx"
click node_rules_view "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/ValidationRulesView.tsx"
click node_history "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/utils/modificationHistoryUtils.ts"
click node_change_log "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/utils/changeLogUtils.ts"
click node_pdf "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/services/archivalPdfService.ts"
click node_gis "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/CadastralGisView.tsx"
click node_map "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/CadastralGoogleMapView.tsx"
click node_plots "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/data/cadastralPlotsData.ts"
click node_villages "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/data/revenueVillageSpecifications.ts"
click node_appointments "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/CitizenFeedbackScheduleView.tsx"
click node_appointment_data "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/data/sampleAppointments.ts"
click node_offline "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/services/offlineStorage.ts"
click node_firebase "https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/services/firebase.ts"

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_login,node_dashboard,node_appointments,node_appointment_data toneBlue
class node_ingestion,node_qr,node_record_data,node_master_data toneAmber
class node_validation,node_station,node_rules_view,node_history,node_change_log,node_pdf toneMint
class node_gis,node_map,node_plots,node_villages toneRose
class node_offline,node_firebase,node_officer toneIndigo
```

## Components

### Portal and access

- [Portal shell](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/App.tsx): `src/App.tsx`
- [Sign-in](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/LoginView.tsx): `src/components/LoginView.tsx`
- [Records dashboard](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/DashboardView.tsx): `src/components/DashboardView.tsx`
- [Citizen appointments](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/CitizenFeedbackScheduleView.tsx): `src/components/CitizenFeedbackScheduleView.tsx`
- [Appointment samples](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/data/sampleAppointments.ts): `src/data/sampleAppointments.ts`

### Record processing

- [Document ingestion](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/DocumentIngestionView.tsx): `src/components/DocumentIngestionView.tsx`
- [QR scanner](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/QrCodeScannerModule.tsx): `src/components/QrCodeScannerModule.tsx`
- [Record datasets](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/data/sampleRecords.ts): `src/data/sampleRecords.ts`
- [DILRMP master data](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/data/dilrmpDatabase.ts): `src/data/dilrmpDatabase.ts`

### Review and reporting

- [Validation engine](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/services/landRecordService.ts): `src/services/landRecordService.ts`
- [Verification station](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/VerificationStationView.tsx): `src/components/VerificationStationView.tsx`
- [Validation rules](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/ValidationRulesView.tsx): `src/components/ValidationRulesView.tsx`
- [Modification history](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/utils/modificationHistoryUtils.ts): `src/utils/modificationHistoryUtils.ts`
- [Change log](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/utils/changeLogUtils.ts): `src/utils/changeLogUtils.ts`
- [Archival PDF service](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/services/archivalPdfService.ts): `src/services/archivalPdfService.ts`

### Cadastral information

- [Cadastral GIS](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/CadastralGisView.tsx): `src/components/CadastralGisView.tsx`
- [Google map view](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/components/CadastralGoogleMapView.tsx): `src/components/CadastralGoogleMapView.tsx`
- [Cadastral plots](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/data/cadastralPlotsData.ts): `src/data/cadastralPlotsData.ts`
- [Village specifications](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/data/revenueVillageSpecifications.ts): `src/data/revenueVillageSpecifications.ts`

### Storage and sync

- [Offline cache](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/services/offlineStorage.ts): `src/services/offlineStorage.ts`
- [Firebase service](https://github.com/ravichhabra1501-prog/land-validation/blob/main/src/services/firebase.ts): `src/services/firebase.ts`

### Other components

- **Officer or citizen**

## Connections

- Officer or citizen → Portal shell: uses portal (evidence: `src/App.tsx`)
- Portal shell → Offline cache: loads and saves (evidence: `src/App.tsx`)
- Portal shell → Validation engine: runs validation (evidence: `src/App.tsx`)
- Portal shell → Firebase service: syncs pending edits (evidence: `src/App.tsx`)
- Portal shell → Sign-in: routes to (evidence: `src/App.tsx`)
- Portal shell → Records dashboard: routes to (evidence: `src/App.tsx`)
- Portal shell → Document ingestion: routes to (evidence: `src/App.tsx`)
- Document ingestion → QR scanner: offers scan mode (evidence: `src/components/DocumentIngestionView.tsx`)
- Document ingestion → Validation engine: submits records (evidence: `src/components/DocumentIngestionView.tsx`)
- QR scanner → DILRMP master data: looks up records (evidence: `src/components/QrCodeScannerModule.tsx`)
- QR scanner → Validation engine: uses record service (evidence: `src/components/QrCodeScannerModule.tsx`)
- Validation engine → DILRMP master data: cross-checks (evidence: `src/services/landRecordService.ts`)
- Portal shell → Record datasets: loads initial records (evidence: `src/App.tsx`)
- Portal shell → Verification station: routes to (evidence: `src/App.tsx`)
- Portal shell → Validation rules: routes to (evidence: `src/App.tsx`)
- Verification station → Validation engine: generates DILRMP XML (evidence: `src/components/VerificationStationView.tsx`)
- Verification station → Modification history: uses history rules (evidence: `src/components/VerificationStationView.tsx`)
- Verification station → Change log: uses change log (evidence: `src/components/VerificationStationView.tsx`)
- Verification station → Archival PDF service: uses archival reports (evidence: `src/components/VerificationStationView.tsx`)
- Validation rules → Validation engine: uses validation engine (evidence: `src/components/ValidationRulesView.tsx`)
- Portal shell → Cadastral GIS: routes to (evidence: `src/App.tsx`)
- Cadastral GIS → Google map view: embeds map view (evidence: `src/components/CadastralGisView.tsx`)
- Cadastral GIS → Cadastral plots: uses plot data (evidence: `src/components/CadastralGisView.tsx`)
- Cadastral GIS → Village specifications: uses village data (evidence: `src/components/CadastralGisView.tsx`)
- Portal shell → Citizen appointments: routes to (evidence: `src/App.tsx`)
- Citizen appointments → Appointment samples: uses appointment samples (evidence: `src/components/CitizenFeedbackScheduleView.tsx`)
