# mysociety/fixmystreet architecture

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

- Interactive diagram: https://gitdiagram.com/mysociety/fixmystreet
- Repository: https://github.com/mysociety/fixmystreet

## Overview

FixMyStreet is a configurable civic-reporting platform: residents locate a street problem, the platform determines the responsible authority from location and problem type, and a report is sent to that authority. Public reports can be revisited for updates, while residents can subscribe to local alerts. The supplied tree and excerpts expose browser-side maps, reporting interactions, council-specific asset behavior, dashboards, and waste forms; the README supplies the broader routing, submission, and alert workflow. Backend ownership and wiring beyond those documented behaviors are not shown.

Main entry points: [`web/js/map-OpenLayers.js`](https://github.com/mysociety/fixmystreet/blob/master/web/js/map-OpenLayers.js) (OpenLayers map), [`web/cobrands/fixmystreet/fixmystreet.js`](https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/fixmystreet/fixmystreet.js) (Report interactions), [`web/js/front.js`](https://github.com/mysociety/fixmystreet/blob/master/web/js/front.js) (Public reports), [`web/cobrands/fixmystreet-uk-councils/assets.js`](https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/fixmystreet-uk-councils/assets.js) (Council map assets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reporting["Reporting experience"]
  node_report_ui["Report interactions<br/>[fixmystreet.js]"]
  node_report_routing["Authority routing"]
  node_report_delivery["Report delivery"]
  node_waste_forms["Waste forms<br/>[waste.js]"]
end

subgraph group_maps["Maps and location"]
  node_map_core["OpenLayers map<br/>[map-OpenLayers.js]"]
  node_google_map["Google map<br/>[map-google.js]"]
  node_map_adapters["Map adapters"]
end

subgraph group_public["Public reports"]
  node_public_reports["Public reports<br/>[front.js]"]
  node_duplicate_check["Duplicate reports<br/>[duplicates.js]"]
  node_dashboard["Report dashboard<br/>[dashboard.js]"]
  node_subscriptions["Area alerts"]
end

subgraph group_council["Council customisation"]
  node_council_assets["Council map assets<br/>[assets.js]"]
  node_highways_assets["Highways assets<br/>[assets.js]"]
  node_highways_england["National highways<br/>[assets.js]"]
  node_dvla_lookup["DVLA lookup<br/>[dvla.js]"]
end

node_resident(("Resident"))
node_email["Email"]
node_open311["Open311 service"]

node_resident -->|"starts report"| node_report_ui
node_resident -->|"locates problem"| node_map_core
node_map_core -->|"supplies location"| node_report_routing
node_report_ui -->|"provides problem type"| node_report_routing
node_report_routing -->|"selects authority"| node_report_delivery
node_report_delivery -->|"sends report"| node_email
node_report_delivery -->|"sends report"| node_open311
node_resident -->|"views reports"| node_public_reports
node_public_reports -.->|"checks duplicates"| node_duplicate_check
node_resident -->|"leaves updates"| node_public_reports
node_resident -->|"subscribes"| node_subscriptions
node_subscriptions -->|"sends alerts"| node_email
node_resident -.->|"views statistics"| node_dashboard
node_map_core -.->|"offers map option"| node_google_map
node_map_core -.->|"offers map option"| node_map_adapters
node_council_assets -.->|"customises assets"| node_map_core
node_highways_assets -.->|"registers road assets"| node_map_core
node_highways_england -.->|"registers road assets"| node_map_core
node_report_ui -.->|"uses lookup"| node_dvla_lookup
node_resident -.->|"uses waste service"| node_waste_forms

click node_report_ui "https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/fixmystreet/fixmystreet.js"
click node_map_core "https://github.com/mysociety/fixmystreet/blob/master/web/js/map-OpenLayers.js"
click node_google_map "https://github.com/mysociety/fixmystreet/blob/master/web/js/map-google.js"
click node_map_adapters "https://github.com/mysociety/fixmystreet/blob/master/web/js/map-OpenStreetMap.js"
click node_council_assets "https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/fixmystreet-uk-councils/assets.js"
click node_highways_assets "https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/highways/assets.js"
click node_highways_england "https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/highwaysengland/assets.js"
click node_dvla_lookup "https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/fixmystreet-uk-councils/dvla.js"
click node_public_reports "https://github.com/mysociety/fixmystreet/blob/master/web/js/front.js"
click node_duplicate_check "https://github.com/mysociety/fixmystreet/blob/master/web/js/duplicates.js"
click node_dashboard "https://github.com/mysociety/fixmystreet/blob/master/web/js/dashboard.js"
click node_waste_forms "https://github.com/mysociety/fixmystreet/blob/master/web/js/waste.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_report_ui,node_report_routing,node_report_delivery,node_waste_forms toneBlue
class node_map_core,node_google_map,node_map_adapters toneAmber
class node_public_reports,node_duplicate_check,node_dashboard,node_subscriptions toneMint
class node_council_assets,node_highways_assets,node_highways_england,node_dvla_lookup toneRose
class node_resident,node_email,node_open311 toneIndigo
```

## Components

### Reporting experience

- [Report interactions](https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/fixmystreet/fixmystreet.js): `web/cobrands/fixmystreet/fixmystreet.js`
- **Authority routing**
- **Report delivery**
- [Waste forms](https://github.com/mysociety/fixmystreet/blob/master/web/js/waste.js): `web/js/waste.js`

### Maps and location

- [OpenLayers map](https://github.com/mysociety/fixmystreet/blob/master/web/js/map-OpenLayers.js): `web/js/map-OpenLayers.js`
- [Google map](https://github.com/mysociety/fixmystreet/blob/master/web/js/map-google.js): `web/js/map-google.js`
- [Map adapters](https://github.com/mysociety/fixmystreet/blob/master/web/js/map-OpenStreetMap.js): `web/js/map-OpenStreetMap.js`

### Public reports

- [Public reports](https://github.com/mysociety/fixmystreet/blob/master/web/js/front.js): `web/js/front.js`
- [Duplicate reports](https://github.com/mysociety/fixmystreet/blob/master/web/js/duplicates.js): `web/js/duplicates.js`
- [Report dashboard](https://github.com/mysociety/fixmystreet/blob/master/web/js/dashboard.js): `web/js/dashboard.js`
- **Area alerts**

### Council customisation

- [Council map assets](https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/fixmystreet-uk-councils/assets.js): `web/cobrands/fixmystreet-uk-councils/assets.js`
- [Highways assets](https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/highways/assets.js): `web/cobrands/highways/assets.js`
- [National highways](https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/highwaysengland/assets.js): `web/cobrands/highwaysengland/assets.js`
- [DVLA lookup](https://github.com/mysociety/fixmystreet/blob/master/web/cobrands/fixmystreet-uk-councils/dvla.js): `web/cobrands/fixmystreet-uk-councils/dvla.js`

### Other components

- **Resident**
- **Email**
- **Open311 service**

## Connections

- Resident → Report interactions: starts report (evidence: `README.md`)
- Resident → OpenLayers map: locates problem (evidence: `README.md`)
- OpenLayers map → Authority routing: supplies location (evidence: `README.md`)
- Report interactions → Authority routing: provides problem type (evidence: `README.md`)
- Authority routing → Report delivery: selects authority (evidence: `README.md`)
- Report delivery → Email: sends report (evidence: `README.md`)
- Report delivery → Open311 service: sends report (evidence: `README.md`)
- Resident → Public reports: views reports (evidence: `README.md`)
- Public reports → Duplicate reports: checks duplicates
- Resident → Public reports: leaves updates (evidence: `README.md`)
- Resident → Area alerts: subscribes (evidence: `README.md`)
- Area alerts → Email: sends alerts (evidence: `README.md`)
- Resident → Report dashboard: views statistics
- OpenLayers map → Google map: offers map option
- OpenLayers map → Map adapters: offers map option
- Council map assets → OpenLayers map: customises assets
- Highways assets → OpenLayers map: registers road assets
- National highways → OpenLayers map: registers road assets
- Report interactions → DVLA lookup: uses lookup
- Resident → Waste forms: uses waste service
