# prasannakumari-dev/neighbourhood-pulse architecture

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

- Interactive diagram: https://gitdiagram.com/prasannakumari-dev/neighbourhood-pulse
- Repository: https://github.com/prasannakumari-dev/neighbourhood-pulse

## Overview

Neighbourhood Pulse brings event management and community-issue reporting into a React interface, with an Express API and MongoDB persistence. The event workflow runs from event screens through the Axios service and API routes to controller/model operations; report routes and controllers provide a parallel reporting lifecycle. Date filtering, map visualization, and map-based location selection are documented capabilities, but the relevant app and map wiring was not inspected, so those links are shown as unverified. The graph retains those product branches without inferring unshown calls.

Main entry points: [`reactapp/src/App.jsx`](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/App.jsx) (Application interface), [`reactapp/src/services/EventService.js`](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/services/EventService.js) (Event service), [`reactapp/src/components/AddEvent.jsx`](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/AddEvent.jsx) (Create event), [`reactapp/src/components/CommunityReports.jsx`](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/CommunityReports.jsx) (Report interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React experience"]
  node_app["Application interface<br/>[App.jsx]"]
  node_home["Home and filtering<br/>[Home.jsx]"]
  node_map["Neighbourhood map"]
end

subgraph group_events["Event management"]
  node_add["Create event<br/>[AddEvent.jsx]"]
  node_view["Browse events<br/>[ViewEvent.jsx]"]
  node_update["Edit event<br/>[UpdateEvent.jsx]"]
  node_eventservice["Event service<br/>[EventService.js]"]
end

subgraph group_reports["Community reporting"]
  node_communityui["Report interface"]
end

subgraph group_backend["API and persistence"]
  node_eventroutes["Event routes<br/>[eventRoutes.js]"]
  node_reportroutes["Report routes"]
  node_server["API server<br/>[index.js]"]
  node_eventcontroller["Event operations<br/>[eventController.js]"]
  node_reportcontroller["Report operations"]
  node_eventmodel["Event records<br/>[Event.js]"]
  node_reportmodel["Report records<br/>[CommunityReport.js]"]
  node_mongodb[("MongoDB")]
end

node_resident(("Neighbourhood user"))

node_resident -->|"uses"| node_app
node_app -.->|"presents"| node_home
node_app -.->|"presents"| node_add
node_app -.->|"presents"| node_view
node_app -.->|"presents"| node_update
node_app -.->|"presents"| node_communityui
node_app -.->|"presents"| node_map
node_home -.->|"filters dates"| node_view
node_add -.->|"selects location"| node_map
node_communityui -.->|"selects location"| node_map
node_add -->|"calls"| node_eventservice
node_view -->|"calls"| node_eventservice
node_update -->|"calls"| node_eventservice
node_eventservice -->|"HTTP requests"| node_eventroutes
node_communityui -.->|"manages reports"| node_reportroutes
node_server -->|"mounts"| node_eventroutes
node_server -->|"mounts"| node_reportroutes
node_eventroutes -->|"dispatches"| node_eventcontroller
node_reportroutes -->|"dispatches"| node_reportcontroller
node_eventcontroller -->|"reads and writes"| node_eventmodel
node_reportcontroller -->|"reads and writes"| node_reportmodel
node_eventmodel -->|"persists records"| node_mongodb
node_reportmodel -->|"persists records"| node_mongodb

click node_app "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/App.jsx"
click node_home "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/Home.jsx"
click node_map "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/NeighbourhoodMap.jsx"
click node_add "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/AddEvent.jsx"
click node_view "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/ViewEvent.jsx"
click node_update "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/UpdateEvent.jsx"
click node_eventservice "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/services/EventService.js"
click node_communityui "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/CommunityReports.jsx"
click node_eventroutes "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/routes/eventRoutes.js"
click node_reportroutes "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/routes/communityReportRoutes.js"
click node_server "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/index.js"
click node_eventcontroller "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/controllers/eventController.js"
click node_reportcontroller "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/controllers/communityReportController.js"
click node_eventmodel "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/models/Event.js"
click node_reportmodel "https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/models/CommunityReport.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_home,node_map,node_resident toneBlue
class node_add,node_view,node_update,node_eventservice toneAmber
class node_communityui toneMint
class node_eventroutes,node_reportroutes,node_server,node_eventcontroller,node_reportcontroller,node_eventmodel,node_reportmodel,node_mongodb toneRose
```

## Components

### React experience

- [Application interface](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/App.jsx): `reactapp/src/App.jsx`
- [Home and filtering](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/Home.jsx): `reactapp/src/components/Home.jsx`
- [Neighbourhood map](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/NeighbourhoodMap.jsx): `reactapp/src/components/NeighbourhoodMap.jsx`

### Event management

- [Create event](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/AddEvent.jsx): `reactapp/src/components/AddEvent.jsx`
- [Browse events](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/ViewEvent.jsx): `reactapp/src/components/ViewEvent.jsx`
- [Edit event](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/UpdateEvent.jsx): `reactapp/src/components/UpdateEvent.jsx`
- [Event service](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/services/EventService.js): `reactapp/src/services/EventService.js`

### Community reporting

- [Report interface](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/reactapp/src/components/CommunityReports.jsx): `reactapp/src/components/CommunityReports.jsx`

### API and persistence

- [Event routes](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/routes/eventRoutes.js): `nodeapp/routes/eventRoutes.js`
- [Report routes](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/routes/communityReportRoutes.js): `nodeapp/routes/communityReportRoutes.js`
- [API server](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/index.js): `nodeapp/index.js`
- [Event operations](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/controllers/eventController.js): `nodeapp/controllers/eventController.js`
- [Report operations](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/controllers/communityReportController.js): `nodeapp/controllers/communityReportController.js`
- [Event records](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/models/Event.js): `nodeapp/models/Event.js`
- [Report records](https://github.com/prasannakumari-dev/neighbourhood-pulse/blob/main/nodeapp/models/CommunityReport.js): `nodeapp/models/CommunityReport.js`
- **MongoDB**

### Other components

- **Neighbourhood user**

## Connections

- Neighbourhood user → Application interface: uses (evidence: `README.md`)
- Application interface → Home and filtering: presents
- Application interface → Create event: presents
- Application interface → Browse events: presents
- Application interface → Edit event: presents
- Application interface → Report interface: presents
- Application interface → Neighbourhood map: presents
- Home and filtering → Browse events: filters dates
- Create event → Neighbourhood map: selects location
- Report interface → Neighbourhood map: selects location
- Create event → Event service: calls (evidence: `reactapp/src/components/AddEvent.jsx`)
- Browse events → Event service: calls (evidence: `reactapp/src/components/ViewEvent.jsx`)
- Edit event → Event service: calls (evidence: `reactapp/src/components/UpdateEvent.jsx`)
- Event service → Event routes: HTTP requests (evidence: `README.md`)
- Report interface → Report routes: manages reports
- API server → Event routes: mounts (evidence: `nodeapp/index.js`)
- API server → Report routes: mounts (evidence: `nodeapp/index.js`)
- Event routes → Event operations: dispatches (evidence: `nodeapp/routes/eventRoutes.js`)
- Report routes → Report operations: dispatches (evidence: `nodeapp/routes/communityReportRoutes.js`)
- Event operations → Event records: reads and writes (evidence: `nodeapp/controllers/eventController.js`)
- Report operations → Report records: reads and writes (evidence: `nodeapp/controllers/communityReportController.js`)
- Event records → MongoDB: persists records (evidence: `README.md`)
- Report records → MongoDB: persists records (evidence: `README.md`)
