# suvromukherjee/doce-backend-dia architecture

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

- Interactive diagram: https://gitdiagram.com/suvromukherjee/doce-backend-dia
- Repository: https://github.com/suvromukherjee/doce-backend-dia

## Overview

DOCE is an Express API for managing departments, topics, incidents, reports, user access, notifications, and related records. Its main workflow is an API request routed to a domain controller, which reads or changes records through Sequelize; reporting and incident-management features provide distinct domain stages, while department/topic mappings connect operational scope to those records. File handling, saved searches, dashboard, and access controls are additional product branches. The README is empty, and many routes/controllers were not sampled, so some capabilities are represented by their routing modules without speculative internal links.

Main entry points: [`app.js`](https://github.com/suvromukherjee/doce-backend-dia/blob/main/app.js) (Express app), [`config/db.config.js`](https://github.com/suvromukherjee/doce-backend-dia/blob/main/config/db.config.js) (Sequelize database), [`routes/savesearch.js`](https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/savesearch.js) (Saved-search API), [`middleware/authentication.js`](https://github.com/suvromukherjee/doce-backend-dia/blob/main/middleware/authentication.js) (JWT authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["API runtime"]
  node_server["HTTP server<br/>[server.js]"]
  node_app["Express app<br/>[app.js]"]
  node_auth["JWT authentication<br/>[authentication.js]"]
  node_ipblock["IP blocking<br/>[ipBlocker.js]"]
  node_blockedips["Blocked IP list<br/>[BlockedIPs.js]"]
  node_database[("Sequelize database<br/>[db.config.js]")]
end

subgraph group_operations["Operational records"]
  node_incidentroutes["Incident API<br/>[incident.js]"]
  node_categoryroutes["Category API<br/>[catogory.js]"]
  node_categorymapping["Category-incident mapping"]
  node_dailyreport["Daily reports"]
  node_departmentmapping["Department mappings"]
  node_mappingupdates["Mapping updates"]
  node_departmentroutes["Department API<br/>[department.js]"]
  node_deptorm["Department ORM"]
  node_deptreport["Department reports"]
  node_deptreportlist["Report listing"]
end

subgraph group_governance["Access and administration"]
  node_accessroutes["Access management<br/>[accessManagment.js]"]
  node_usercontroller["User management<br/>[user.js]"]
end

subgraph group_support["Reporting and utilities"]
  node_dashboard["Dashboard<br/>[dashboard.js]"]
  node_savesearch["Saved searches<br/>[savesearch.js]"]
  node_savesearchroutes["Saved-search API<br/>[savesearch.js]"]
  node_fileupload["File upload<br/>[fileUpload.js]"]
  node_filedownload["File download<br/>[fileDownload.js]"]
  node_fileread["Uploaded-file reader"]
  node_notifications["Notifications"]
end

node_client(("API client"))

node_client -->|"sends requests"| node_server
node_server -->|"serves"| node_app
node_app -->|"checks requests"| node_ipblock
node_ipblock -->|"checks IPs"| node_blockedips
node_app -->|"initializes"| node_database
node_app -->|"mounts"| node_incidentroutes
node_app -->|"mounts"| node_categoryroutes
node_app -->|"mounts"| node_departmentroutes
node_app -->|"mounts"| node_accessroutes
node_app -->|"mounts"| node_savesearchroutes
node_app -->|"mounts"| node_fileupload
node_app -->|"mounts"| node_filedownload
node_app -->|"mounts route"| node_dashboard
node_incidentroutes -.->|"routes to"| node_categorymapping
node_categoryroutes -.->|"uses models"| node_database
node_categorymapping -->|"updates records"| node_database
node_dailyreport -->|"creates report"| node_database
node_departmentmapping -.->|"creates mappings"| node_database
node_mappingupdates -->|"updates mappings"| node_database
node_departmentroutes -->|"applies auth"| node_auth
node_deptorm -->|"queries records"| node_database
node_deptreport -->|"creates report"| node_database
node_deptreportlist -.->|"lists reports"| node_database
node_accessroutes -->|"applies auth"| node_auth
node_savesearchroutes -->|"dispatches"| node_savesearch
node_savesearch -->|"reads and writes"| node_database
node_savesearchroutes -->|"configures upload"| node_fileupload
node_fileread -->|"reads records"| node_database
node_filedownload -->|"applies auth"| node_auth
node_notifications -->|"queries records"| node_database

click node_server "https://github.com/suvromukherjee/doce-backend-dia/blob/main/server.js"
click node_app "https://github.com/suvromukherjee/doce-backend-dia/blob/main/app.js"
click node_auth "https://github.com/suvromukherjee/doce-backend-dia/blob/main/middleware/authentication.js"
click node_ipblock "https://github.com/suvromukherjee/doce-backend-dia/blob/main/middleware/ipBlocker.js"
click node_blockedips "https://github.com/suvromukherjee/doce-backend-dia/blob/main/Security/BlockedIPs.js"
click node_database "https://github.com/suvromukherjee/doce-backend-dia/blob/main/config/db.config.js"
click node_incidentroutes "https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/incident.js"
click node_categoryroutes "https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/catogory.js"
click node_categorymapping "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/CategoryIncedentMapping/updateCategoryIncidentMapping.js"
click node_dailyreport "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DailyReport/createDailyReport.js"
click node_departmentmapping "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DepartmentMapping/createDepartmentMapping.js"
click node_mappingupdates "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DepartmentMapping/updateDepartmentMapping.js"
click node_departmentroutes "https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/department.js"
click node_deptorm "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DepartmentORM/listOfDepartmentORM.js"
click node_deptreport "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DepartmentReport/createDepartmnetReport.js"
click node_deptreportlist "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DepartmentReport/listOfDepartmentReport.js"
click node_accessroutes "https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/accessManagment.js"
click node_usercontroller "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/user.js"
click node_dashboard "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/dashboard.js"
click node_savesearch "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/savesearch.js"
click node_savesearchroutes "https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/savesearch.js"
click node_fileupload "https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/fileUpload.js"
click node_filedownload "https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/fileDownload.js"
click node_fileread "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/fileRead/uploadedfileRead.js"
click node_notifications "https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/Notification/getNotificationByUser.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_server,node_app,node_auth,node_ipblock,node_blockedips,node_database,node_client toneBlue
class node_incidentroutes,node_categoryroutes,node_categorymapping,node_dailyreport,node_departmentmapping,node_mappingupdates,node_departmentroutes,node_deptorm,node_deptreport,node_deptreportlist toneAmber
class node_accessroutes,node_usercontroller toneMint
class node_dashboard,node_savesearch,node_savesearchroutes,node_fileupload,node_filedownload,node_fileread,node_notifications toneRose
```

## Components

### API runtime

- [HTTP server](https://github.com/suvromukherjee/doce-backend-dia/blob/main/server.js): `server.js`
- [Express app](https://github.com/suvromukherjee/doce-backend-dia/blob/main/app.js): `app.js`
- [JWT authentication](https://github.com/suvromukherjee/doce-backend-dia/blob/main/middleware/authentication.js): `middleware/authentication.js`
- [IP blocking](https://github.com/suvromukherjee/doce-backend-dia/blob/main/middleware/ipBlocker.js): `middleware/ipBlocker.js`
- [Blocked IP list](https://github.com/suvromukherjee/doce-backend-dia/blob/main/Security/BlockedIPs.js): `Security/BlockedIPs.js`
- [Sequelize database](https://github.com/suvromukherjee/doce-backend-dia/blob/main/config/db.config.js): `config/db.config.js`

### Operational records

- [Incident API](https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/incident.js): `routes/incident.js`
- [Category API](https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/catogory.js): `routes/catogory.js`
- [Category-incident mapping](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/CategoryIncedentMapping/updateCategoryIncidentMapping.js): `controller/CategoryIncedentMapping/updateCategoryIncidentMapping.js`
- [Daily reports](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DailyReport/createDailyReport.js): `controller/DailyReport/createDailyReport.js`
- [Department mappings](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DepartmentMapping/createDepartmentMapping.js): `controller/DepartmentMapping/createDepartmentMapping.js`
- [Mapping updates](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DepartmentMapping/updateDepartmentMapping.js): `controller/DepartmentMapping/updateDepartmentMapping.js`
- [Department API](https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/department.js): `routes/department.js`
- [Department ORM](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DepartmentORM/listOfDepartmentORM.js): `controller/DepartmentORM/listOfDepartmentORM.js`
- [Department reports](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DepartmentReport/createDepartmnetReport.js): `controller/DepartmentReport/createDepartmnetReport.js`
- [Report listing](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/DepartmentReport/listOfDepartmentReport.js): `controller/DepartmentReport/listOfDepartmentReport.js`

### Access and administration

- [Access management](https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/accessManagment.js): `routes/accessManagment.js`
- [User management](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/user.js): `controller/user.js`

### Reporting and utilities

- [Dashboard](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/dashboard.js): `controller/dashboard.js`
- [Saved searches](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/savesearch.js): `controller/savesearch.js`
- [Saved-search API](https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/savesearch.js): `routes/savesearch.js`
- [File upload](https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/fileUpload.js): `routes/fileUpload.js`
- [File download](https://github.com/suvromukherjee/doce-backend-dia/blob/main/routes/fileDownload.js): `routes/fileDownload.js`
- [Uploaded-file reader](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/fileRead/uploadedfileRead.js): `controller/fileRead/uploadedfileRead.js`
- [Notifications](https://github.com/suvromukherjee/doce-backend-dia/blob/main/controller/Notification/getNotificationByUser.js): `controller/Notification/getNotificationByUser.js`

### Other components

- **API client**

## Connections

- API client → HTTP server: sends requests
- HTTP server → Express app: serves (evidence: `server.js`)
- Express app → IP blocking: checks requests (evidence: `app.js`)
- IP blocking → Blocked IP list: checks IPs (evidence: `middleware/ipBlocker.js`)
- Express app → Sequelize database: initializes (evidence: `app.js`)
- Express app → Incident API: mounts (evidence: `app.js`)
- Express app → Category API: mounts (evidence: `app.js`)
- Express app → Department API: mounts (evidence: `app.js`)
- Express app → Access management: mounts (evidence: `app.js`)
- Express app → Saved-search API: mounts (evidence: `app.js`)
- Express app → File upload: mounts (evidence: `app.js`)
- Express app → File download: mounts (evidence: `app.js`)
- Express app → Dashboard: mounts route (evidence: `app.js`)
- Incident API → Category-incident mapping: routes to
- Category API → Sequelize database: uses models
- Category-incident mapping → Sequelize database: updates records (evidence: `controller/CategoryIncedentMapping/updateCategoryIncidentMapping.js`)
- Daily reports → Sequelize database: creates report (evidence: `controller/DailyReport/createDailyReport.js`)
- Department mappings → Sequelize database: creates mappings
- Mapping updates → Sequelize database: updates mappings (evidence: `controller/DepartmentMapping/updateDepartmentMapping.js`)
- Department API → JWT authentication: applies auth (evidence: `routes/department.js`)
- Department ORM → Sequelize database: queries records (evidence: `controller/DepartmentORM/listOfDepartmentORM.js`)
- Department reports → Sequelize database: creates report (evidence: `controller/DepartmentReport/createDepartmnetReport.js`)
- Report listing → Sequelize database: lists reports
- Access management → JWT authentication: applies auth (evidence: `routes/accessManagment.js`)
- Saved-search API → Saved searches: dispatches (evidence: `routes/savesearch.js`)
- Saved searches → Sequelize database: reads and writes (evidence: `controller/savesearch.js`)
- Saved-search API → File upload: configures upload (evidence: `routes/savesearch.js`)
- Uploaded-file reader → Sequelize database: reads records (evidence: `controller/fileRead/uploadedfileRead.js`)
- File download → JWT authentication: applies auth (evidence: `routes/fileDownload.js`)
- Notifications → Sequelize database: queries records (evidence: `controller/Notification/getNotificationByUser.js`)
