# lenekerc98/geoportal-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/lenekerc98/geoportal-frontend
- Repository: https://github.com/lenekerc98/geoportal-frontend

## Overview

This is a React cadastral/GIS application: users authenticate, work with cadastral parcels and map layers in the geoportal, and produce parcel reports and map products; administrators manage users, organizations, projects, and system settings. The graph emphasizes these product stages and the shared API/context layer. Some feature modules are represented from the source index and tree rather than inspected source, so their internal behavior and unshown connections are not inferred.

Main entry points: [`src/App.jsx`](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/App.jsx) (Routes and app), [`src/pages/Geoportal/Geoportal.jsx`](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Geoportal/Geoportal.jsx) (Geoportal), [`src/services/api.js`](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/services/api.js) (API transport), [`src/pages/Reportes/ReportePlanimetrico.jsx`](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Reportes/ReportePlanimetrico.jsx) (Plan parcel report)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_app["Routes and app<br/>[App.jsx]"]
  node_login["Sign in<br/>[Login.jsx]"]
end

subgraph group_mapping["GIS and parcels"]
  node_geoportal["Geoportal<br/>[Geoportal.jsx]"]
  node_parcel_form["Parcel editing<br/>[PredioForm.jsx]"]
  node_attributes["Attribute table<br/>[AttributeTable.jsx]"]
  node_shapefile["Shapefile import"]
  node_cad_import["CAD import"]
  node_atlas["Shapefile atlas"]
end

subgraph group_outputs["Reports and maps"]
  node_report_dashboard["Reporting dashboard"]
  node_plan_report["Plan parcel report"]
  node_plan_sheet["Plan report sheet"]
  node_batch_print["Batch printing"]
  node_topo["Topographic maps"]
  node_analytics["Analytics dashboard"]
end

subgraph group_admin["Administration"]
  node_users["User administration<br/>[Users.jsx]"]
  node_companies["Organization management"]
  node_projects["Project management"]
  node_system["System configuration<br/>[SystemParams.jsx]"]
  node_db_env["Database environments"]
end

subgraph group_shared["Shared services"]
  node_context["Session context<br/>[AppContext.jsx]"]
  node_geometry["Geometry utilities<br/>[geometryUtils.js]"]
  node_cadastral["Cadastral utilities<br/>[cadastralUtils.js]"]
  node_offline[("Offline parcel data<br/>[offlineDB.js]")]
  node_api["API transport<br/>[api.js]"]
end

node_user(("User"))
node_backend{{"Application API"}}

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_geoportal
node_app -->|"routes to"| node_report_dashboard
node_app -->|"routes to"| node_plan_report
node_app -->|"routes to"| node_topo
node_app -->|"routes to"| node_analytics
node_app -->|"routes to"| node_users
node_app -->|"routes to"| node_companies
node_app -->|"routes to"| node_projects
node_app -->|"routes to"| node_system
node_login -->|"uses"| node_api
node_login -->|"authenticates with"| node_backend
node_app -->|"provides"| node_context
node_geoportal -->|"uses"| node_parcel_form
node_geoportal -->|"uses"| node_attributes
node_geoportal -->|"uses"| node_shapefile
node_geoportal -->|"uses"| node_cad_import
node_geoportal -->|"uses"| node_atlas
node_geoportal -->|"reads count"| node_offline
node_shapefile -->|"normalizes with"| node_cadastral
node_geoportal -->|"requests data"| node_api
node_shapefile -->|"uploads through"| node_api
node_plan_report -->|"reads parcel"| node_offline
node_plan_report -->|"parses geometry"| node_geometry
node_plan_report -->|"renders sheet"| node_plan_sheet
node_plan_report -->|"opens printing"| node_batch_print
node_plan_report -->|"requests data"| node_api
node_report_dashboard -->|"requests data"| node_api
node_companies -->|"requests data"| node_api
node_projects -->|"requests data"| node_api
node_users -->|"requests data"| node_api
node_system -->|"configures"| node_db_env
node_api -->|"sends API requests"| node_backend

