Skip to content

AryanBhati02/CyberSheild_IRMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CyberShield IRMS

πŸ›‘οΈ CyberShield IRMS

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.

✨ Features

πŸ” Authentication & Security

  • 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

πŸ“Š Dashboard & Analytics

  • 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

🚨 Incident Management

  • 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

⬆️ Escalation Module

  • 5-level escalation system (L1–L5)
  • Escalation modal with assignee reassignment
  • Escalation history timeline on incident detail
  • Real-time Socket.io notification on escalation

πŸ”” Real-Time Notifications

  • 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

πŸ–₯️ Systems & Events Registry

  • Infrastructure asset management (servers, networks, endpoints)
  • Security event logging with severity classification
  • System-to-incident linking

🎨 UI/UX

  • Cyberpunk-inspired glassmorphism design
  • Dark/Light theme toggle (persisted)
  • GSAP-powered animations throughout
  • Full mobile responsive layout
  • Collapsible sidebar with 9 navigation items

πŸ“„ API Documentation

  • Swagger UI at /api/docs
  • OpenAPI 3.0 spec with JWT bearer auth

πŸ—οΈ Tech Stack

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

πŸ“ Project Structure

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

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • MySQL 8.0+
  • npm 9+

1. Clone & Install

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

2. Database Setup

-- 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;

3. Run Development Servers

# Terminal 1 β€” Backend
cd backend
npm run dev          # β†’ http://localhost:5000

# Terminal 2 β€” Frontend
cd frontend
npm run dev          # β†’ http://localhost:5173

4. Open


🌐 Deployment

Backend β†’ Railway

  1. Create a Railway project with MySQL plugin
  2. 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
  3. Deploy from GitHub β€” Railway auto-detects Node.js

Frontend β†’ Vercel

  1. Connect GitHub repo to Vercel
  2. Set VITE_API_URL to your Railway backend URL (e.g., https://your-backend.railway.app/api)
  3. Deploy β€” Vercel handles Vite builds automatically

πŸ”‘ API Endpoints

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

πŸ‘₯ Roles & Permissions

Feature Admin Manager Analyst
View Dashboard βœ… βœ… βœ…
Create Incidents βœ… βœ… βœ…
Escalate Incidents βœ… βœ… βœ—
Manage Users βœ… βœ… (edit) βœ—
Delete/Deactivate Users βœ… βœ— βœ—
Delete Incidents βœ… βœ— βœ—
Admin Create User βœ… βœ— βœ—

πŸ“Š Database Schema

User ──────────── Incident ──────── Systems
 β”‚                  β”‚                  β”‚
 β”‚                  β”œβ”€β”€ Incident_Status_History
 β”‚                  β”‚
 β”‚                  β”œβ”€β”€ Escalation
 β”‚                  β”‚
 └── Audit_Log     └── Security_Event

πŸ›‘οΈ Security Features

  • 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

πŸ“ License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors