# codewithvasu-7/cyberincidentmanagement architecture

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

- Interactive diagram: https://gitdiagram.com/codewithvasu-7/cyberincidentmanagement
- Repository: https://github.com/codewithvasu-7/cyberincidentmanagement

## Overview

CIRMS is a role-based Java web application for submitting, triaging, investigating, and tracking cybersecurity incidents. Employees report incidents; analysts investigate and update them; administrators manage users and review system activity. Servlets coordinate incident scoring, forensic analysis, response guidance, persistence, audit logging, and reporting, while JSPs provide role-specific screens. Separate capabilities include URL scanning and threat intelligence. The source index and excerpts support the main controller-to-service and DAO-to-database relationships; unshown UI routing is represented only where the README describes the role workflow.

Main entry points: [`src/main/java/com/cyberincident/controller/IncidentServlet.java`](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/IncidentServlet.java) (Incident handling), [`src/main/java/com/cyberincident/dao/IncidentDAO.java`](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/dao/IncidentDAO.java) (Incident records), [`src/main/java/com/cyberincident/dao/AuditLogDAO.java`](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/dao/AuditLogDAO.java) (Audit records), [`src/main/java/com/cyberincident/controller/LoginServlet.java`](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/LoginServlet.java) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Role-based web"]
  node_user_ui["User screens"]
  node_analyst_ui["Analyst screens"]
  node_admin_ui["Admin screens"]
  node_auth["Authentication<br/>[LoginServlet.java]"]
  node_registration["Registration"]
  node_access_control["Role access<br/>[AuthFilter.java]"]
end

subgraph group_incident["Incident lifecycle"]
  node_incident_workflow["Incident handling"]
  node_risk_scoring["Risk scoring"]
  node_response_guidance["Response playbooks"]
  node_forensics["Forensic analysis"]
end

subgraph group_security["Security analysis"]
  node_url_scan["URL scanning"]
  node_url_analysis["URL threat analysis"]
  node_threat_intel["Threat intelligence"]
  node_intel_service["Intel service"]
end

subgraph group_data["Persistence and reporting"]
  node_incident_store["Incident records<br/>[IncidentDAO.java]"]
  node_audit["Audit records<br/>[AuditLogDAO.java]"]
  node_admin_ops["Admin operations<br/>[AdminServlet.java]"]
  node_reports["Reports and exports"]
  node_report_metrics["Report metrics<br/>[ReportServlet.java]"]
  node_database[("MySQL database<br/>[database.sql]")]
  node_db_connection["JDBC connection<br/>[DBConnection.java]"]
end

node_employee(("Employee"))
node_analyst(("SOC analyst"))
node_administrator(("Administrator"))
node_external_intel["External threat feeds"]

node_employee -->|"uses"| node_user_ui
node_analyst -->|"uses"| node_analyst_ui
node_administrator -->|"uses"| node_admin_ui
node_user_ui -->|"submits reports"| node_incident_workflow
node_incident_workflow -->|"calculates risk"| node_risk_scoring
node_incident_workflow -->|"generates playbook"| node_response_guidance
node_incident_workflow -->|"diagnoses incident"| node_forensics
node_incident_workflow -->|"creates and updates"| node_incident_store
node_analyst_ui -->|"investigates"| node_incident_workflow
node_incident_workflow -->|"records events"| node_audit
node_admin_ui -->|"manages users"| node_admin_ops
node_admin_ops -->|"manages incidents"| node_incident_store
node_admin_ops -->|"records actions"| node_audit
node_reports -->|"loads incidents"| node_incident_store
node_report_metrics -->|"reads incident data"| node_incident_store
node_employee -->|"authenticates"| node_auth
node_auth -.->|"establishes session"| node_access_control
node_registration -->|"records registration"| node_audit
node_auth -->|"records login events"| node_audit
node_incident_store -->|"opens JDBC connection"| node_db_connection
node_audit -->|"opens JDBC connection"| node_db_connection
node_db_connection -->|"connects to"| node_database
node_employee -.->|"submits URL"| node_url_scan
node_url_scan -->|"scans URL"| node_url_analysis
node_url_analysis -.->|"checks feeds"| node_external_intel
node_analyst -.->|"requests intelligence"| node_threat_intel
node_threat_intel -->|"delegates lookup"| node_intel_service
node_intel_service -.->|"queries sources"| node_external_intel

