# atharv074/civic-pulse-gis architecture

> Architecture diagram of the GitHub repository atharv074/civic-pulse-gis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atharv074/civic-pulse-gis
- Repository: https://github.com/atharv074/civic-pulse-gis

## Overview

Civic Pulse GIS is a civic-issue reporting and administration app. Residents choose a map location, submit an issue with optional image, and can explore reported issues; administrators log in and update issue status. The client’s API calls and server routes are shown separately because the excerpts do not establish how their base URLs align. The server excerpt documents MongoDB persistence and local image uploads; the UI also uses OpenStreetMap tiles. The map and main interface share one client file, so those responsibilities point to the same path.

Main entry points: [`client/src/App.jsx`](https://github.com/atharv074/civic-pulse-gis/blob/main/client/src/App.jsx) (Reporting interface), [`server/index.js`](https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js) (Issue endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Civic reporting client"]
  node_app["Reporting interface<br/>[App.jsx]"]
  node_location["Location selection<br/>[App.jsx]"]
end

subgraph group_api["Issue API"]
  node_issue_api["Issue endpoints<br/>[index.js]"]
  node_admin_api["Admin login<br/>[index.js]"]
  node_status_api["Status update<br/>[index.js]"]
  node_auth["Token verification<br/>[index.js]"]
end

subgraph group_persistence["Persistence and media"]
  node_issue_records[("Issue records<br/>[index.js]")]
  node_admin_records[("Admin records<br/>[index.js]")]
  node_image_uploads["Image uploads<br/>[index.js]"]
end

subgraph group_external["External services"]
  node_mongo[("MongoDB")]
  node_map_tiles["OpenStreetMap tiles"]
end

node_resident(("Resident"))
node_admin(("Administrator"))

node_resident -->|"uses"| node_app
node_admin -->|"uses"| node_app
node_app -->|"selects location"| node_location
node_app -.->|"requests issues"| node_issue_api
node_app -->|"posts login"| node_admin_api
node_app -->|"patches status"| node_status_api
node_app -->|"loads tiles"| node_map_tiles
node_issue_api -->|"finds and saves"| node_issue_records
node_issue_api -->|"stores image"| node_image_uploads
node_admin_api -->|"finds admin"| node_admin_records
node_status_api -->|"verifies token"| node_auth
node_status_api -->|"updates status"| node_issue_records
node_issue_records -->|"persists in"| node_mongo
node_admin_records -->|"persists in"| node_mongo

click node_app "https://github.com/atharv074/civic-pulse-gis/blob/main/client/src/App.jsx"
click node_location "https://github.com/atharv074/civic-pulse-gis/blob/main/client/src/App.jsx"
click node_issue_api "https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js"
click node_admin_api "https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js"
click node_status_api "https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js"
click node_auth "https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js"
click node_issue_records "https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js"
click node_admin_records "https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js"
click node_image_uploads "https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js"

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_location toneBlue
class node_issue_api,node_admin_api,node_status_api,node_auth toneAmber
class node_issue_records,node_admin_records,node_image_uploads toneMint
class node_mongo,node_map_tiles toneRose
class node_resident,node_admin toneIndigo
```

## Components

### Civic reporting client

- [Reporting interface](https://github.com/atharv074/civic-pulse-gis/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Location selection](https://github.com/atharv074/civic-pulse-gis/blob/main/client/src/App.jsx): `client/src/App.jsx`

### Issue API

- [Issue endpoints](https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js): `server/index.js`
- [Admin login](https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js): `server/index.js`
- [Status update](https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js): `server/index.js`
- [Token verification](https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js): `server/index.js`

### Persistence and media

- [Issue records](https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js): `server/index.js`
- [Admin records](https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js): `server/index.js`
- [Image uploads](https://github.com/atharv074/civic-pulse-gis/blob/main/server/index.js): `server/index.js`

### External services

- **MongoDB**
- **OpenStreetMap tiles**

### Other components

- **Resident**
- **Administrator**

## Connections

- Resident → Reporting interface: uses (evidence: `client/src/App.jsx`)
- Administrator → Reporting interface: uses (evidence: `client/src/App.jsx`)
- Reporting interface → Location selection: selects location (evidence: `client/src/App.jsx`)
- Reporting interface → Issue endpoints: requests issues
- Reporting interface → Admin login: posts login (evidence: `client/src/App.jsx`)
- Reporting interface → Status update: patches status (evidence: `client/src/App.jsx`)
- Reporting interface → OpenStreetMap tiles: loads tiles (evidence: `client/src/App.jsx`)
- Issue endpoints → Issue records: finds and saves (evidence: `server/index.js`)
- Issue endpoints → Image uploads: stores image (evidence: `server/index.js`)
- Admin login → Admin records: finds admin (evidence: `server/index.js`)
- Status update → Token verification: verifies token (evidence: `server/index.js`)
- Status update → Issue records: updates status (evidence: `server/index.js`)
- Issue records → MongoDB: persists in (evidence: `server/index.js`)
- Admin records → MongoDB: persists in (evidence: `server/index.js`)
