pulse

module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT

README

Pulse

The control plane for the Beacon media stack.

License Go 1.25

Website · Bug Reports


Pulse is the central service that every other Beacon application — Pilot, Prism, Haul — registers with and pulls shared configuration from. If you run more than one Beacon service, Pulse is what stops you from editing the same indexer list, the same quality profile, and the same download-client credentials in every service separately.

Pulse runs fine on its own as a standalone service registry / shared config store. It comes into its own once a second Beacon service joins it.

What Pulse does

Service registry

Each Beacon service registers itself with Pulse on startup (name, type, URL, capabilities) and heartbeats periodically. Other services discover their peers through Pulse instead of hardcoding URLs. If you move Pilot to a new host, Prism picks up the new address on the next heartbeat cycle — no config edits.

Indexer management

Indexers are configured once in Pulse and pushed out to subscribing services. Add a new Torznab endpoint to Pulse, tag it with movies, and Prism picks it up automatically. Tag it with tv and Pilot picks it up too. No more adding the same indexer to three services and keeping three copies of its API key in sync.

Includes a built-in catalog of popular indexers with pre-filled setting schemas and a one-click add flow, plus a tester that verifies connectivity and returns sample results before you save.

Quality profile management

Quality profiles live in Pulse. Subscribing services mirror them with a managed_by_pulse flag so local edits are clearly distinguished from synced state. If you want a 1080p-cutoff profile identical in Pilot and Prism, you edit it once in Pulse.

Shared settings store

A typed key-value store for cross-service configuration. Things like media.library_root, rename.colon_replacement, download.preferred_protocol — settings multiple services need to agree on. Each service can read, write, and subscribe to a namespace.

Tag management

Central tag registry with usage counts. Tags are used by indexer assignment, notification routing, and library filtering across every service.

Features

  • Full REST API (Huma v2 + Chi v5) under /api/v1/
  • OpenAPI documentation at /api/docs
  • WebSocket event stream at /ws — services subscribe for live updates when shared state changes
  • SQLite database: no separate database server
  • Go client SDK at pkg/sdk — drop-in for any Go service that wants to register with Pulse
  • React 19 + TypeScript + Vite frontend embedded in the Go binary
  • Per-mode theme system (dark + light presets) shared with the other Beacon services
  • Dashboard with service overview, indexer status, and config subscriptions
  • Zero telemetry

Getting started

Docker

Pulse is optional: Pilot, Prism and Haul each run on their own. Connect them to Pulse to manage indexers, quality profiles and download clients in one place.

Set the config path and PULSE_SERVER_EXTERNAL_URL in the compose file. The external URL is the address Pilot and Prism use to reach Pulse, so use this host's IP or DNS name, not localhost.

The compose file is docker-compose.yml. Then:

docker compose up -d

The web UI is at http://<this-host>:9696. Pulse generates an API key on first run; find it in Settings → System. Each app connects with its *_PULSE_URL (this Pulse's address) and *_PULSE_API_KEY settings, plus ADVERTISE_HOST so Pulse can reach the app back.

Running it with the other Beacon apps

Each app ships its own compose file; run the ones you want and connect them. beaconstack.io has larger examples, from Pilot + Haul up to the full stack with Pulse and a VPN.

Build from source

Requires Go 1.25+ and Node.js 22+.

git clone https://github.com/beacon-stack/pulse
cd pulse
cd web/ui && npm ci && npm run build && cd ../..
make build
./bin/pulse

Configuration

Pulse works with zero configuration. All settings are editable through the web UI or via environment variables.

Key environment variables

Variable Default Description
PULSE_SERVER_HOST 0.0.0.0 Bind address
PULSE_SERVER_PORT 9696 HTTP port
PULSE_DATABASE_PATH /config/pulse.db SQLite database file
PULSE_AUTH_API_KEY auto-generated API key for external access
PULSE_SERVER_EXTERNAL_URL http://localhost:9696 Address apps use to reach Pulse; it goes into the indexer URLs Pulse hands out. Set it to this host's IP or DNS name.
PULSE_LOG_LEVEL info debug, info, warn, error
PULSE_LOG_FORMAT json json or text

Config file

Pulse looks for config.yaml in /config/config.yaml, ~/.config/pulse/config.yaml, /etc/pulse/config.yaml, or ./config.yaml (in that order).

Using the SDK

Any Go service can integrate with Pulse using pkg/sdk:

import "github.com/beacon-stack/pulse/pkg/sdk"

