How bitter-caramel/flow-monitoring works
Flow Monitoring is a Go traffic-analysis platform with a React frontend. Its principal workflow is browser upload of a capture, backend parsing and persistence, then paginated capture/packet queries displayed in panels. The README describes a plugin-hosted backend; sampled kernel, importer, query, parser, storage, and frontend sources support this map. Rule translation and detection are additional capabilities; automated situation assessment and response are described as goals, not implemented stages. Some subsystem links rely on README documentation because their implementation sources were not sampled.
Main entry points: gateway.go HTTP gateway · handler.go Capture importer · Panel.tsx Import panel · store.go Packet repository
Components 22
Kernel and plugins
- HTTP gateway
internal/kernel/transport/gateway.go - Host bootstrap
internal/kernel/bootstrap/bootstrap.go - Module registry
internal/kernel/registry/registry.go - Plugin host
internal/kernel/pluginhost/manager.go - Plugin contract
pkg/plugin/module.go - Event bus
internal/kernel/eventbus/eventbus.go
Capture processing
- Capture importer
internal/modules/importer/handler.go - pcapng reader
internal/modules/parse/pcapng/reader.go - Packet decoder
internal/modules/parse/decoder/decode.go - Flow analyzer
internal/modules/parse/analyzer/analyzer.go - Packet repository
internal/modules/packetstore/store.go - PostgreSQL store
internal/modules/store/postgres.go - Capture query API
internal/modules/query/handler.go
Rules and detection
- Rule translator
internal/modules/rule/pipeline/translate.go - Rule compiler
internal/modules/rule/compile.go - Detection engine
internal/modules/detect/engine.go
Frontend
- API client
frontend/src/api.ts - Import panel
frontend/src/panels/capture-import/Panel.tsx - Packet list panel
frontend/src/panels/packet-list/Panel.tsx - Panel registry
frontend/src/shell/registry.ts - Application shell
frontend/src/shell/App.tsx
Other components
- Browser user
Connections 22
- Browser user → Import panel: uploads capture
frontend/src/panels/capture-import/Panel.tsx - Import panel → API client: requests import
frontend/src/panels/capture-import/Panel.tsx - Packet list panel → API client: requests pages
frontend/src/panels/packet-list/Panel.tsx - API client → HTTP gateway: calls REST
frontend/src/api.ts - HTTP gateway → Capture query API: routes queries
README.md - HTTP gateway → Capture importer: routes imports
README.md - Host bootstrap → Module registry: loads modules
README.md - Host bootstrap → Plugin host: starts modules
README.md - Plugin host → Plugin contract: uses contract
README.md - Capture importer → pcapng reader: parses capture
README.md - pcapng reader → Packet decoder: decodes packets
README.md - Packet decoder → Flow analyzer: analyzes flows
README.md - Capture importer → Packet repository: persists packets
README.md - Packet repository → PostgreSQL store: stores metadata
- Capture query API → Packet repository: reads pages
README.md - Rule translator → Rule compiler: translates rules
README.md - Rule compiler → Detection engine: builds programs
- Detection engine → Event bus: publishes alerts
- Import panel → Panel registry: registers panel
frontend/src/panels/capture-import/index.ts - Packet list panel → Panel registry: registers panel
frontend/src/panels/packet-list/index.ts - Application shell → Panel registry: reads registry
frontend/src/shell/App.tsx - Browser user → Application shell: uses interface
README.md