# chandru137/project architecture

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

- Interactive diagram: https://gitdiagram.com/chandru137/project
- Repository: https://github.com/chandru137/project

## Overview

This is a civic street-issue reporting and resolution tracker. Residents verify their account, browse issue categories and helplines, then submit a photo and location; municipal admins update status and remarks, and residents can re-report unresolved issues. The browser client uses server APIs when available and falls back to local storage. The README documents SQLite persistence and optional Gmail SMTP delivery; server implementation details were not sampled, so backend links are limited to those documented capabilities.

Main entry points: [`app.js`](https://github.com/chandru137/project/blob/main/app.js) (Client application), [`server.ps1`](https://github.com/chandru137/project/blob/main/server.ps1) (Issue and auth API), [`index.html`](https://github.com/chandru137/project/blob/main/index.html) (Portal interface), [`data/civic_issues.db`](https://github.com/chandru137/project/blob/main/data/civic_issues.db) (SQLite issue store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_web["Portal interface<br/>[index.html]"]
  node_clientlogic["Client application<br/>[app.js]"]
end

subgraph group_workflow["Issue workflow"]
  node_auth["Role verification<br/>[app.js]"]
  node_helplines["Category and helplines<br/>[app.js]"]
  node_issueview["Issue browsing<br/>[app.js]"]
  node_report["Issue reporting<br/>[app.js]"]
  node_resolution["Admin resolution<br/>[app.js]"]
  node_rereport["Resident re-report<br/>[app.js]"]
end

subgraph group_backend["Persistence and delivery"]
  node_api["Issue and auth API<br/>[server.ps1]"]
  node_sqlite[("SQLite issue store<br/>[civic_issues.db]")]
  node_browserstore[("Browser local storage")]
end

subgraph group_language["Localization"]
  node_translations["Interface translations<br/>[translations.js]"]
end

node_citizen(("Resident"))
node_admin(("Municipal admin"))
node_gmail["Gmail SMTP"]

node_citizen -->|"uses"| node_web
node_admin -->|"uses"| node_web
node_web -.->|"interacts"| node_clientlogic
node_clientlogic -->|"handles sign-in"| node_auth
node_clientlogic -->|"renders categories"| node_helplines
node_clientlogic -->|"renders issues"| node_issueview
node_clientlogic -->|"submits reports"| node_report
node_clientlogic -->|"updates status"| node_resolution
node_clientlogic -->|"submits follow-up"| node_rereport
node_clientlogic -->|"calls API"| node_api
node_clientlogic -->|"persists fallback"| node_browserstore
node_api -->|"persists issues"| node_sqlite
node_api -.->|"sends OTP"| node_gmail
node_clientlogic -.->|"uses strings"| node_translations

click node_web "https://github.com/chandru137/project/blob/main/index.html"
click node_clientlogic "https://github.com/chandru137/project/blob/main/app.js"
click node_auth "https://github.com/chandru137/project/blob/main/app.js"
click node_helplines "https://github.com/chandru137/project/blob/main/app.js"
click node_issueview "https://github.com/chandru137/project/blob/main/app.js"
click node_report "https://github.com/chandru137/project/blob/main/app.js"
click node_resolution "https://github.com/chandru137/project/blob/main/app.js"
click node_rereport "https://github.com/chandru137/project/blob/main/app.js"
click node_api "https://github.com/chandru137/project/blob/main/server.ps1"
click node_sqlite "https://github.com/chandru137/project/blob/main/data/civic_issues.db"
click node_translations "https://github.com/chandru137/project/blob/main/translations.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_web,node_clientlogic toneBlue
class node_auth,node_helplines,node_issueview,node_report,node_resolution,node_rereport toneAmber
class node_api,node_sqlite,node_browserstore toneMint
class node_translations toneRose
class node_citizen,node_admin,node_gmail toneIndigo
```

## Components

### Web application

- [Portal interface](https://github.com/chandru137/project/blob/main/index.html): `index.html`
- [Client application](https://github.com/chandru137/project/blob/main/app.js): `app.js`

### Issue workflow

- [Role verification](https://github.com/chandru137/project/blob/main/app.js): `app.js`
- [Category and helplines](https://github.com/chandru137/project/blob/main/app.js): `app.js`
- [Issue browsing](https://github.com/chandru137/project/blob/main/app.js): `app.js`
- [Issue reporting](https://github.com/chandru137/project/blob/main/app.js): `app.js`
- [Admin resolution](https://github.com/chandru137/project/blob/main/app.js): `app.js`
- [Resident re-report](https://github.com/chandru137/project/blob/main/app.js): `app.js`

### Persistence and delivery

- [Issue and auth API](https://github.com/chandru137/project/blob/main/server.ps1): `server.ps1`
- [SQLite issue store](https://github.com/chandru137/project/blob/main/data/civic_issues.db): `data/civic_issues.db`
- **Browser local storage**

### Localization

- [Interface translations](https://github.com/chandru137/project/blob/main/translations.js): `translations.js`

### Other components

- **Resident**
- **Municipal admin**
- **Gmail SMTP**

## Connections

- Resident → Portal interface: uses (evidence: `README.md`)
- Municipal admin → Portal interface: uses (evidence: `README.md`)
- Portal interface → Client application: interacts
- Client application → Role verification: handles sign-in (evidence: `app.js`)
- Client application → Category and helplines: renders categories (evidence: `app.js`)
- Client application → Issue browsing: renders issues (evidence: `app.js`)
- Client application → Issue reporting: submits reports (evidence: `app.js`)
- Client application → Admin resolution: updates status (evidence: `app.js`)
- Client application → Resident re-report: submits follow-up (evidence: `app.js`)
- Client application → Issue and auth API: calls API (evidence: `app.js`)
- Client application → Browser local storage: persists fallback (evidence: `README.md`)
- Issue and auth API → SQLite issue store: persists issues (evidence: `README.md`)
- Issue and auth API → Gmail SMTP: sends OTP (evidence: `README.md`)
- Client application → Interface translations: uses strings