click node_user_ui "https://github.com/codewithvasu-7/cyberincidentmanagement/tree/main/src/main/webapp/user"
click node_analyst_ui "https://github.com/codewithvasu-7/cyberincidentmanagement/tree/main/src/main/webapp/analyst"
click node_admin_ui "https://github.com/codewithvasu-7/cyberincidentmanagement/tree/main/src/main/webapp/admin"
click node_auth "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/LoginServlet.java"
click node_registration "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/RegisterServlet.java"
click node_access_control "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/filter/AuthFilter.java"
click node_incident_workflow "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/IncidentServlet.java"
click node_risk_scoring "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/security/RiskCalculator.java"
click node_response_guidance "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/security/ResponseEngine.java"
click node_forensics "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/security/IncidentForensicEngine.java"
click node_incident_store "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/dao/IncidentDAO.java"
click node_audit "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/dao/AuditLogDAO.java"
click node_admin_ops "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/AdminServlet.java"
click node_reports "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/ExportReportServlet.java"
click node_report_metrics "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/ReportServlet.java"
click node_database "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/database/database.sql"
click node_db_connection "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/dao/DBConnection.java"
click node_url_scan "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/UrlScannerServlet.java"
click node_url_analysis "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/security/UrlSecurityScanner.java"
click node_threat_intel "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/ThreatIntelServlet.java"
click node_intel_service "https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/security/ThreatIntelService.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_user_ui,node_analyst_ui,node_admin_ui,node_auth,node_registration,node_access_control toneBlue
class node_incident_workflow,node_risk_scoring,node_response_guidance,node_forensics toneAmber
class node_url_scan,node_url_analysis,node_threat_intel,node_intel_service toneMint
class node_incident_store,node_audit,node_admin_ops,node_reports,node_report_metrics,node_database,node_db_connection toneRose
class node_employee,node_analyst,node_administrator,node_external_intel toneIndigo
```

## Components

### Role-based web

- [User screens](https://github.com/codewithvasu-7/cyberincidentmanagement/tree/main/src/main/webapp/user): `src/main/webapp/user`
- [Analyst screens](https://github.com/codewithvasu-7/cyberincidentmanagement/tree/main/src/main/webapp/analyst): `src/main/webapp/analyst`
- [Admin screens](https://github.com/codewithvasu-7/cyberincidentmanagement/tree/main/src/main/webapp/admin): `src/main/webapp/admin`
- [Authentication](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/LoginServlet.java): `src/main/java/com/cyberincident/controller/LoginServlet.java`
- [Registration](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/RegisterServlet.java): `src/main/java/com/cyberincident/controller/RegisterServlet.java`
- [Role access](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/filter/AuthFilter.java): `src/main/java/com/cyberincident/filter/AuthFilter.java`

### Incident lifecycle

- [Incident handling](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/IncidentServlet.java): `src/main/java/com/cyberincident/controller/IncidentServlet.java`
- [Risk scoring](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/security/RiskCalculator.java): `src/main/java/com/cyberincident/security/RiskCalculator.java`
- [Response playbooks](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/security/ResponseEngine.java): `src/main/java/com/cyberincident/security/ResponseEngine.java`
- [Forensic analysis](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/security/IncidentForensicEngine.java): `src/main/java/com/cyberincident/security/IncidentForensicEngine.java`

### Security analysis

- [URL scanning](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/UrlScannerServlet.java): `src/main/java/com/cyberincident/controller/UrlScannerServlet.java`
- [URL threat analysis](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/security/UrlSecurityScanner.java): `src/main/java/com/cyberincident/security/UrlSecurityScanner.java`
- [Threat intelligence](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/ThreatIntelServlet.java): `src/main/java/com/cyberincident/controller/ThreatIntelServlet.java`
- [Intel service](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/security/ThreatIntelService.java): `src/main/java/com/cyberincident/security/ThreatIntelService.java`

### Persistence and reporting

- [Incident records](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/dao/IncidentDAO.java): `src/main/java/com/cyberincident/dao/IncidentDAO.java`
- [Audit records](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/dao/AuditLogDAO.java): `src/main/java/com/cyberincident/dao/AuditLogDAO.java`
- [Admin operations](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/AdminServlet.java): `src/main/java/com/cyberincident/controller/AdminServlet.java`
- [Reports and exports](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/ExportReportServlet.java): `src/main/java/com/cyberincident/controller/ExportReportServlet.java`
- [Report metrics](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/controller/ReportServlet.java): `src/main/java/com/cyberincident/controller/ReportServlet.java`
- [MySQL database](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/database/database.sql): `database/database.sql`
- [JDBC connection](https://github.com/codewithvasu-7/cyberincidentmanagement/blob/main/src/main/java/com/cyberincident/dao/DBConnection.java): `src/main/java/com/cyberincident/dao/DBConnection.java`

### Other components

- **Employee**
- **SOC analyst**
- **Administrator**
- **External threat feeds**

## Connections

- Employee → User screens: uses (evidence: `README.md`)
- SOC analyst → Analyst screens: uses (evidence: `README.md`)
- Administrator → Admin screens: uses (evidence: `README.md`)
- User screens → Incident handling: submits reports (evidence: `README.md`)
- Incident handling → Risk scoring: calculates risk (evidence: `src/main/java/com/cyberincident/controller/IncidentServlet.java`)
- Incident handling → Response playbooks: generates playbook (evidence: `src/main/java/com/cyberincident/controller/IncidentServlet.java`)
- Incident handling → Forensic analysis: diagnoses incident (evidence: `src/main/java/com/cyberincident/controller/IncidentServlet.java`)
- Incident handling → Incident records: creates and updates (evidence: `src/main/java/com/cyberincident/controller/IncidentServlet.java`)
- Analyst screens → Incident handling: investigates (evidence: `README.md`)
- Incident handling → Audit records: records events (evidence: `src/main/java/com/cyberincident/controller/IncidentServlet.java`)
- Admin screens → Admin operations: manages users (evidence: `README.md`)
- Admin operations → Incident records: manages incidents (evidence: `src/main/java/com/cyberincident/controller/AdminServlet.java`)
- Admin operations → Audit records: records actions (evidence: `src/main/java/com/cyberincident/controller/AdminServlet.java`)
- Reports and exports → Incident records: loads incidents (evidence: `src/main/java/com/cyberincident/controller/ExportReportServlet.java`)
- Report metrics → Incident records: reads incident data (evidence: `src/main/java/com/cyberincident/controller/ReportServlet.java`)
- Employee → Authentication: authenticates (evidence: `README.md`)
- Authentication → Role access: establishes session (evidence: `src/main/java/com/cyberincident/filter/AuthFilter.java`)
- Registration → Audit records: records registration (evidence: `src/main/java/com/cyberincident/controller/RegisterServlet.java`)
- Authentication → Audit records: records login events (evidence: `src/main/java/com/cyberincident/controller/LoginServlet.java`)
- Incident records → JDBC connection: opens JDBC connection (evidence: `src/main/java/com/cyberincident/dao/IncidentDAO.java`)
- Audit records → JDBC connection: opens JDBC connection (evidence: `src/main/java/com/cyberincident/dao/AuditLogDAO.java`)
- JDBC connection → MySQL database: connects to (evidence: `README.md`)
- Employee → URL scanning: submits URL
- URL scanning → URL threat analysis: scans URL (evidence: `src/main/java/com/cyberincident/controller/UrlScannerServlet.java`)
- URL threat analysis → External threat feeds: checks feeds
- SOC analyst → Threat intelligence: requests intelligence
- Threat intelligence → Intel service: delegates lookup (evidence: `src/main/java/com/cyberincident/controller/ThreatIntelServlet.java`)
- Intel service → External threat feeds: queries sources
