# ashneetjha/fixmycity architecture

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

- Interactive diagram: https://gitdiagram.com/ashneetjha/fixmycity
- Repository: https://github.com/ashneetjha/fixmycity

## Overview

FixMyCity is a civic issue-reporting platform: residents submit geolocated infrastructure reports, the backend checks nearby reports and assigns priority, and users can follow status updates while viewing issue clusters and dashboard metrics. Staff can update issue status with an attributed note. The README documents the frontend-to-API relationship and API capabilities; sampled backend code shows controller-to-service calls and service persistence. The frontend source was read but its UI-to-feature wiring is not represented here, so those feature links are documented rather than inferred from unsampled code.

Main entry points: [`backend/src/main/java/com/fixmycity/issue/IssueController.java`](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueController.java) (REST endpoints), [`backend/src/main/java/com/fixmycity/issue/IssueService.java`](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueService.java) (Issue operations), [`backend/src/main/java/com/fixmycity/issue/IssueRepository.java`](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueRepository.java) (Issue repository), [`backend/src/main/java/com/fixmycity/issue/IssueUpdateRepository.java`](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueUpdateRepository.java) (Timeline repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Citizen interface"]
  node_web["Map and dashboard<br/>[main.tsx]"]
end

subgraph group_api["Issue API"]
  node_controller["REST endpoints"]
  node_report_request["Report validation<br/>[IssueRequest.java]"]
  node_status_request["Status input<br/>[StatusRequest.java]"]
end

subgraph group_workflow["Report workflow"]
  node_service["Issue operations<br/>[IssueService.java]"]
  node_updates["Status timeline<br/>[IssueUpdate.java]"]
end

subgraph group_storage["Issue records"]
  node_issue["Issue records<br/>[Issue.java]"]
  node_issue_repo["Issue repository"]
  node_update_repo["Timeline repository"]
  node_database[("Issue database")]
end

node_residents(("Residents and staff"))

node_residents -->|"use"| node_web
node_web -->|"calls API"| node_controller
node_controller -->|"dispatches"| node_service
node_controller -->|"accepts"| node_report_request
node_controller -->|"accepts"| node_status_request
node_service -->|"reads and writes"| node_issue_repo
node_service -->|"reads and writes"| node_update_repo
node_issue_repo -->|"stores"| node_issue
node_update_repo -->|"stores"| node_updates
node_issue_repo -.->|"persists"| node_database
node_update_repo -.->|"persists"| node_database

click node_web "https://github.com/ashneetjha/fixmycity/blob/main/frontend/src/main.tsx"
click node_controller "https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueController.java"
click node_service "https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueService.java"
click node_issue "https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/Issue.java"
click node_updates "https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueUpdate.java"
click node_issue_repo "https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueRepository.java"
click node_update_repo "https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueUpdateRepository.java"
click node_report_request "https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueRequest.java"
click node_status_request "https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/StatusRequest.java"

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 toneBlue
class node_controller,node_report_request,node_status_request toneAmber
class node_service,node_updates toneMint
class node_issue,node_issue_repo,node_update_repo,node_database toneRose
class node_residents toneIndigo
```

## Components

### Citizen interface

- [Map and dashboard](https://github.com/ashneetjha/fixmycity/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`

### Issue API

- [REST endpoints](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueController.java): `backend/src/main/java/com/fixmycity/issue/IssueController.java`
- [Report validation](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueRequest.java): `backend/src/main/java/com/fixmycity/issue/IssueRequest.java`
- [Status input](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/StatusRequest.java): `backend/src/main/java/com/fixmycity/issue/StatusRequest.java`

### Report workflow

- [Issue operations](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueService.java): `backend/src/main/java/com/fixmycity/issue/IssueService.java`
- [Status timeline](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueUpdate.java): `backend/src/main/java/com/fixmycity/issue/IssueUpdate.java`

### Issue records

- [Issue records](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/Issue.java): `backend/src/main/java/com/fixmycity/issue/Issue.java`
- [Issue repository](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueRepository.java): `backend/src/main/java/com/fixmycity/issue/IssueRepository.java`
- [Timeline repository](https://github.com/ashneetjha/fixmycity/blob/main/backend/src/main/java/com/fixmycity/issue/IssueUpdateRepository.java): `backend/src/main/java/com/fixmycity/issue/IssueUpdateRepository.java`
- **Issue database**

### Other components

- **Residents and staff**

## Connections

- Residents and staff → Map and dashboard: use (evidence: `README.md`)
- Map and dashboard → REST endpoints: calls API (evidence: `README.md`)
- REST endpoints → Issue operations: dispatches (evidence: `backend/src/main/java/com/fixmycity/issue/IssueController.java`)
- REST endpoints → Report validation: accepts (evidence: `backend/src/main/java/com/fixmycity/issue/IssueController.java`)
- REST endpoints → Status input: accepts (evidence: `backend/src/main/java/com/fixmycity/issue/IssueController.java`)
- Issue operations → Issue repository: reads and writes (evidence: `backend/src/main/java/com/fixmycity/issue/IssueService.java`)
- Issue operations → Timeline repository: reads and writes (evidence: `backend/src/main/java/com/fixmycity/issue/IssueService.java`)
- Issue repository → Issue records: stores (evidence: `backend/src/main/java/com/fixmycity/issue/IssueRepository.java`)
- Timeline repository → Status timeline: stores (evidence: `backend/src/main/java/com/fixmycity/issue/IssueUpdateRepository.java`)
- Issue repository → Issue database: persists
- Timeline repository → Issue database: persists