click node_app "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/App.jsx"
click node_login "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Login/Login.jsx"
click node_context "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/context/AppContext.jsx"
click node_geoportal "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Geoportal/Geoportal.jsx"
click node_parcel_form "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/MapViewer/PredioForm.jsx"
click node_attributes "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/AttributeTable.jsx"
click node_shapefile "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/MapViewer/ShapefileUploader.jsx"
click node_cad_import "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/MapViewer/CadUploaderModal.jsx"
click node_atlas "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/MapViewer/ShapefileAtlasModal.jsx"
click node_geometry "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/utils/geometryUtils.js"
click node_cadastral "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/utils/cadastralUtils.js"
click node_offline "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/services/offlineDB.js"
click node_api "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/services/api.js"
click node_report_dashboard "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Reportes/ReporteriaDashboard.jsx"
click node_plan_report "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Reportes/ReportePlanimetrico.jsx"
click node_plan_sheet "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Reportes/PlanimetricoSheet.jsx"
click node_batch_print "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Reportes/BatchPrintModal.jsx"
click node_topo "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Cartas/CartasTopograficas.jsx"
click node_analytics "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Dashboard/AnalyticsDashboard.jsx"
click node_users "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Users/Users.jsx"
click node_companies "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/System/EmpresasManager.jsx"
click node_projects "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/System/ProjectsManager.jsx"
click node_system "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/System/SystemParams.jsx"
click node_db_env "https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/System/DatabaseEnvManager.jsx"

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_user toneBlue
class node_geoportal,node_parcel_form,node_attributes,node_shapefile,node_cad_import,node_atlas toneAmber
class node_report_dashboard,node_plan_report,node_plan_sheet,node_batch_print,node_topo,node_analytics,node_backend toneMint
class node_users,node_companies,node_projects,node_system,node_db_env toneRose
class node_context,node_geometry,node_cadastral,node_offline,node_api toneIndigo
```

## Components

### App entry

- [Routes and app](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/App.jsx): `src/App.jsx`
- [Sign in](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Login/Login.jsx): `src/pages/Login/Login.jsx`

### GIS and parcels

- [Geoportal](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Geoportal/Geoportal.jsx): `src/pages/Geoportal/Geoportal.jsx`
- [Parcel editing](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/MapViewer/PredioForm.jsx): `src/components/MapViewer/PredioForm.jsx`
- [Attribute table](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/AttributeTable.jsx): `src/components/AttributeTable.jsx`
- [Shapefile import](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/MapViewer/ShapefileUploader.jsx): `src/components/MapViewer/ShapefileUploader.jsx`
- [CAD import](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/MapViewer/CadUploaderModal.jsx): `src/components/MapViewer/CadUploaderModal.jsx`
- [Shapefile atlas](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/MapViewer/ShapefileAtlasModal.jsx): `src/components/MapViewer/ShapefileAtlasModal.jsx`

### Reports and maps

- [Reporting dashboard](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Reportes/ReporteriaDashboard.jsx): `src/pages/Reportes/ReporteriaDashboard.jsx`
- [Plan parcel report](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Reportes/ReportePlanimetrico.jsx): `src/pages/Reportes/ReportePlanimetrico.jsx`
- [Plan report sheet](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Reportes/PlanimetricoSheet.jsx): `src/pages/Reportes/PlanimetricoSheet.jsx`
- [Batch printing](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Reportes/BatchPrintModal.jsx): `src/pages/Reportes/BatchPrintModal.jsx`
- [Topographic maps](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Cartas/CartasTopograficas.jsx): `src/pages/Cartas/CartasTopograficas.jsx`
- [Analytics dashboard](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Dashboard/AnalyticsDashboard.jsx): `src/pages/Dashboard/AnalyticsDashboard.jsx`

### Administration

- [User administration](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/Users/Users.jsx): `src/pages/Users/Users.jsx`
- [Organization management](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/System/EmpresasManager.jsx): `src/pages/System/EmpresasManager.jsx`
- [Project management](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/System/ProjectsManager.jsx): `src/pages/System/ProjectsManager.jsx`
- [System configuration](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/pages/System/SystemParams.jsx): `src/pages/System/SystemParams.jsx`
- [Database environments](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/components/System/DatabaseEnvManager.jsx): `src/components/System/DatabaseEnvManager.jsx`

### Shared services

- [Session context](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/context/AppContext.jsx): `src/context/AppContext.jsx`
- [Geometry utilities](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/utils/geometryUtils.js): `src/utils/geometryUtils.js`
- [Cadastral utilities](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/utils/cadastralUtils.js): `src/utils/cadastralUtils.js`
- [Offline parcel data](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/services/offlineDB.js): `src/services/offlineDB.js`
- [API transport](https://github.com/lenekerc98/geoportal-frontend/blob/main/src/services/api.js): `src/services/api.js`

### Other components

- **User**
- **Application API**

## Connections

- User → Routes and app: opens (evidence: `src/App.jsx`)
- Routes and app → Sign in: routes to (evidence: `src/App.jsx`)
- Routes and app → Geoportal: routes to (evidence: `src/App.jsx`)
- Routes and app → Reporting dashboard: routes to (evidence: `src/App.jsx`)
- Routes and app → Plan parcel report: routes to (evidence: `src/App.jsx`)
- Routes and app → Topographic maps: routes to (evidence: `src/App.jsx`)
- Routes and app → Analytics dashboard: routes to (evidence: `src/App.jsx`)
- Routes and app → User administration: routes to (evidence: `src/App.jsx`)
- Routes and app → Organization management: routes to (evidence: `src/App.jsx`)
- Routes and app → Project management: routes to (evidence: `src/App.jsx`)
- Routes and app → System configuration: routes to (evidence: `src/App.jsx`)
- Sign in → API transport: uses (evidence: `src/pages/Login/Login.jsx`)
- Sign in → Application API: authenticates with
- Routes and app → Session context: provides (evidence: `src/App.jsx`)
- Geoportal → Parcel editing: uses (evidence: `src/pages/Geoportal/Geoportal.jsx`)
- Geoportal → Attribute table: uses (evidence: `src/pages/Geoportal/Geoportal.jsx`)
- Geoportal → Shapefile import: uses (evidence: `src/pages/Geoportal/Geoportal.jsx`)
- Geoportal → CAD import: uses (evidence: `src/pages/Geoportal/Geoportal.jsx`)
- Geoportal → Shapefile atlas: uses (evidence: `src/pages/Geoportal/Geoportal.jsx`)
- Geoportal → Offline parcel data: reads count (evidence: `src/pages/Geoportal/Geoportal.jsx`)
- Shapefile import → Cadastral utilities: normalizes with (evidence: `src/components/MapViewer/ShapefileUploader.jsx`)
- Geoportal → API transport: requests data (evidence: `src/pages/Geoportal/Geoportal.jsx`)
- Shapefile import → API transport: uploads through (evidence: `src/components/MapViewer/ShapefileUploader.jsx`)
- Plan parcel report → Offline parcel data: reads parcel (evidence: `src/pages/Reportes/ReportePlanimetrico.jsx`)
- Plan parcel report → Geometry utilities: parses geometry (evidence: `src/pages/Reportes/ReportePlanimetrico.jsx`)
- Plan parcel report → Plan report sheet: renders sheet (evidence: `src/pages/Reportes/ReportePlanimetrico.jsx`)
- Plan parcel report → Batch printing: opens printing (evidence: `src/pages/Reportes/ReportePlanimetrico.jsx`)
- Plan parcel report → API transport: requests data (evidence: `src/pages/Reportes/ReportePlanimetrico.jsx`)
- Reporting dashboard → API transport: requests data (evidence: `src/pages/Reportes/ReporteriaDashboard.jsx`)
- Organization management → API transport: requests data (evidence: `src/pages/System/EmpresasManager.jsx`)
- Project management → API transport: requests data (evidence: `src/pages/System/ProjectsManager.jsx`)
- User administration → API transport: requests data (evidence: `src/pages/Users/Users.jsx`)
- System configuration → Database environments: configures (evidence: `src/pages/System/SystemParams.jsx`)
- API transport → Application API: sends API requests (evidence: `src/services/api.js`)
