# nisbha0709-max/fsd-cyber architecture

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

- Interactive diagram: https://gitdiagram.com/nisbha0709-max/fsd-cyber
- Repository: https://github.com/nisbha0709-max/fsd-cyber

## Overview

This is a MERN incident-response platform for managing security incidents, assigning responders, tracking SLA deadlines, and preserving forensic evidence. Users authenticate, review dashboards and incident lists, create or update incidents, manage evidence and custody records, and configure users or SLA rules. The client exposes these workflows through role-protected routes and uses authenticated API and realtime contexts; the Express server routes requests to controllers and persists domain records. The README gives no additional capability details. Unsampled page and SLA-job internals are represented only where the source index supports them; dashed links mark unverified client/server wiring.

Main entry points: [`incident-platform/server/server.js`](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/server.js) (Express application), [`incident-platform/client/src/App.jsx`](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/App.jsx) (App routing), [`incident-platform/server/controllers/incidentController.js`](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/incidentController.js) (Incident lifecycle), [`incident-platform/client/src/api/client.js`](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/api/client.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["App routing<br/>[App.jsx]"]
  node_authctx["Session and auth<br/>[AuthContext.jsx]"]
  node_apiclient["API client<br/>[client.js]"]
  node_realtimectx["Realtime client"]
  node_dashboardui["Dashboard view<br/>[Dashboard.jsx]"]
  node_incidentui["Incident views<br/>[Incidents.jsx]"]
  node_newincidentui["Incident intake<br/>[NewIncident.jsx]"]
  node_detailui["Incident detail<br/>[IncidentDetail.jsx]"]
  node_evidenceui["Evidence panel<br/>[EvidencePanel.jsx]"]
  node_slauserui["SLA and users<br/>[SlaSettings.jsx]"]
end

subgraph group_server["API and workflows"]
  node_authroutes["Authentication routes<br/>[authRoutes.js]"]
  node_incidentroutes["Incident routes<br/>[incidentRoutes.js]"]
  node_evidenceroutes["Evidence routes<br/>[evidenceRoutes.js]"]
  node_dashboardroutes["Dashboard routes<br/>[dashboardRoutes.js]"]
  node_slaworkflow["SLA and user routes<br/>[slaRoutes.js]"]
  node_authcontroller["Authentication<br/>[authController.js]"]
  node_incidentcontroller["Incident lifecycle"]
  node_evidencecontroller["Evidence custody"]
  node_dashboardcontroller["Dashboard aggregation"]
  node_slacontroller["SLA and user admin<br/>[slaController.js]"]
  node_incidentservice["Incident assignment and SLA<br/>[incidentService.js]"]
  node_server["Express application<br/>[server.js]"]
end

subgraph group_records["Incident records"]
  node_incidentmodel[("Incident records<br/>[Incident.js]")]
  node_evidencemodel[("Evidence records<br/>[Evidence.js]")]
  node_usermodel[("User records<br/>[User.js]")]
  node_slamodel[("SLA rules<br/>[SlaRule.js]")]
end

subgraph group_live["Realtime and SLA"]
  node_realtimeserver["Socket event service<br/>[realtime.js]"]
  node_slachecker["SLA deadline checker<br/>[slaChecker.js]"]
end

node_user(("Incident responders"))
node_mongodb[("MongoDB")]
node_socket["Socket transport"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_dashboardui
node_app -->|"routes to"| node_incidentui
node_app -->|"routes to"| node_newincidentui
node_app -->|"routes to"| node_detailui
node_app -->|"routes to"| node_slauserui
node_detailui -->|"renders"| node_evidenceui
node_authctx -->|"calls"| node_apiclient
node_detailui -->|"calls"| node_apiclient
node_evidenceui -->|"calls"| node_apiclient
node_realtimectx -->|"reads session"| node_authctx
node_apiclient -.->|"sends API requests"| node_authroutes
node_apiclient -.->|"sends API requests"| node_incidentroutes
node_apiclient -.->|"sends API requests"| node_evidenceroutes
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_incidentroutes
node_server -->|"mounts"| node_evidenceroutes
node_server -->|"mounts"| node_dashboardroutes
node_server -->|"mounts"| node_slaworkflow
node_authroutes -->|"dispatches"| node_authcontroller
node_incidentroutes -->|"dispatches"| node_incidentcontroller
node_incidentroutes -->|"dispatches"| node_evidencecontroller
node_evidenceroutes -->|"dispatches"| node_evidencecontroller
node_dashboardroutes -->|"dispatches"| node_dashboardcontroller
node_slaworkflow -->|"dispatches"| node_slacontroller
node_authcontroller -->|"reads and writes"| node_usermodel
node_incidentcontroller -->|"reads and writes"| node_incidentmodel
node_incidentcontroller -->|"reads"| node_evidencemodel
node_incidentcontroller -->|"looks up assignees"| node_usermodel
node_incidentcontroller -->|"delegates"| node_incidentservice
node_incidentcontroller -->|"emits events"| node_realtimeserver
node_evidencecontroller -->|"reads and writes"| node_evidencemodel
node_evidencecontroller -->|"updates history"| node_incidentmodel
node_evidencecontroller -->|"emits events"| node_realtimeserver
node_dashboardcontroller -->|"aggregates"| node_incidentmodel
node_incidentservice -->|"creates records"| node_incidentmodel
node_incidentservice -->|"reads rules"| node_slamodel
node_incidentservice -->|"selects assignee"| node_usermodel
node_slacontroller -.->|"manages rules"| node_slamodel
node_server -->|"starts job"| node_slachecker
node_slachecker -.->|"checks deadlines"| node_incidentmodel
node_slachecker -.->|"signals SLA events"| node_realtimeserver
node_realtimeserver -->|"looks up recipients"| node_usermodel
node_realtimeserver -.->|"emits"| node_socket
node_socket -.->|"delivers events"| node_realtimectx
node_incidentmodel -.->|"persists"| node_mongodb
node_evidencemodel -.->|"persists"| node_mongodb
node_usermodel -.->|"persists"| node_mongodb

click node_app "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/App.jsx"
click node_authctx "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/context/AuthContext.jsx"
click node_apiclient "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/api/client.js"
click node_realtimectx "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/context/RealtimeContext.jsx"
click node_dashboardui "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/pages/Dashboard.jsx"
click node_incidentui "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/pages/Incidents.jsx"
click node_newincidentui "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/pages/NewIncident.jsx"
click node_detailui "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/pages/IncidentDetail.jsx"
click node_evidenceui "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/components/EvidencePanel.jsx"
click node_slauserui "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/pages/SlaSettings.jsx"
click node_authroutes "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/routes/authRoutes.js"
click node_incidentroutes "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/routes/incidentRoutes.js"
click node_evidenceroutes "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/routes/evidenceRoutes.js"
click node_dashboardroutes "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/routes/dashboardRoutes.js"
click node_slaworkflow "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/routes/slaRoutes.js"
click node_authcontroller "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/authController.js"
click node_incidentcontroller "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/incidentController.js"
click node_evidencecontroller "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/evidenceController.js"
click node_dashboardcontroller "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/dashboardController.js"
click node_slacontroller "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/slaController.js"
click node_incidentservice "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/services/incidentService.js"
click node_incidentmodel "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/models/Incident.js"
click node_evidencemodel "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/models/Evidence.js"
click node_usermodel "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/models/User.js"
click node_slamodel "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/models/SlaRule.js"
click node_server "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/server.js"
click node_realtimeserver "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/realtime.js"
click node_slachecker "https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/jobs/slaChecker.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_authctx,node_apiclient,node_realtimectx,node_dashboardui,node_incidentui,node_newincidentui,node_detailui,node_evidenceui,node_slauserui toneBlue
class node_authroutes,node_incidentroutes,node_evidenceroutes,node_dashboardroutes,node_slaworkflow,node_authcontroller,node_incidentcontroller,node_evidencecontroller,node_dashboardcontroller,node_slacontroller,node_incidentservice,node_server,node_mongodb toneAmber
class node_incidentmodel,node_evidencemodel,node_usermodel,node_slamodel toneMint
class node_realtimeserver,node_slachecker toneRose
class node_user,node_socket toneIndigo
```

## Components

### Web client

- [App routing](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/App.jsx): `incident-platform/client/src/App.jsx`
- [Session and auth](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/context/AuthContext.jsx): `incident-platform/client/src/context/AuthContext.jsx`
- [API client](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/api/client.js): `incident-platform/client/src/api/client.js`
- [Realtime client](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/context/RealtimeContext.jsx): `incident-platform/client/src/context/RealtimeContext.jsx`
- [Dashboard view](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/pages/Dashboard.jsx): `incident-platform/client/src/pages/Dashboard.jsx`
- [Incident views](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/pages/Incidents.jsx): `incident-platform/client/src/pages/Incidents.jsx`
- [Incident intake](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/pages/NewIncident.jsx): `incident-platform/client/src/pages/NewIncident.jsx`
- [Incident detail](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/pages/IncidentDetail.jsx): `incident-platform/client/src/pages/IncidentDetail.jsx`
- [Evidence panel](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/components/EvidencePanel.jsx): `incident-platform/client/src/components/EvidencePanel.jsx`
- [SLA and users](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/client/src/pages/SlaSettings.jsx): `incident-platform/client/src/pages/SlaSettings.jsx`

### API and workflows

- [Authentication routes](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/routes/authRoutes.js): `incident-platform/server/routes/authRoutes.js`
- [Incident routes](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/routes/incidentRoutes.js): `incident-platform/server/routes/incidentRoutes.js`
- [Evidence routes](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/routes/evidenceRoutes.js): `incident-platform/server/routes/evidenceRoutes.js`
- [Dashboard routes](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/routes/dashboardRoutes.js): `incident-platform/server/routes/dashboardRoutes.js`
- [SLA and user routes](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/routes/slaRoutes.js): `incident-platform/server/routes/slaRoutes.js`
- [Authentication](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/authController.js): `incident-platform/server/controllers/authController.js`
- [Incident lifecycle](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/incidentController.js): `incident-platform/server/controllers/incidentController.js`
- [Evidence custody](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/evidenceController.js): `incident-platform/server/controllers/evidenceController.js`
- [Dashboard aggregation](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/dashboardController.js): `incident-platform/server/controllers/dashboardController.js`
- [SLA and user admin](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/controllers/slaController.js): `incident-platform/server/controllers/slaController.js`
- [Incident assignment and SLA](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/services/incidentService.js): `incident-platform/server/services/incidentService.js`
- [Express application](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/server.js): `incident-platform/server/server.js`

### Incident records

- [Incident records](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/models/Incident.js): `incident-platform/server/models/Incident.js`
- [Evidence records](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/models/Evidence.js): `incident-platform/server/models/Evidence.js`
- [User records](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/models/User.js): `incident-platform/server/models/User.js`
- [SLA rules](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/models/SlaRule.js): `incident-platform/server/models/SlaRule.js`

### Realtime and SLA

- [Socket event service](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/realtime.js): `incident-platform/server/realtime.js`
- [SLA deadline checker](https://github.com/nisbha0709-max/fsd-cyber/blob/main/incident-platform/server/jobs/slaChecker.js): `incident-platform/server/jobs/slaChecker.js`

### Other components

- **Incident responders**
- **MongoDB**
- **Socket transport**

## Connections

- Incident responders → App routing: uses (evidence: `incident-platform/client/src/App.jsx`)
- App routing → Dashboard view: routes to (evidence: `incident-platform/client/src/App.jsx`)
- App routing → Incident views: routes to (evidence: `incident-platform/client/src/App.jsx`)
- App routing → Incident intake: routes to (evidence: `incident-platform/client/src/App.jsx`)
- App routing → Incident detail: routes to (evidence: `incident-platform/client/src/App.jsx`)
- App routing → SLA and users: routes to (evidence: `incident-platform/client/src/App.jsx`)
- Incident detail → Evidence panel: renders (evidence: `incident-platform/client/src/pages/IncidentDetail.jsx`)
- Session and auth → API client: calls (evidence: `incident-platform/client/src/context/AuthContext.jsx`)
- Incident detail → API client: calls (evidence: `incident-platform/client/src/pages/IncidentDetail.jsx`)
- Evidence panel → API client: calls (evidence: `incident-platform/client/src/components/EvidencePanel.jsx`)
- Realtime client → Session and auth: reads session (evidence: `incident-platform/client/src/context/RealtimeContext.jsx`)
- API client → Authentication routes: sends API requests
- API client → Incident routes: sends API requests
- API client → Evidence routes: sends API requests
- Express application → Authentication routes: mounts (evidence: `incident-platform/server/server.js`)
- Express application → Incident routes: mounts (evidence: `incident-platform/server/server.js`)
- Express application → Evidence routes: mounts (evidence: `incident-platform/server/server.js`)
- Express application → Dashboard routes: mounts (evidence: `incident-platform/server/server.js`)
- Express application → SLA and user routes: mounts (evidence: `incident-platform/server/server.js`)
- Authentication routes → Authentication: dispatches (evidence: `incident-platform/server/routes/authRoutes.js`)
- Incident routes → Incident lifecycle: dispatches (evidence: `incident-platform/server/routes/incidentRoutes.js`)
- Incident routes → Evidence custody: dispatches (evidence: `incident-platform/server/routes/incidentRoutes.js`)
- Evidence routes → Evidence custody: dispatches (evidence: `incident-platform/server/routes/evidenceRoutes.js`)
- Dashboard routes → Dashboard aggregation: dispatches
- SLA and user routes → SLA and user admin: dispatches (evidence: `incident-platform/server/routes/slaRoutes.js`)
- Authentication → User records: reads and writes (evidence: `incident-platform/server/controllers/authController.js`)
- Incident lifecycle → Incident records: reads and writes (evidence: `incident-platform/server/controllers/incidentController.js`)
- Incident lifecycle → Evidence records: reads (evidence: `incident-platform/server/controllers/incidentController.js`)
- Incident lifecycle → User records: looks up assignees (evidence: `incident-platform/server/controllers/incidentController.js`)
- Incident lifecycle → Incident assignment and SLA: delegates (evidence: `incident-platform/server/controllers/incidentController.js`)
- Incident lifecycle → Socket event service: emits events (evidence: `incident-platform/server/controllers/incidentController.js`)
- Evidence custody → Evidence records: reads and writes (evidence: `incident-platform/server/controllers/evidenceController.js`)
- Evidence custody → Incident records: updates history (evidence: `incident-platform/server/controllers/evidenceController.js`)
- Evidence custody → Socket event service: emits events (evidence: `incident-platform/server/controllers/evidenceController.js`)
- Dashboard aggregation → Incident records: aggregates (evidence: `incident-platform/server/controllers/dashboardController.js`)
- Incident assignment and SLA → Incident records: creates records (evidence: `incident-platform/server/services/incidentService.js`)
- Incident assignment and SLA → SLA rules: reads rules (evidence: `incident-platform/server/services/incidentService.js`)
- Incident assignment and SLA → User records: selects assignee (evidence: `incident-platform/server/services/incidentService.js`)
- SLA and user admin → SLA rules: manages rules (evidence: `incident-platform/server/controllers/slaController.js`)
- Express application → SLA deadline checker: starts job (evidence: `incident-platform/server/server.js`)
- SLA deadline checker → Incident records: checks deadlines
- SLA deadline checker → Socket event service: signals SLA events
- Socket event service → User records: looks up recipients (evidence: `incident-platform/server/realtime.js`)
- Socket event service → Socket transport: emits
- Socket transport → Realtime client: delivers events
- Incident records → MongoDB: persists
- Evidence records → MongoDB: persists
- User records → MongoDB: persists
