How usa-reddragon/dmrhub works
DMRHub is a single-binary DMR network server with a web administration and monitoring interface. Radio and peer traffic enters through protocol servers, which register with the routing hub; the hub supports call routing and repeater subscriptions, while the application also provides a Parrot and scheduled nets. Users manage the service through HTTP APIs and a Vue frontend, with persistent state in the database and supporting key-value and pub/sub backends. The README establishes the product capabilities; some subsystem links are omitted where the sampled source does not show their runtime wiring.
Main entry points: root.go Application startup · routing.go Routing hub · mmdvm/server.go MMDVM server · http/server.go HTTP server
Components 25
DMR runtime
- MMDVM server
internal/dmr/servers/mmdvm/server.go - MMDVM packets
internal/dmr/servers/mmdvm/packet_handlers.go - OpenBridge server
internal/dmr/servers/openbridge/server.go - IPSC server
internal/dmr/servers/ipsc/server.go - Routing hub
internal/dmr/hub/routing.go - Repeater subscriptions
internal/dmr/hub/subscription_manager.go - Call tracking
internal/dmr/calltracker/call_tracker.go - Parrot playback
internal/dmr/parrot/parrot.go - Scheduled nets
internal/dmr/netscheduler/scheduler.go
State and messaging
- Application database
internal/db/db.go - Key-value store
internal/kv/kv.go - Pub/sub
internal/pubsub/pubsub.go
Web interface
- HTTP server
internal/http/server.go - API and websocket routes
internal/http/api/routes.go - API controllers
internal/http/api/controllers/v1 - Web frontend
internal/http/frontend/src/App.vue - Frontend routes
internal/http/frontend/src/router/routes.ts - Frontend API client
internal/http/frontend/src/services/API.ts
Application services
- Configuration
internal/config/config.go - Application startup
cmd/root.go - Metrics endpoint
internal/metrics/server.go - Profiling endpoint
internal/pprof/server.go
Other components
- MMDVM repeater
- OpenBridge peer
- Web user
Connections 29
- MMDVM repeater → MMDVM server: sends packets
- MMDVM server → MMDVM packets: dispatches packets
internal/dmr/servers/mmdvm/server.go - MMDVM server → Routing hub: registers with
internal/dmr/servers/mmdvm/server.go - OpenBridge peer → OpenBridge server: sends packets
- OpenBridge server → Routing hub: registers with
internal/dmr/servers/openbridge/server.go - IPSC server → Routing hub: registers with
- Routing hub → Repeater subscriptions: manages
internal/dmr/hub/subscription_manager.go - Application startup → MMDVM server: starts
cmd/root.go - Application startup → OpenBridge server: starts
cmd/root.go - Application startup → IPSC server: starts
cmd/root.go - Application startup → Routing hub: creates
cmd/root.go - Application startup → Call tracking: starts
cmd/root.go - Application startup → Scheduled nets: starts
cmd/root.go - Application startup → Application database: initializes
cmd/root.go - Application startup → HTTP server: starts
cmd/root.go - Application startup → Configuration: loads
cmd/root.go - Application startup → Metrics endpoint: starts
cmd/root.go - Application startup → Profiling endpoint: starts
cmd/root.go - Web user → Web frontend: uses
- Web frontend → Frontend routes: uses routes
- Web user → HTTP server: requests pages
- HTTP server → API and websocket routes: mounts routes
internal/http/server.go - API and websocket routes → API controllers: routes requests
internal/http/api/routes.go - Frontend API client → API and websocket routes: calls API
- Application startup → Key-value store: configures
cmd/root.go - Application startup → Pub/sub: configures
cmd/root.go - Parrot playback → Key-value store: stores stream state
- HTTP server → Scheduled nets: provides scheduler
internal/http/server.go - API and websocket routes → Routing hub: serves call websocket
internal/http/api/routes.go