# yousef-gaber11/gis-plan-approval-system-outside-system architecture

> Architecture diagram of the GitHub repository yousef-gaber11/gis-plan-approval-system-outside-system, 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/yousef-gaber11/gis-plan-approval-system-outside-system
- Repository: https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system

## Overview

This repository is a browser-based GIS planning and shapefile validation application with an ASP.NET API for parsing uploaded ZIP shapefiles. Users load a municipality or survey-decision context, upload a plan, review validation/statistics and map layers, then inspect parcel details. The sampled code shows the main orchestration and several dependencies; some validation internals and the browser-to-API request wiring are only partially shown, so those relationships are not asserted as confirmed calls.

Main entry points: [`js/main.js`](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/main.js) (App orchestration), [`js/templates.js`](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/templates.js) (Layer rendering), [`js/business.js`](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/business.js) (Context lookup), [`js/esriLibrary.js`](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/esriLibrary.js) (Esri module loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["GIS workflow"]
  node_app["App orchestration<br/>[main.js]"]
  node_context["Context lookup<br/>[business.js]"]
  node_validation["Plan validation<br/>[business.js]"]
  node_parcel["Parcel inspection<br/>[business.js]"]
  node_report["Statistics report<br/>[templates.js]"]
end

subgraph group_presentation["Map presentation"]
  node_map["Map view<br/>[main.js]"]
  node_map_render["Layer rendering<br/>[templates.js]"]
  node_layer_config["Layer styles<br/>[layersConfig.js]"]
  node_esri["Esri module loader<br/>[esriLibrary.js]"]
end

subgraph group_data["GIS data and services"]
  node_zone_data["Zone polygons<br/>[zonesData.js]"]
  node_gis_services["Municipal GIS services"]
end

subgraph group_backend["Shapefile API"]
  node_upload["Shapefile upload<br/>[templates.js]"]
  node_api["Shapefile parser"]
  node_api_host["API host<br/>[Program.cs]"]
end

node_user(("Planner"))
node_zip_files["Plan ZIP files"]

node_user -->|"uses"| node_app
node_app -->|"initializes"| node_map
node_app -->|"fetches context"| node_context
node_context -->|"queries GIS"| node_gis_services
node_context -->|"uses polygons"| node_zone_data
node_user -->|"uploads plan"| node_upload
node_upload -.->|"submits ZIP"| node_api
node_zip_files -->|"supplies file"| node_upload
node_api_host -->|"maps controllers"| node_api
node_app -->|"processes layers"| node_validation
node_validation -->|"queries context"| node_gis_services
node_validation -->|"calculates statistics"| node_report
node_app -->|"renders report"| node_report
node_app -->|"draws layers"| node_map_render
node_map_render -->|"uses styles"| node_layer_config
node_map_render -->|"gets modules"| node_esri
node_app -->|"loads modules"| node_esri
node_app -->|"requests parcel"| node_parcel
node_parcel -->|"uses geometry tools"| node_map_render
node_app -->|"highlights parcel"| node_map_render
node_context -->|"creates zone layer"| node_map_render

click node_app "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/main.js"
click node_context "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/business.js"
click node_validation "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/business.js"
click node_parcel "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/business.js"
click node_report "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/templates.js"
click node_map "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/main.js"
click node_map_render "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/templates.js"
click node_layer_config "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/layersConfig.js"
click node_esri "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/esriLibrary.js"
click node_zone_data "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/zonesData.js"
click node_upload "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/templates.js"
click node_api "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/GisApi/Controllers/ShapefileController.cs"
click node_api_host "https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/GisApi/Program.cs"

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_context,node_validation,node_parcel,node_report toneBlue
class node_map,node_map_render,node_layer_config,node_esri toneAmber
class node_zone_data,node_gis_services toneMint
class node_upload,node_api,node_api_host toneRose
class node_user,node_zip_files toneIndigo
```

## Components

### GIS workflow

- [App orchestration](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/main.js): `js/main.js`
- [Context lookup](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/business.js): `js/business.js`
- [Plan validation](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/business.js): `js/business.js`
- [Parcel inspection](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/business.js): `js/business.js`
- [Statistics report](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/templates.js): `js/templates.js`

### Map presentation

- [Map view](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/main.js): `js/main.js`
- [Layer rendering](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/templates.js): `js/templates.js`
- [Layer styles](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/layersConfig.js): `js/layersConfig.js`
- [Esri module loader](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/esriLibrary.js): `js/esriLibrary.js`

### GIS data and services

- [Zone polygons](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/zonesData.js): `js/zonesData.js`
- **Municipal GIS services**

### Shapefile API

- [Shapefile upload](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/js/templates.js): `js/templates.js`
- [Shapefile parser](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/GisApi/Controllers/ShapefileController.cs): `GisApi/Controllers/ShapefileController.cs`
- [API host](https://github.com/yousef-gaber11/gis-plan-approval-system-outside-system/blob/main/GisApi/Program.cs): `GisApi/Program.cs`

### Other components

- **Planner**
- **Plan ZIP files**

## Connections

- Planner → App orchestration: uses (evidence: `js/main.js`)
- App orchestration → Map view: initializes (evidence: `js/main.js`)
- App orchestration → Context lookup: fetches context (evidence: `js/main.js`)
- Context lookup → Municipal GIS services: queries GIS (evidence: `js/business.js`)
- Context lookup → Zone polygons: uses polygons (evidence: `js/business.js`)
- Planner → Shapefile upload: uploads plan
- Shapefile upload → Shapefile parser: submits ZIP
- Plan ZIP files → Shapefile upload: supplies file
- API host → Shapefile parser: maps controllers (evidence: `GisApi/Program.cs`)
- App orchestration → Plan validation: processes layers (evidence: `js/main.js`)
- Plan validation → Municipal GIS services: queries context (evidence: `js/business.js`)
- Plan validation → Statistics report: calculates statistics (evidence: `js/business.js`)
- App orchestration → Statistics report: renders report (evidence: `js/main.js`)
- App orchestration → Layer rendering: draws layers (evidence: `js/main.js`)
- Layer rendering → Layer styles: uses styles (evidence: `js/templates.js`)
- Layer rendering → Esri module loader: gets modules (evidence: `js/templates.js`)
- App orchestration → Esri module loader: loads modules (evidence: `js/main.js`)
- App orchestration → Parcel inspection: requests parcel (evidence: `js/main.js`)
- Parcel inspection → Layer rendering: uses geometry tools (evidence: `js/business.js`)
- App orchestration → Layer rendering: highlights parcel (evidence: `js/main.js`)
- Context lookup → Layer rendering: creates zone layer (evidence: `js/business.js`)