client, err := sdk.New(sdk.Config{
    PulseURL:     "http://pulse:9696",
    APIKey:       "your-api-key",
    ServiceName:  "pilot",
    ServiceType:  "media-manager",
    APIURL:       "http://pilot:8383",
    Capabilities: []string{"supports_torrent", "supports_usenet"},
})
defer client.Close()

// Discover download clients
downloaders, _ := client.DiscoverByType(ctx, "download-client")

// Read shared config
root, _ := client.GetConfig(ctx, "media", "library_root")

// Get indexers assigned to this service
indexers, _ := client.MyIndexers(ctx)

// Subscribe to config changes — callback fires on WebSocket events
client.Subscribe(ctx, "media", func(ns, key, value string) {
    // ...
})

Where Pulse fits in the Beacon stack

                   ┌─────────────┐
                   │    Pulse    │
                   │  (registry, │
                   │   indexers, │
                   │  profiles,  │
                   │   shared    │
                   │    config)  │
                   └──┬───┬───┬──┘
          registers ──┘   │   └── registers
          + pulls         │       + pulls
               ┌──────────┴──────────┐
          ┌────▼────┐           ┌────▼────┐
          │  Pilot  │           │  Prism  │
          │  (TV)   │           │ (Movies)│
          └────┬────┘           └────┬────┘
               │                     │
               └──────────┬──────────┘
                          ▼
                     ┌─────────┐
                     │  Haul   │
                     │  (BT)   │
                     └─────────┘

Pilot and Prism both register with Pulse and pull their indexers, quality profiles, and shared settings from it. Haul registers too, so Pulse can show its health and send notifications on its behalf.

Access and login

By default Pulse needs no login: devices on your local network get in, and connections from anywhere else are refused. You can change that in Settings → App Settings → Security:

  • None (default): the local network only, no login.
  • Login, except on my local network: anyone outside it needs the username and password.
  • Login for everyone.

"Local" means the private address ranges (192.168.x.x, 10.x.x.x, 172.16–31.x.x). If your network uses other addresses, or Pulse sees a different address for your devices (some VPNs and container setups), add the range in the same place or set PULSE_AUTH_LOCAL_NETWORKS (comma-separated). The settings page shows the address Pulse sees for you.

No login is only safe while Pulse can't be reached from the internet. If you forward a port or publish it through a proxy, choose a login.

Scripts and the other Beacon apps use the API key, which works whichever option is chosen. If you open Pulse through your own domain name without a login, list the name in PULSE_SERVER_ALLOWED_HOSTS.

Privacy

