Commit Graph
100 Commits
Author SHA1 Message Date
Daniel PupiusandClaude e8e1a112ab feat(topology): track mesh node connections and render as map polylines
Add passive topology tracking from four sources with confidence ranking:
- Zero-hop MQTT observations (continuous, per-gateway, highest frequency)
- Traceroute replies (RouteDiscovery, full path + SNR data)
- NeighborInfo packets (self-reported neighbor SNR)
- relay_node inferred links (1-hop packets with known relay)

Backend: add rx_snr (field 62) and rx_rssi (field 63) to meshstream Data
proto; extract from MeshPacket in decoder.go; regenerate Go bindings.

Frontend:
- topologySlice: LinkObservation model, per-direction confidence merge,
  24h TTL pruning, 2000-edge cap, Redux-pure (timestamp from payload)
- aggregatorSlice: add hopsFromGateway to NodeData
- __root.tsx: dispatch processTopologyPacket after each SSE message
- NetworkMap: render polylines colored by SNR (green/yellow/red/gray),
  dimmed at 0.4 opacity for viaMqtt edges; Links toggle button in legend
- NodeDetail: Connections section showing per-edge SNR, source badge,
  viaMqtt badge, and last-seen time

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-15 16:43:48 +00:00
Daniel PupiusandClaude 8779da32a8 refactor(map): extract useCallback hooks and fix XSS in NetworkMap
Convert plain function declarations inside component body to useCallback
with correct deps, eliminating the eslint-disable-react-hooks banner.
Extract buildMarkerContent to module level (pure, no state/refs).
Reorder fitMapToBounds before resetAutoZoom to avoid TDZ reference.
Replace innerHTML SVG in marker with DOM-API construction.
Replace showInfoWindow innerHTML template with .textContent DOM APIs
to eliminate XSS risk from node name/status fields.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-15 16:35:04 +00:00
Daniel PupiusandClaude Sonnet 4.6 1d61a89505 fix: remove dead code, SSE error handling, bounded dedup maps
- Remove unused mustParseDuration from main.go
- Replace http.Error calls after SSE headers with plain returns;
  skip bad packets instead of killing the stream on marshal error
- Change processedPackets/seenPackets from boolean to timestamp values
  and prune entries older than 24h on each packet to prevent unbounded
  memory growth in long-running sessions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 16:27:57 +00:00
