Architecture of matthart1983/netwatch
matthart1983/netwatch is 201 source files holding 7,179 symbols across 8 modules, written mainly in Rust, Shell, Python. The largest module is src, with 122 files, and 6 files are entry points into the dependency graph.
How netwatch fits together
Startup, configuration and the event loop are handled in src/app.rs, the main entry point, while src/cli.rs parses options such as --lite and --view dense. The modules in src/collectors gather raw data, and src/collectors/connections.rs tracks sockets with their process, state and RTT, while src/collectors/egress.rs records destinations for egress linting. The diagnose code in src/diagnose, started through src/diagnose/run.rs, compares observations against learned baselines and follows each issue until a fix is verified. The views are drawn by files such as src/ui/dashboard.rs and src/ui/packets.rs, which render the Dashboard and Packets tabs from the shared state.
Largest modules
- src: 122 files and 75,911 lines of code
- examples: 17 files and 1,744 lines of code
- scripts: 11 files and 375 lines of code
- tests: 4 files and 546 lines of code
- ml: 3 files and 167 lines of code
- packaging: 2 files and 44 lines of code
- completions: 1 file and 52 lines of code
- root: 1 file and 122 lines of code
Languages
By file count: Rust 143 files, Shell 12 files, Python 5 files, Dockerfile 1 file.
Documentation
Repowise documents netwatch in 441 pages generated from the source, 18 of them written explanations of the repository and its modules. Module guides include:
- src: Application Bootstrap and CLI
- src/dpi: Deep Packet Inspection Protocols
- src/ui/dense: Dense UI Painting
More on netwatch: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos