Incident Response Management System
A full-stack Incident Response Management System built for cybersecurity operations centers. Manage security incidents, track infrastructure assets, monitor events, escalate threats, and analyze trends β all from a unified, real-time dashboard.
- JWT-based authentication with bcrypt password hashing
- Role-based access control (Admin / Manager / Analyst)
- Security middleware (Helmet, rate limiting, input validation)
- Change password with current password verification
- Real-time stats (users, incidents, logins)
- User management CRUD (Add/Edit/Deactivate)
- Audit log with action type & date range filtering
- Sortable tables, role/status filters, CSV export
- Analytics dashboard with 4 Recharts visualizations
- Full CRUD with severity (Critical/High/Medium/Low) & status tracking
- Status history timeline with change attribution
- Incident assignment to team members
- Advanced search, pagination, and filtering
- 5-level escalation system (L1βL5)
- Escalation modal with assignee reassignment
- Escalation history timeline on incident detail
- Real-time Socket.io notification on escalation
- Socket.io push notifications for new incidents & escalations
- Notification bell with unread count badge
- Notification drawer with mark-all-read & clear
- LocalStorage persistence across sessions
- Infrastructure asset management (servers, networks, endpoints)
- Security event logging with severity classification
- System-to-incident linking
- Cyberpunk-inspired glassmorphism design
- Dark/Light theme toggle (persisted)
- GSAP-powered animations throughout
- Full mobile responsive layout
- Collapsible sidebar with 9 navigation items
- Swagger UI at
/api/docs - OpenAPI 3.0 spec with JWT bearer auth
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, GSAP, Recharts, Socket.io Client |
| Backend | Node.js, Express, Socket.io, Swagger |
| Database | MySQL 8 |
| Auth | JWT, bcrypt, Role-based middleware |
| Security | Helmet, express-rate-limit, express-validator |
| Deployment | Railway (Backend), Vercel (Frontend) |
| CI/CD | GitHub Actions |
CyberShield/
βββ .github/workflows/ci.yml # CI/CD pipeline
βββ backend/
β βββ config/db.js # MySQL pool (SSL-ready)
β βββ middleware/
β β βββ auth.js # JWT verification
β β βββ roleCheck.js # RBAC middleware
β βββ routes/
β β βββ auth.js # Register, Login, Profile, Session
β β βββ users.js # User CRUD + Audit logs
β β βββ incidents.js # Incident CRUD + Stats
β β βββ escalations.js # Escalation management
β β βββ systems.js # Infrastructure assets
β β βββ events.js # Security events
β βββ migrations/ # SQL schema files
β βββ server.js # Express + Socket.io + Swagger
β βββ .env.example
β βββ package.json
βββ frontend/
β βββ src/
β β βββ components/
β β β βββ Sidebar.jsx # Navigation + Theme + Notifications
β β β βββ IncidentModal.jsx # Create/Edit incident
β β β βββ EscalateModal.jsx # Escalation form
β β β βββ UserModal.jsx # Add/Edit user
β β β βββ ConfirmModal.jsx # Deactivation confirm
β β β βββ NotificationDrawer.jsx
β β β βββ ...
β β βββ pages/
β β β βββ Dashboard.jsx # Stats + Users + Audit tabs
β β β βββ IncidentList.jsx # Filterable incident list
β β β βββ IncidentDetail.jsx# Full detail + timeline
β β β βββ EscalationPage.jsx
β β β βββ AnalyticsDashboard.jsx
β β β βββ SystemsList.jsx
β β β βββ SecurityEvents.jsx
β β β βββ SettingsPage.jsx # Profile + Password + Session
β β β βββ ...
β β βββ hooks/
β β β βββ useAuth.jsx # Auth context provider
β β β βββ useSocket.jsx # Socket.io context
β β βββ utils/api.js # API client (25+ endpoints)
β β βββ App.jsx # Router + Layout
β β βββ index.css # Design system (Dark/Light)
β βββ vercel.json
β βββ .env.example
β βββ package.json
βββ README.md
- Node.js 18+
- MySQL 8.0+
- npm 9+
git clone https://github.com/your-username/CyberShield.git
cd CyberShield
# Backend
cd backend
cp .env.example .env # Edit with your MySQL credentials
npm install
# Frontend
cd ../frontend
cp .env.example .env
npm install-- Create the database
CREATE DATABASE CyberShield_IRMS;
USE CyberShield_IRMS;
-- Run the schema (tables: User, Incident, Incident_Status_History,
-- Systems, Security_Event, Audit_Log, Escalation)
SOURCE backend/migrations/escalation_table.sql;# Terminal 1 β Backend
cd backend
npm run dev # β http://localhost:5000
# Terminal 2 β Frontend
cd frontend
npm run dev # β http://localhost:5173- App: http://localhost:5173
- API Docs: http://localhost:5000/api/docs
- Create a Railway project with MySQL plugin
- Set environment variables:
PORT,DB_HOST,DB_PORT,DB_USER,DB_PASSWORD,DB_NAME,JWT_SECRET,NODE_ENV=production,CORS_ORIGINS=https://your-app.vercel.app - Deploy from GitHub β Railway auto-detects Node.js
- Connect GitHub repo to Vercel
- Set
VITE_API_URLto your Railway backend URL (e.g.,https://your-backend.railway.app/api) - Deploy β Vercel handles Vite builds automatically
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/auth/register |
β | Register user |
| POST | /api/auth/login |
β | Login + JWT |
| GET | /api/auth/me |
β | Current user |
| PUT | /api/auth/profile |
β | Update profile |
| POST | /api/auth/change-password |
β | Change password |
| GET | /api/auth/session |
β | Session info |
| GET | /api/users |
β Admin/Mgr | All users |
| POST | /api/users/admin/create |
β Admin | Create user |
| PUT | /api/users/:id |
β Admin/Mgr | Update user |
| DELETE | /api/users/:id |
β Admin | Deactivate user |
| GET | /api/users/audit/logins |
β | Audit logs |
| GET | /api/incidents |
β | All incidents |
| POST | /api/incidents |
β | Create incident |
| GET | /api/incidents/:id |
β | Incident detail |
| PUT | /api/incidents/:id |
β | Update incident |
| DELETE | /api/incidents/:id |
β Admin | Delete incident |
| GET | /api/escalations |
β | All escalations |
| POST | /api/escalations |
β Admin/Mgr | Escalate incident |
| GET | /api/systems |
β | All systems |
| POST | /api/systems |
β | Register system |
| GET | /api/events |
β | All events |
| POST | /api/events |
β | Log event |
| GET | /api/docs |
β | Swagger UI |
| Feature | Admin | Manager | Analyst |
|---|---|---|---|
| View Dashboard | β | β | β |
| Create Incidents | β | β | β |
| Escalate Incidents | β | β | β |
| Manage Users | β | β (edit) | β |
| Delete/Deactivate Users | β | β | β |
| Delete Incidents | β | β | β |
| Admin Create User | β | β | β |
User ββββββββββββ Incident ββββββββ Systems
β β β
β βββ Incident_Status_History
β β
β βββ Escalation
β β
βββ Audit_Log βββ Security_Event
- Helmet β HTTP security headers
- Rate Limiting β 200 req/15min (API), 20 req/15min (auth)
- Input Validation β express-validator on all mutations
- Password Hashing β bcrypt with 12 salt rounds
- JWT β Token-based stateless authentication
- RBAC β Role-based middleware on all sensitive routes
- CORS β Configurable allowed origins
MIT