Daniel PupiusandClaude Sonnet 4.6 9e5fd5bcae Add code review findings as todos
Security and architecture review of current codebase. 11 findings:
- 3 P1 (XSS, hardcoded creds, unbounded memory growth)
- 4 P2 (SSE protocol, broker deadlock, NetworkMap architecture, CORS)
- 4 P3 (security headers, error leakage, dead code, binary payload)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:41:24 +00:00
Daniel PupiusandClaude Sonnet 4.6 3e24e6aea4 Add node topology tracking design spec
Covers link inference from traceroute, zero-hop MQTT, NeighborInfo,
and relay_node fields. Includes multi-gateway correlation, hop bounding,
SNR-colored polyline rendering on the map, and node detail connections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:31:27 +00:00
Daniel Pupius e69fad97cb Add moat config 2026-03-14 20:30:11 -07:00
Daniel Pupius 69a31ca406 Split routers and extend mesh traffic retention (#1)
* Split routers on dashboard and extend retention periods

- Add Router node type with 12-hour stale timeout (vs 30 min for regular nodes)
- Create RouterList component to display router nodes separately
- Update NodeList to filter out routers (similar to gateways)
- Add yellow color scheme for router nodes to distinguish from gateways (green) and nodes (blue)
- Extend mesh traffic retention across the board:
  - Client-side packet age filter: 12h → 24h
  - Broker cache size: 50 → 200 packets
  - Messages per channel: 100 → 500

* Update regular node activity threshold to 60 minutes

* Fix TypeScript errors in router filtering logic

* Fix docker-build to use buildx explicitly with --load flag

* Add default empty value for MESHSTREAM_GOOGLE_MAPS_API_KEY in docker-build

* Restructure docker buildx command to fix path argument parsing

* Remove trailing backslash before build context path in docker-build

* Quote build args and separate path argument in docker-build
2026-01-06 12:25:34 -08:00
Daniel Pupius 245911a450 Remove duplicative block 2025-07-03 14:09:20 -07:00
Daniel Pupius 88dd1fc663 Tweak gateway visualization and card headers 2025-07-03 12:38:23 -07:00
Daniel Pupius f8c0e0d591 Render admin packets differently 2025-07-03 11:08:09 -07:00
Daniel Pupius dc36070355 Better error cards for private messages, neighbor info rendering 2025-06-23 09:47:14 -07:00
Daniel Pupius a83f4feddb Longer test timeout for broker test 2025-05-22 14:37:57 -07:00
Daniel Pupius bc3104f59c go fmt 2025-05-22 14:35:02 -07:00
Daniel Pupius ee20a1ea46 Better loading state for node page 2025-05-22 14:32:51 -07:00
Daniel Pupius 61a83bafca Better retry and reconnection logic 2025-05-21 14:35:10 -07:00
Daniel Pupius 0feb2591ef Remove stats listener since it is noisy in prod 2025-05-19 11:00:10 -07:00
Daniel Pupius 26ebc2a6f5 Ignore old packets 2025-05-07 11:32:44 -07:00
Daniel Pupius fc72e9f65a Mobile layout tweaks 2025-05-05 09:42:19 -07:00
Daniel Pupius 15e6047708 Color and layout tweaks 2025-05-05 09:12:51 -07:00
Daniel Pupius 84f8cdfe5c MQTT SetOrderMatters(false) 2025-05-04 16:12:32 -07:00
Daniel Pupius df7df6dbd6 Unique client id and fix graceful shutdown 2025-05-04 13:26:13 -07:00
Daniel Pupius 3ce8889786 Debugging prod failures 2025-05-04 10:15:42 -07:00
Daniel Pupius 92c08c0d6b Hack for handling env with spaces 2025-05-02 15:43:57 -07:00
Daniel Pupius c53486414f Fix static style serving in prod 2025-05-02 15:31:14 -07:00
Daniel Pupius ba9c8d9221 Channel name cleanup 2025-05-02 15:21:50 -07:00
Daniel Pupius 0279d5fcd4 Static file fallback for entry pages in prod 2025-05-02 15:15:48 -07:00
Daniel Pupius 2692b2e9af Track active connections 2025-05-02 14:39:57 -07:00
Daniel Pupius 5b8bee8736 Script for building and pushing docker to ECR 2025-05-02 14:39:38 -07:00
Daniel Pupius 908c851f02 Remove accidentally checked in proto generator 2025-05-02 13:57:35 -07:00
Daniel Pupius 4f6ee2ffde go fmt 2025-05-02 13:50:28 -07:00
Daniel Pupius 29e0b752ec Make clean hack 2025-05-02 13:25:43 -07:00
Daniel Pupius 23deefe061 More fixes for CI/CD 2025-05-02 13:20:57 -07:00
Daniel Pupius 5cae8fd5cf Another try at fixing proto in CI 2025-05-02 13:06:39 -07:00
Daniel Pupius 622e37ae53 Another try at fixing proto in CI 2025-05-02 13:04:56 -07:00
Daniel Pupius 1c7bfcd330 Another try at fixing proto in CI 2025-05-02 12:32:09 -07:00
Daniel Pupius 2ef4cf1166 Debug proto in CI 2025-05-02 12:28:04 -07:00
Daniel Pupius 06a81686a2 Install eslint 2025-05-02 12:24:48 -07:00
Daniel Pupius 6675c50e97 GitHub actions 2025-05-02 12:22:45 -07:00
Daniel Pupius 92313be6cd Screenshots and readme 2025-05-02 12:02:18 -07:00
Daniel Pupius e9fa0104e3 Docker set up and fixes for build 2025-05-01 15:34:16 -07:00
Daniel Pupius 68fc353673 Info page 2025-04-30 15:08:03 -07:00
Daniel Pupius e2ced4e939 packets --> stream 2025-04-30 13:11:27 -07:00
Daniel Pupius b7359339d3 Yet more map tweaks 2025-04-30 13:10:40 -07:00
Daniel Pupius ae496ace52 Makefile to make it easier to monitor bay mesh 2025-04-30 12:59:37 -07:00
Daniel Pupius a88e55d22e Full-screen network map 2025-04-30 12:30:35 -07:00
Daniel Pupius c029ca1f7a Fix errors relating to lazy loading of map 2025-04-30 12:14:23 -07:00
Daniel Pupius 95800b33c7 Lazy load maps 2025-04-30 10:50:46 -07:00
Daniel Pupius 64b026646d Use env and flags for configuration 2025-04-30 10:36:45 -07:00
Daniel Pupius ebb4e1306f Add connection heartbeat 2025-04-30 10:24:55 -07:00
Daniel Pupius f83e6a9c31 Consistent colors and activity status 2025-04-30 09:16:44 -07:00
Daniel Pupius 25c18b262f Message improvements 2025-04-29 13:47:59 -07:00
Daniel Pupius 38d5a8da79 Lint fixes 2025-04-29 13:26:23 -07:00
Daniel Pupius 44dc97c529 Traceroute rendering 2025-04-29 13:09:06 -07:00
Daniel Pupius 501c093242 Linkify node headers 2025-04-29 12:52:33 -07:00
Daniel Pupius 2c37282dab Fix zooming functionality 2025-04-29 12:47:44 -07:00
Daniel Pupius b2b94d7204 Fix node types 2025-04-29 12:12:41 -07:00
Daniel Pupius 4061bbc28f Network map 2025-04-28 17:27:45 -07:00
Daniel Pupius 4fd898222b Tweaks to channel list and messages 2025-04-26 17:24:37 -07:00
Daniel Pupius c7abbbd4be Allow 1.5s to drain cached packets 2025-04-26 11:40:00 -07:00
Daniel Pupius 6c891a1b88 Break up NodeDetail into sub components 2025-04-25 17:56:25 -07:00
Daniel Pupius ca231c81bd Add Button component 2025-04-25 17:30:02 -07:00
Daniel Pupius 81892a5793 Cache recent packets and send to client when it connects 2025-04-25 17:22:36 -07:00
Daniel Pupius 4817d31d39 More cleanup to the node details page 2025-04-25 14:42:30 -07:00
Daniel Pupius acaeeaf495 Fix map view on node details 2025-04-25 10:27:44 -07:00
Daniel Pupius 5b5dad7a68 Fixes for gateway display 2025-04-25 09:54:36 -07:00
Daniel Pupius 4a41b0062d Cleanup error handling 2025-04-25 09:34:51 -07:00
Daniel Pupius 86e6f45d5e Fixes for node links and early stream connection 2025-04-25 08:46:30 -07:00
Daniel Pupius 0184cba1ef Updates to node details 2025-04-24 20:10:56 -07:00
Daniel Pupius 33fcc87f41 Add channel page 2025-04-24 18:01:29 -07:00
Daniel Pupius 69b0ea6615 Make sure to count packets once per node/channel, even if received by multiple gateways 2025-04-24 12:58:20 -07:00
Daniel Pupius 28cb7072f7 Fix double loading of data 2025-04-24 10:51:50 -07:00
Daniel Pupius 5ba6899c94 Consolidate MeshCard 2025-04-24 10:35:59 -07:00
Daniel Pupius d04f52d379 Add a dashboard showing observed nodes and gateways 2025-04-24 09:59:06 -07:00
Daniel Pupius 07299d892c More stream tweaks 2025-04-23 15:19:32 -07:00
Daniel Pupius 489f995433 Track rx time 2025-04-23 13:59:54 -07:00
Daniel Pupius 6c891198b5 Show more data 2025-04-23 13:17:19 -07:00
Daniel Pupius 4f33866ce3 Update visualization of Telemetry Packets 2025-04-23 13:07:26 -07:00
Daniel Pupius 8ca47fba44 Show Node Info in more compressed form 2025-04-23 10:57:28 -07:00
Daniel Pupius 0361594291 More layout tweaks 2025-04-23 10:46:04 -07:00
Daniel Pupius 249cecfda2 Card rendering and maps 2025-04-23 10:38:58 -07:00
Daniel Pupius 77ea38ae19 Demo page for working on components 2025-04-23 09:59:30 -07:00
Daniel Pupius 7c46944fb6 Shell styling 2025-04-23 09:38:07 -07:00
Daniel Pupius 05a9f2e461 More UI tweaks 2025-04-22 22:08:49 -07:00
Daniel Pupius d522985d1e Add PacketCard 2025-04-22 22:03:10 -07:00
Daniel Pupius 13187eb520 Packet formatting changes 2025-04-22 21:13:30 -07:00
Daniel Pupius f4504c4cd5 Fix types and render packets in a custom style 2025-04-22 19:48:24 -07:00
Daniel Pupius 648a5c601e Further work on web design 2025-04-22 17:17:25 -07:00
Daniel Pupius 095ff560b0 Working on UI 2025-04-22 16:42:22 -07:00
Daniel Pupius 60c8878436 Typescript types for payloads 2025-04-22 14:56:41 -07:00
Daniel Pupius 71e914b05d Fixing wireformat for SSE 2025-04-22 13:37:07 -07:00
Daniel Pupius 6844d575c4 Initial skeleton for web application 2025-04-22 13:26:35 -07:00
Daniel PupiusandClaude c6de28aacb Create web directory with test fixtures
- Added new web/ directory for frontend development
- Created fixtures/ subdirectory with JSON test data
- Added samples for all major packet types (text, position, nodeinfo, etc.)
- Added README files with documentation
- Added placeholder package.json

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-22 12:43:30 -07:00
Daniel PupiusandClaude 2d61d369b0 Update MQTT packet handling to use protobuf structures directly
- Refactored decoder to use protobuf-defined Packet, TopicInfo, and Data structures
- Updated MQTT client and broker to work with protobuf structures directly
- Improved logging to properly serialize protobuf messages for structured output
- Optimized .logista.yaml template for cleaner, more compact log display

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-22 10:30:39 -07:00
Daniel Pupius 0784ccb958 Simplify packet construction 2025-04-21 22:34:49 -07:00
Daniel Pupius f580249162 Another checkpoint moving to proto defined packets 2025-04-21 18:27:55 -07:00
Daniel Pupius 86380cccf9 Refactor protos 2025-04-21 15:40:10 -07:00
Daniel Pupius 41ee61b59a Updated logging configuration for dev and json for prod 2025-04-21 14:16:35 -07:00
Daniel Pupius 35cefa9981 Update .logista.yaml to match the actual log structure
- Fix timestamp field from timestamp to ts
- Add proper packet structure parsing based on sample logs
- Add special visualization for Node Info packets
- Add special visualization for Telemetry packets with DeviceMetrics
- Format uptime in human-readable hours
- Add fallback for unknown packet types with pretty printing
- Handle both packet and non-packet log entries
2025-04-21 12:43:23 -07:00
Daniel Pupius 1c96f0b9f4 Add Logista for JSON log processing
- Add .logista.yaml configuration for prettier log output
- Add github.com/dpup/logista as a go tool
- Update Makefile run target to pipe output through logista
- Configure the format to show timestamp, level, and message with colors
- Add special formatting for different message types
- Display telemetry and position data in readable format
- Add table display for remaining structured fields
2025-04-21 11:56:31 -07:00
Daniel Pupius 0f151c31b9 Improve structured logging for better log aggregation
- Add message type prefix in brief mode for quick identification
- Include GatewayID in brief mode summary
- Remove formatted output from structured fields
- Use proper structured fields for each message type
- Add common fields like hopLimit and ID for all messages
- Extract specific data for position, telemetry, and text messages
- Format structured data for better log aggregation compatibility
2025-04-21 11:52:40 -07:00