MCPcopy Index your code
hub / github.com/OpenMANET/openmanetd

github.com/OpenMANET/openmanetd @1.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.3.2 ↗ · + Follow
12,600 symbols 40,568 edges 633 files 3,367 documented · 27%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

OpenMANETd

Management and operations daemon for OpenMANET mesh networks. Runs on OpenMANET mesh nodes and provides, mesh management, an embedded React web interface, and a gRPC/HTTP API.

Features

Web Interface

  • Embedded React SPA served from the binary (no external assets required)
  • Multi-channel PTT grid with waveform visualization and mic level monitoring
  • Real-time receive audio display and optional replay buffer
  • Mesh topology map and neighbor status
  • WiFi, network, and DHCP configuration pages
  • System dashboard with quick actions (reboot, restart services)
  • On-device speech-to-text transcription via Whisper (model downloaded on demand)

Mesh Management (batman-adv / Alfred)

  • Publishes node identity, position, gateway, and IP reservation data across the mesh
  • Receives the same from neighboring nodes for network-wide discovery
  • Automatic batman-adv gateway detection and advertisement
  • Topology snapshot API (MeshTopologyService) with 60s churn metrics (routes added/lost, gateway changes, reconverge time) for the UI topology view

WiFi & Network Management

  • Radio configuration (channel, bandwidth, TX power, mode)
  • Connected AP client and mesh peer listing
  • Network interface monitoring with live traffic counters
  • DHCP server configuration and static lease management
  • VXLAN peer management

Beyond-Line-of-Sight (BLOS)

  • Extends mesh range via Tailscale/Headscale VPN
  • Automatically creates VXLAN tunnels to Tailscale peers
  • Configurable auth key and custom login server (Headscale support)
  • Live overlay-status API: tunnel identity, RX/TX counters with 60s rates, DERP region, per-peer table, ACL tags and advertised routes
  • Server-streaming event RPC emits peer add/lost, online/offline, backend state, and DERP changes for real-time UI dashboards

GNSS / GPS

  • Integrates with gpsd to stream position data
  • Publishes in NMEA and/or Cursor-on-Target (CoT) formats

API

  • Protobuf-defined services exposed via Connect RPC (gRPC + HTTP/JSON)
  • Services: CommsService, DashboardService, WifiConfigService, NetworkInterfaceService, BLOSService, MeshTopologyService, GNSSService, node and status endpoints
  • Server-streaming RPCs for audio (CommsService) and BLOS events (BLOSService)
  • WebSocket endpoint for real-time audio streaming
  • Session-based authentication (PAM-backed); works via cookie for the Web UI or Authorization: Bearer header for direct callers — see docs/api-authentication.md

Architecture

cmd/                              CLI entry points (root daemon, frontend-only mode)
internal/openmanet/               Top-level wiring — starts all subsystems
internal/openmanet/server/        ConnectRPC HTTP server + service registration
internal/openmanet/server/handlers/   Service handler implementations
internal/api/                     AUTO-GENERATED protobuf + ConnectRPC Go stubs
internal/comms/                   Opus/RTP audio, PTT control, jitter buffer
internal/blos/                    BLOS/Tailscale/VXLAN overlay
internal/mgmt/                    Alfred mesh management, wireless config
internal/gpsd/                    gpsd integration, NMEA/CoT publishing
internal/network/                 Network interface, DHCP, routing, UCI config
internal/frontend/                Embedded HTTP server (serves SPA, proxies /api and /ws)
internal/database/                SQLite: schema.sql + query.sql; models/ is generated
internal/config/                  Viper-backed config (/etc/openmanetd/config.yml)
proto/                            Git submodule — .proto source files
frontend/                         React SPA (Vite); build output → static/

Ports: API + WebSocket = 8087. Frontend = 8081 (proxies /api/* and /ws to 8087).

Quickstart

Start the DevContainer and run:

make build          # fmt → vet → buf → sqlc-gen → frontend → compile
./bin/openmanetd

Use make build-lite for a smaller binary (~5 MB) without audio/comms hardware dependencies.

Frontend dev server (hot-reload, pointed at a remote node):

cd frontend && VITE_API_TARGET=http://<node-ip>:8081 pnpm run dev

Frontend-only mode (no local database or hardware):

./bin/openmanetd frontend --api-address http://<node-ip>:8087

Configuration

The config file lives at /etc/openmanetd/config.yml. Key sections:

Section Purpose
alfred.* Batman-adv alfred socket, data type publish toggles
blos.* Tailscale enable, auth key, status poll interval, advertised mesh subnet
gnss.* gpsd enable, NMEA/CoT output
meshTopology.* Delta-tracker sample interval and ring size (powers the 60s churn panel)
frontend.* HTTP/HTTPS listen addresses, TLS cert paths
api.* gRPC API listen address
database.* SQLite file path
instrumentation.* Periodic JSON snapshot capture (see docs/instrumentation-snapshot.md)
runtime.* Memory limit, GC tuning

Developer Tools

  • A DevContainer is included with all required native libraries (CGO, PortAudio, SQLite, etc.).
  • The protobuf specs live in proto/, a git submodule from OpenMANET/protobuf. If empty: git submodule update --init --recursive, then make buf.
  • CGO is required for the full build (go-sqlite3, portaudio, go-alfred). Use make build-lite to skip comms/whisper.
  • Never edit internal/api/, frontend/src/gen/, or internal/database/models/ — these are generated and will be overwritten.
Task Command
Full build make build
Lite build (no hardware deps) make build-lite
Run Go tests make test
Integration tests make integration-test
Frontend tests make test-frontend
Lint (Go + React) make lint
Regenerate protobuf make buf
Regenerate database models make sqlc-gen

Further documentation can be found in the Getting Started doc.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 6,465
Function 5,182
Struct 704
Interface 174
TypeAlias 33
Class 29
FuncType 13

Languages

Go77%
TypeScript23%

Modules by API surface

static/assets/SettingsTerminal-SI1zbtpc.js1,056 symbols
static/assets/index-CnlJFTl8.js588 symbols
static/assets/vendor-react-Dk6ikdJX.js378 symbols
internal/api/openmanet/sysupgrade/v1/sysupgrade_service_vtproto.pb.go299 symbols
static/assets/vendor-connect-DooYvvzB.js227 symbols
internal/api/openmanet/wifi_config/v1/wifi_config_service_vtproto.pb.go183 symbols
internal/api/openmanet/setup/v1/setup.pb.go180 symbols
internal/api/openmanet/setup/v1/setup_vtproto.pb.go170 symbols
internal/api/openmanet/blos/v1/blos_vtproto.pb.go143 symbols
internal/api/openmanet/sysupgrade/v1/sysupgrade.pb.go130 symbols
internal/api/openmanet/blos/v1/blos.pb.go130 symbols
internal/api/openmanet/sysupgrade/v1/sysupgrade_service.pb.go125 symbols

For agents

$ claude mcp add openmanetd \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page