How ty-dwyer/network_traffic works
This is a Spring Boot backend for network-traffic monitoring. The main workflow accepts a PCAP through the API, parses packet headers, then tracks devices, detects documented anomalies, persists results, and publishes live updates. Authentication is a separate user workflow: clients register or log in and use JWTs for protected endpoints. The README documents these component relationships; source excerpts were not provided, so the graph does not infer finer-grained calls or repository mappings.
Main entry points: PacketIngestionService.java Ingestion service · SecurityConfig.java JWT security · AuthController.java Authentication · JwtAuthFilter.java JWT filter
Components 17
API and access
- REST API
src/main/java/com/example/networktraffic/controllers - Authentication
src/main/java/com/example/networktraffic/controllers/AuthController.java - Auth service
src/main/java/com/example/networktraffic/services/AuthService.java - JWT security
src/main/java/com/example/networktraffic/configs/SecurityConfig.java - JWT filter
src/main/java/com/example/networktraffic/configs/JwtAuthFilter.java - JWT utilities
src/main/java/com/example/networktraffic/util/JwtUtil.java
Packet ingestion
- Ingest endpoints
src/main/java/com/example/networktraffic/controllers/PacketController.java - PCAP parser
src/main/java/com/example/networktraffic/parser/PcapParser.java - Ingestion service
src/main/java/com/example/networktraffic/services/PacketIngestionService.java - Device tracking
src/main/java/com/example/networktraffic/entities/Device.java - Anomaly alerts
src/main/java/com/example/networktraffic/entities/Alert.java
Persistence
- Packet records
src/main/java/com/example/networktraffic/entities/Packet.java - JPA repositories
src/main/java/com/example/networktraffic/repositories - PostgreSQL
Live updates
- WebSocket setup
src/main/java/com/example/networktraffic/configs/WebSocketConfig.java - STOMP WebSocket
Other components
- Dashboard client
Connections 16
- Dashboard client → Authentication: registers or logs in
README.md - Dashboard client → Ingest endpoints: uploads PCAP
README.md - Dashboard client → REST API: requests data
README.md - Authentication → Auth service: handles auth
README.md - JWT security → JWT filter: configures filter
README.md - JWT filter → JWT utilities: validates tokens
- JWT security → REST API: protects endpoints
README.md - Ingest endpoints → Ingestion service: starts ingestion
README.md - Ingestion service → PCAP parser: parses capture
README.md - Ingestion service → Device tracking: tracks devices
README.md - Ingestion service → Anomaly alerts: creates alerts
README.md - Ingestion service → JPA repositories: persists results
README.md - JPA repositories → PostgreSQL: stores via JPA
README.md - Ingestion service → STOMP WebSocket: broadcasts updates
README.md - WebSocket setup → STOMP WebSocket: configures endpoint
README.md - STOMP WebSocket → Dashboard client: pushes live updates
README.md