How nnaveennpm-design/naveen-mini-project_ids works
NIDS is a network intrusion detection and traffic-analysis application with a static Vanilla JS interface and a Flask backend. The principal documented backend workflow captures live traffic, extracts NSL-KDD flow features, applies a real model when available, prioritizes attack predictions, and persists alerts for review. The interface includes monitoring, alert analysis, reporting, administration, and authentication capabilities. Backend call relationships below are limited to those shown in excerpts; frontend-to-backend wiring and several unsampled subsystem details are not established by the available evidence.
Main entry points: data-service.js Data service · db.py SQLite persistence · monitor_service.py Capture service · app.py Flask application
Components 25
Web interface
- NIDS interface
frontend/js/main.js - API client
frontend/js/api.js - Data service
frontend/js/data-service.js - Monitoring views
frontend/js/pages/live-monitoring.js - Alert views
frontend/js/pages/alerts.js - File analysis
frontend/js/pages/analyse-file.js - Overview dashboard
frontend/js/pages/overview.js - Reports
frontend/js/pages/reports.js - Administration
frontend/js/pages/admin.js - Sign-in interface
frontend/js/auth.js
API and identity
- Flask application
backend/app.py - Authentication routes
backend/routes/auth_routes.py - Session and RBAC
backend/auth.py - System and analysis routes
backend/routes/system_routes.py
Live monitoring
- Monitoring routes
backend/routes/monitor_routes.py - Capture service
backend/monitor_service.py - Capture check
backend/check_capture.py
Detection and alerts
- Flow feature extraction
backend/features.py - Model detector
backend/detector.py - Detection engine
backend/detection_engine.py - Alert prioritization
backend/priority.py - Alert routes
backend/routes/alerts_routes.py - SQLite persistence
backend/db.py
Other components
- Analyst or admin
- Browser
Connections 30
- Analyst or admin → Browser: uses
README.md - Browser → NIDS interface: loads
README.md - NIDS interface → API client: uses
- API client → Data service: supplies data
- Data service → Monitoring views: feeds
- Data service → Alert views: feeds
- Data service → File analysis: feeds
- Data service → Overview dashboard: feeds
- Data service → Reports: feeds
- Data service → Administration: feeds
- Sign-in interface → API client: requests
- Flask application → Authentication routes: registers
backend/app.py - Flask application → Monitoring routes: registers
backend/app.py - Flask application → Alert routes: registers
backend/app.py - Flask application → System and analysis routes: registers
backend/app.py - Authentication routes → Session and RBAC: verifies tokens
backend/routes/auth_routes.py - Authentication routes → SQLite persistence: reads and writes
backend/routes/auth_routes.py - Session and RBAC → SQLite persistence: checks sessions
backend/auth.py - Monitoring routes → Capture service: controls and queries
backend/routes/monitor_routes.py - Monitoring routes → SQLite persistence: reads settings
backend/routes/monitor_routes.py - Capture service → Flow feature extraction: extracts features
backend/monitor_service.py - Capture service → Model detector: predicts flows
backend/monitor_service.py - Capture service → Alert prioritization: creates alerts
backend/monitor_service.py - Capture service → SQLite persistence: persists alerts
backend/monitor_service.py - System and analysis routes → Model detector: analyzes CSV
backend/routes/system_routes.py - System and analysis routes → SQLite persistence: reads and writes
backend/routes/system_routes.py - Alert routes → SQLite persistence: queries and updates
backend/routes/alerts_routes.py - Capture check → Capture service: checks capture
backend/check_capture.py - Capture check → SQLite persistence: checks persistence
backend/check_capture.py - Detection engine → SQLite persistence: uses storage
backend/detection_engine.py