# bishwasacharyatech/cybershield architecture

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

- Interactive diagram: https://gitdiagram.com/bishwasacharyatech/cybershield
- Repository: https://github.com/bishwasacharyatech/cybershield
- Video tour (about a minute): https://gitdiagram.com/bishwasacharyatech/cybershield/video

## Overview

CyberShield is a PHP/MySQL incident-management application for users, SOC analysts, and administrators. Users register and submit incidents with evidence; administrators review, set severity, and assign cases; analysts investigate and update status and remarks; users can track the resulting case and receive notifications. Separate role pages also provide account management, analyst applications, categories, audit history, and printable reports. Shared configuration supplies database access and authentication helpers, while the README documents MySQL persistence and evidence-file storage. Some subsystem links are documented capabilities rather than inspected implementation calls.

Main entry points: [`user/report.php`](https://github.com/bishwasacharyatech/cybershield/blob/main/user/report.php) (Incident submission), [`database.sql`](https://github.com/bishwasacharyatech/cybershield/blob/main/database.sql) (MySQL database), [`includes/config.php`](https://github.com/bishwasacharyatech/cybershield/blob/main/includes/config.php) (Config and helpers), [`user/notifications.php`](https://github.com/bishwasacharyatech/cybershield/blob/main/user/notifications.php) (Notification pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Public access"]
  node_landing["Public landing<br/>[landing.php]"]
  node_registration["Registration<br/>[register.php]"]
  node_authentication["Login and logout<br/>[login.php]"]
end

subgraph group_incident["Incident lifecycle"]
  node_submission["Incident submission<br/>[report.php]"]
  node_report_tracking["Report tracking<br/>[my-reports.php]"]
  node_report_view["Report details<br/>[view-report.php]"]
  node_assignment["Case assignment<br/>[assign.php]"]
  node_investigation["Case investigation<br/>[investigate.php]"]
  node_print_export["Printable report"]
end

subgraph group_roles["Role workspaces"]
  node_user_workspace["User dashboard<br/>[dashboard.php]"]
  node_analyst_workspace["Analyst dashboard<br/>[dashboard.php]"]
  node_admin_workspace["Admin dashboard<br/>[dashboard.php]"]
  node_user_admin["User administration<br/>[edit-user.php]"]
  node_categories["Category management<br/>[categories.php]"]
  node_analyst_applications["Analyst applications<br/>[apply-analyst.php]"]
  node_application_review["Application review"]
  node_audit["Audit trail<br/>[audit.php]"]
  node_notifications["Notification pages<br/>[notifications.php]"]
end

subgraph group_platform["Shared platform"]
  node_shared["Config and helpers<br/>[config.php]"]
  node_layout["Shared page layout<br/>[layout.php]"]
  node_mysql[("MySQL database<br/>[database.sql]")]
  node_evidence[("Evidence files")]
end

node_visitor(("Visitor"))
node_user(("Incident user"))
node_analyst(("SOC analyst"))
node_admin(("Administrator"))

node_visitor -->|"opens"| node_landing
node_visitor -->|"registers"| node_registration
node_user -->|"signs in"| node_authentication
node_analyst -->|"signs in"| node_authentication
node_admin -->|"signs in"| node_authentication
node_registration -->|"uses helpers"| node_shared
node_submission -->|"uses helpers"| node_shared
node_submission -->|"stores incident"| node_mysql
node_submission -->|"stores attachments"| node_evidence
node_submission -->|"alerts admins"| node_notifications
node_user -->|"files incident"| node_submission
node_user -->|"tracks cases"| node_report_tracking
node_report_view -->|"reads case history"| node_mysql
node_report_view -->|"marks read"| node_notifications
node_admin -->|"assigns cases"| node_assignment
node_assignment -->|"updates assignment"| node_mysql
node_assignment -->|"alerts parties"| node_notifications
node_analyst -->|"investigates case"| node_investigation
node_investigation -->|"updates case history"| node_mysql
node_investigation -->|"alerts reporter"| node_notifications
node_admin -->|"manages accounts"| node_user_admin
node_admin -->|"manages categories"| node_categories
node_user -->|"applies for role"| node_analyst_applications
node_admin -->|"reviews requests"| node_application_review
node_admin -->|"reviews activity"| node_audit
node_user -->|"views status"| node_user_workspace
node_analyst -->|"views cases"| node_analyst_workspace
node_admin -->|"manages service"| node_admin_workspace
node_user -->|"prints incident"| node_print_export
node_shared -->|"connects"| node_mysql
node_shared -.->|"provides shared helpers"| node_layout

click node_landing "https://github.com/bishwasacharyatech/cybershield/blob/main/landing.php"
click node_registration "https://github.com/bishwasacharyatech/cybershield/blob/main/register.php"
click node_authentication "https://github.com/bishwasacharyatech/cybershield/blob/main/login.php"
click node_submission "https://github.com/bishwasacharyatech/cybershield/blob/main/user/report.php"
click node_report_tracking "https://github.com/bishwasacharyatech/cybershield/blob/main/user/my-reports.php"
click node_report_view "https://github.com/bishwasacharyatech/cybershield/blob/main/user/view-report.php"
click node_assignment "https://github.com/bishwasacharyatech/cybershield/blob/main/admin/assign.php"
click node_investigation "https://github.com/bishwasacharyatech/cybershield/blob/main/analyst/investigate.php"
click node_print_export "https://github.com/bishwasacharyatech/cybershield/blob/main/export-single-report.php"
click node_user_workspace "https://github.com/bishwasacharyatech/cybershield/blob/main/user/dashboard.php"
click node_analyst_workspace "https://github.com/bishwasacharyatech/cybershield/blob/main/analyst/dashboard.php"
click node_admin_workspace "https://github.com/bishwasacharyatech/cybershield/blob/main/admin/dashboard.php"
click node_user_admin "https://github.com/bishwasacharyatech/cybershield/blob/main/admin/edit-user.php"
click node_categories "https://github.com/bishwasacharyatech/cybershield/blob/main/admin/categories.php"
click node_analyst_applications "https://github.com/bishwasacharyatech/cybershield/blob/main/user/apply-analyst.php"
click node_application_review "https://github.com/bishwasacharyatech/cybershield/blob/main/admin/analyst-requests.php"
click node_audit "https://github.com/bishwasacharyatech/cybershield/blob/main/admin/audit.php"
click node_notifications "https://github.com/bishwasacharyatech/cybershield/blob/main/user/notifications.php"
click node_shared "https://github.com/bishwasacharyatech/cybershield/blob/main/includes/config.php"
click node_layout "https://github.com/bishwasacharyatech/cybershield/blob/main/includes/layout.php"
click node_mysql "https://github.com/bishwasacharyatech/cybershield/blob/main/database.sql"
click node_evidence "https://github.com/bishwasacharyatech/cybershield/tree/main/uploads"

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_landing,node_registration,node_authentication,node_user toneBlue
class node_submission,node_report_tracking,node_report_view,node_assignment,node_investigation,node_print_export toneAmber
class node_user_workspace,node_analyst_workspace,node_admin_workspace,node_user_admin,node_categories,node_analyst_applications,node_application_review,node_audit,node_notifications toneMint
class node_shared,node_layout,node_mysql,node_evidence toneRose
class node_visitor,node_analyst,node_admin toneIndigo
```

## Components

### Public access

- [Public landing](https://github.com/bishwasacharyatech/cybershield/blob/main/landing.php): `landing.php`
- [Registration](https://github.com/bishwasacharyatech/cybershield/blob/main/register.php): `register.php`
- [Login and logout](https://github.com/bishwasacharyatech/cybershield/blob/main/login.php): `login.php`

### Incident lifecycle

- [Incident submission](https://github.com/bishwasacharyatech/cybershield/blob/main/user/report.php): `user/report.php`
- [Report tracking](https://github.com/bishwasacharyatech/cybershield/blob/main/user/my-reports.php): `user/my-reports.php`
- [Report details](https://github.com/bishwasacharyatech/cybershield/blob/main/user/view-report.php): `user/view-report.php`
- [Case assignment](https://github.com/bishwasacharyatech/cybershield/blob/main/admin/assign.php): `admin/assign.php`
- [Case investigation](https://github.com/bishwasacharyatech/cybershield/blob/main/analyst/investigate.php): `analyst/investigate.php`
- [Printable report](https://github.com/bishwasacharyatech/cybershield/blob/main/export-single-report.php): `export-single-report.php`

### Role workspaces

- [User dashboard](https://github.com/bishwasacharyatech/cybershield/blob/main/user/dashboard.php): `user/dashboard.php`
- [Analyst dashboard](https://github.com/bishwasacharyatech/cybershield/blob/main/analyst/dashboard.php): `analyst/dashboard.php`
- [Admin dashboard](https://github.com/bishwasacharyatech/cybershield/blob/main/admin/dashboard.php): `admin/dashboard.php`
- [User administration](https://github.com/bishwasacharyatech/cybershield/blob/main/admin/edit-user.php): `admin/edit-user.php`
- [Category management](https://github.com/bishwasacharyatech/cybershield/blob/main/admin/categories.php): `admin/categories.php`
- [Analyst applications](https://github.com/bishwasacharyatech/cybershield/blob/main/user/apply-analyst.php): `user/apply-analyst.php`
- [Application review](https://github.com/bishwasacharyatech/cybershield/blob/main/admin/analyst-requests.php): `admin/analyst-requests.php`
- [Audit trail](https://github.com/bishwasacharyatech/cybershield/blob/main/admin/audit.php): `admin/audit.php`
- [Notification pages](https://github.com/bishwasacharyatech/cybershield/blob/main/user/notifications.php): `user/notifications.php`

### Shared platform

- [Config and helpers](https://github.com/bishwasacharyatech/cybershield/blob/main/includes/config.php): `includes/config.php`
- [Shared page layout](https://github.com/bishwasacharyatech/cybershield/blob/main/includes/layout.php): `includes/layout.php`
- [MySQL database](https://github.com/bishwasacharyatech/cybershield/blob/main/database.sql): `database.sql`
- [Evidence files](https://github.com/bishwasacharyatech/cybershield/tree/main/uploads): `uploads`

### Other components

- **Visitor**
- **Incident user**
- **SOC analyst**
- **Administrator**

## Connections

- Visitor → Public landing: opens (evidence: `README.md`)
- Visitor → Registration: registers (evidence: `README.md`)
- Incident user → Login and logout: signs in (evidence: `README.md`)
- SOC analyst → Login and logout: signs in (evidence: `README.md`)
- Administrator → Login and logout: signs in (evidence: `README.md`)
- Registration → Config and helpers: uses helpers (evidence: `register.php`)
- Incident submission → Config and helpers: uses helpers (evidence: `user/report.php`)
- Incident submission → MySQL database: stores incident (evidence: `README.md`)
- Incident submission → Evidence files: stores attachments (evidence: `README.md`)
- Incident submission → Notification pages: alerts admins (evidence: `user/report.php`)
- Incident user → Incident submission: files incident (evidence: `README.md`)
- Incident user → Report tracking: tracks cases (evidence: `README.md`)
- Report details → MySQL database: reads case history (evidence: `user/view-report.php`)
- Report details → Notification pages: marks read (evidence: `user/view-report.php`)
- Administrator → Case assignment: assigns cases (evidence: `README.md`)
- Case assignment → MySQL database: updates assignment (evidence: `admin/assign.php`)
- Case assignment → Notification pages: alerts parties (evidence: `admin/assign.php`)
- SOC analyst → Case investigation: investigates case (evidence: `README.md`)
- Case investigation → MySQL database: updates case history (evidence: `analyst/investigate.php`)
- Case investigation → Notification pages: alerts reporter (evidence: `analyst/investigate.php`)
- Administrator → User administration: manages accounts (evidence: `README.md`)
- Administrator → Category management: manages categories (evidence: `README.md`)
- Incident user → Analyst applications: applies for role (evidence: `README.md`)
- Administrator → Application review: reviews requests (evidence: `README.md`)
- Administrator → Audit trail: reviews activity (evidence: `README.md`)
- Incident user → User dashboard: views status (evidence: `README.md`)
- SOC analyst → Analyst dashboard: views cases (evidence: `README.md`)
- Administrator → Admin dashboard: manages service (evidence: `README.md`)
- Incident user → Printable report: prints incident (evidence: `README.md`)
- Config and helpers → MySQL database: connects (evidence: `includes/config.php`)
- Config and helpers → Shared page layout: provides shared helpers
