Skip to content

noblepayne/boostbridge

Repository files navigation

BoostBridge

A service that bridges Lightning bolt11 invoices to Podcasting 2.0 value-for-value payments.

BoostBridge allows a podcast listener to "boost" a show using a standard bolt11 invoice. Once paid, the service automatically calculates the podcast's value splits and distributes the funds. The initial implementation uses keysend payments, embedding the necessary Podcasting 2.0 metadata.

The project is in active development towards a Minimum Viable Product (MVP). The V1 implementation is designed for Jupiter Broadcasting, with hardcoded podcast feed configurations. Future versions will support arbitrary feeds.

Core Concepts

The application is built on a simple event sourcing model:

  1. Boost Request: A user submits a boost request via the API. An event is written to an immutable log.
  2. Invoice Generation: An event handler creates a bolt11 invoice and updates the boost's state.
  3. Payment & Distribution: A background process watches for paid invoices. Upon payment, it calculates the value splits and executes the value distribution to all recipients.

This design ensures that the payment process is durable and auditable. State is managed in a local Datalevin database.

Tech Stack

  • Language: Clojure
  • Web: Aleph (HTTP server) & Reitit (routing)
  • Database: Datalevin (Datalog for event log and views)
  • Lightning: Interacts with a Core Lightning (CLN) node via its REST API.
  • Environment: Managed entirely with Nix and devenv. The Clojure application packaging is handled by clj-nix.

Getting Started

This project uses Nix to provide a complete, reproducible development environment.

1. Prerequisites

  • An up-to-date Nix installation.
  • A running Core Lightning (CLN) node accessible from the application.

2. Clone and Configure

git clone https://github.com/noblepayne/boostbridge
cd boostbridge

Create a .env file in the project root to configure your CLN connection and other settings. See resources/config.edn for available options (environment variables override the EDN file).

Example .env:

BOOSTBRIDGE_CLN_HOST=192.168.1.100
BOOSTBRIDGE_CLN_PORT=8080
BOOSTBRIDGE_CLN_RUNE="your-cln-rune"

3. Enter Development Shell

The dev.sh script is a convenience wrapper that launches the Nix shell.

./dev.sh

This will download all dependencies (JVM, Clojure, etc.) and drop you into a shell with a pre-configured environment. It will also automatically launch VSCode with the recommended Calva extension. A REPL can be started with the repl command, and logs can be viewed with the logs command.

Roadmap & Docs

  • ARCHITECTURE.md: A detailed description of the system architecture and design decisions.
  • ROADMAP.md: The project roadmap and future goals.

License

This project is licensed under the MIT License. See the LICENSE file for details.