Pulse collects nothing: no telemetry, no analytics, no crash reporting. It connects to:

  • the indexer sites you add, to search and test them, through your VPN container and FlareSolverr if you set those up;
  • GitHub, at start and once a day, to fetch the Prowlarr indexer definitions the catalog is built from, and when you press Check for updates;
  • your download clients and the apps registered with it, to check they're up and send them their settings;
  • your notification channels (Discord, Slack, Telegram, ntfy, Pushover, Gotify, email or another app's URL), if you set them up.

Your browser also loads the interface fonts from Google Fonts. API keys and indexer credentials are stored in your local database only.

Project structure

cmd/pulse/                Entry point
pkg/                      Packages the other apps import: sdk, notify, healthcheck, log
internal/
  api/                    HTTP router, middleware, v1 handlers, WebSocket hub
  core/
    registry/             Service registration & discovery
    sharedsettings/       Settings shared with the apps
    qualityprofile/       Quality profiles and their sync to the apps
    indexer/              Indexer management, catalog, tester, auto-assign
    downloadclient/       Download client configs
    health/               Health-check poller
    gluetun/              VPN status and controls
    dashboard/            Dashboard data
    tag/                  Tag management
  db/                     Migrations and generated query code (sqlc)
  events/                 In-process event bus
  scraper/                Runs indexer definitions against sites
  torznab/                The Torznab feed the apps search through
  sitenet/                Outbound requests to indexer sites
  config/                 App configuration (Viper)
web/
  embed.go                Go embed for serving the SPA
  static/                 Built frontend assets
  ui/                     React 19 + TypeScript + Vite source

Development

make build         # compile binary to bin/pulse
make run           # build + run
make dev           # hot reload with air
make test          # go test ./...
make check         # lint, dead-code checks, tests, frontend build
make sqlc          # regenerate database code after changing SQL

Contributing

Bug reports, feature requests, and pull requests are welcome. Please open an issue before starting large changes.

License

MIT

Directories

Path Synopsis
cmd
pulse command
internal
api
api/ws
Package ws implements a WebSocket hub that bridges the internal event bus to connected clients (both browser and service consumers).
Package ws implements a WebSocket hub that bridges the internal event bus to connected clients (both browser and service consumers).
core/dashboard
Package dashboard aggregates per-service health, container resource usage, and VPN status into a single payload for Pulse's UI dashboard.
Package dashboard aggregates per-service health, container resource usage, and VPN status into a single payload for Pulse's UI dashboard.
core/dockerstats
Package dockerstats provides a thin client over the Docker Engine API for reading per-container resource statistics.
Package dockerstats provides a thin client over the Docker Engine API for reading per-container resource statistics.
core/gluetun
Package gluetun provides a thin HTTP client for the Gluetun container's control server (https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md).
Package gluetun provides a thin HTTP client for the Gluetun container's control server (https://github.com/qdm12/gluetun-wiki/blob/main/setup/advanced/control-server.md).
core/indexerprobe
Package indexerprobe tests indexers from the catalog that have not been added, so the add-indexer page can recommend ones that work.
Package indexerprobe tests indexers from the catalog that have not been added, so the add-indexer page can recommend ones that work.
core/qualityprofile
Package qualityprofile manages centralized quality profiles that are distributed to media-manager services (Prism, Pilot) via their sync loops.
Package qualityprofile manages centralized quality profiles that are distributed to media-manager services (Prism, Pilot) via their sync loops.
core/sharedsettings
Package sharedsettings manages the single-row shared_media_handling table.
Package sharedsettings manages the single-row shared_media_handling table.
db
scraper
Package scraper implements a Cardigann-compatible scraping engine that executes Prowlarr YAML indexer definitions to scrape tracker websites and return structured search results.
Package scraper implements a Cardigann-compatible scraping engine that executes Prowlarr YAML indexer definitions to scrape tracker websites and return structured search results.
sitenet
Package sitenet is the network path Pulse uses to reach indexer sites: searches, .torrent downloads and connection tests.
Package sitenet is the network path Pulse uses to reach indexer sites: searches, .torrent downloads and connection tests.
torznab
Package torznab implements Torznab/Newznab XML protocol types.
Package torznab implements Torznab/Newznab XML protocol types.
updatecheck
Package updatecheck tells a Beacon app whether a newer image of it has been published.
Package updatecheck tells a Beacon app whether a newer image of it has been published.
pkg
auth
Package auth decides who may use a Beacon app.
Package auth decides who may use a Beacon app.
auth/authapi
Package authapi is the login settings API, the same in every Beacon app.
Package authapi is the login settings API, the same in every Beacon app.
healthcheck
Package healthcheck lets a Beacon app check its own health from inside its container, so images need no shell or wget.
Package healthcheck lets a Beacon app check its own health from inside its container, so images need no shell or wget.
log
Package log is the shared logging foundation for the Beacon ecosystem.
Package log is the shared logging foundation for the Beacon ecosystem.
log/plugins/file
Package file is a simple log-to-disk plugin with size-based rotation.
Package file is a simple log-to-disk plugin with size-based rotation.
log/plugins/loki
Package loki ships Beacon logs to a Grafana Loki instance via /loki/api/v1/push.
Package loki ships Beacon logs to a Grafana Loki instance via /loki/api/v1/push.
notify
Package notify sends Beacon notifications to Discord, Slack, Telegram, ntfy, Pushover, Gotify, email and webhooks.
Package notify sends Beacon notifications to Discord, Slack, Telegram, ntfy, Pushover, Gotify, email and webhooks.
notify/notifyapi
Package notifyapi is the notifications settings API, the same in every Beacon app: channels, test sends, routing and the recent list.
Package notifyapi is the notifications settings API, the same in every Beacon app: channels, test sends, routing and the recent list.
sdk
Package sdk provides a Go client for ecosystem services to register with Pulse, send heartbeats, discover peers, and pull managed resources (indexers, download clients, quality profiles, shared settings).
Package sdk provides a Go client for ecosystem services to register with Pulse, send heartbeats, discover peers, and pull managed resources (indexers, download clients, quality profiles, shared settings).
secretfile
Package secretfile resolves values from files mounted as Docker secrets.
Package secretfile resolves values from files mounted as Docker secrets.
tools
releasenotes command
Command releasenotes writes the notes for a GitHub release from the git history between two tags.
Command releasenotes writes the notes for a GitHub release from the git history between two tags.
Package web serves the embedded Pulse web UI.
Package web serves the embedded Pulse web UI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL