How iamrohitkandpal/ddos-cloud-protection-system works
Project type and purpose
• This is a full-stack, security-focused web application (“DDoS Protection System”) built to defend Indian government sites in real time.
• Frontend: React dashboard for monitoring and configuration.
• Backend: Node.js/Express API with layered services—traffic ingestion, real-time analysis, rate-limiting, machine-learning detection, alerting.
• Data stores: Redis (cache, rate limits, blacklists) and MongoDB (persistent logs, analytics).
• Deployment: Nginx as a reverse proxy/WAF, hosted on AWS or cloud providers, with optional Redis Cloud and MongoDB Atlas.
File structure
• Top-level directories:
– backend/ (MVC structure: controllers, routes, models, services, utils, middlewares)
– frontend/ (React app: components, assets, utils, config)
– deployment/nginx/ (nginx configuration for DDoS protection)
– docs/ (architecture, installation, usage)
• Patterns:
– Backend is layered (routes → controllers → services → utilities → data stores).
– Frontend is component-based with configuration and WebSocket helpers.
– Dedicated middleware for security, rate limiting, geo-blocking, CAPTCHA, logging.
• Notices: .env examples, build scripts (Vite for frontend), linting (ESLint), tailwind config.
Extract architectural insights from README
• The system has five logical layers:
1. Traffic Ingestion (Nginx + IP filters + honeypot)
2. Analysis Engine (rule-based middlewares + ML detection via TensorFlow.js)
3. Cache Layer (Redis for rate-limiting and blacklist)
4. Persistent Storage (MongoDB for logs, patterns)
5. Administration Dashboard (React + Socket.IO)
• ML integration and real-time WebSocket notifications are highlighted.
• External services: Redis Cloud, MongoDB Atlas, AWS hosting, CERT-In feeds, API gateway.
Essential architectural details
• Every middleware group (e.g., Security → Rate Limit → Geo-Block → CAPTCHA).
• ML detection utility as part of the Analysis Engine.
• Real-time notification path (Socket.IO channel from backend to frontend).