How raunak-bagaria/netvision works
Main Components
• Backend Modules (Python scripts under src):
• app.py – Acts as the central web server and likely orchestrates data flow.
• packet_capture.py – Handles capturing network packets (requires admin/root privileges).
• traffic_analyzer.py – Processes captured data to analyze traffic patterns and protocol distributions.
• network_scanner.py – Scans the network and identifies devices (leverages Nmap).
• Data Persistence:
• The data directory (e.g., network_traffic.csv) is used to store captured network traffic logs.
• Frontend:
• The dashboard is rendered using the templates (dashboard.html) and styled via static assets (CSS in static/css/styles.css).
Relationships and Data Flow
• Packet Capture, Network Scanner, and Traffic Analyzer are independent modules that gather and process network data.
• The processed data likely gets stored in CSV files (or in-memory) and is subsequently served to the dashboard via app.py.
• app.py acts as the API layer / controller, managing requests from the web interface and interacting with the data/analysis modules.
• The web-based dashboard (HTML/CSS) consumes the processed network data and displays protocol distributions, active devices, and top talkers.
Architectural Patterns and Principles
• Modular Design: Separation of duties among packet capture, traffic analysis, and network scanning.
• MVC-like Pattern: app.py acts as the controller interfacing between the data model (captured traffic data) and the view (dashboard UI).
• Real-time Data Flow: Emphasis on real-time updates between back-end processing and front-end visualization.
• Use of external tools: Integration with Nmap for network scanning, and the requirement for elevated privileges for packet capturing.
Relevant Technologies and Frameworks
• Python (for the backend logic).
• Flask or a similar light web framework (implied by app.py, the “/templates” directory, and static assets).
• Nmap as an external dependency.
• Data handling libraries (listed in requirements.txt) to manage CSV and possibly real-time processing.
• HTML/CSS for dashboard visualization.
Conceptual Layering and Detail
• At the highest level, show the external network feeding into the capture/scanner components.
• The next layer should consist of the processing modules that analyze this input.
• Annotations for key dependencies (e.g., “Requires Admin/Root”, “Uses Nmap for scanning”) to emphasize operational constraints.