Skip to content
diegodella1Public

About

Live Bitcoin price, fiat embeds, and stream overlays hosted on Raspberry Pi

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

97 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PRICEB.TC

Live Bitcoin price, fiat conversion, website embeds, and OBS/Streamlabs overlays. Self-hosted on a Raspberry Pi behind Cloudflare Tunnel.

Product

  • Coinbase BTC/USD ticker over one upstream WebSocket.
  • Server-Sent Events fan-out at most once per second.
  • Indicative fiat conversion from ExchangeRate-API with an atomic disk cache.
  • Coinbase line history for 1h, 24h, and 7d.
  • Six URL-configured embed/overlay layouts; no accounts or database.
  • English UI with a permanent PRICEB.TC signature.
  • Pre-rendered Home and Studio documents, route-specific metadata, JSON-LD, sitemap, and llms.txt.

Develop

Requirements: Node.js 22+, npm 10+, and Chromium for browser tests.

rtk npm install
rtk npm run dev

Frontend runs on http://127.0.0.1:5173; Vite proxies APIs to Fastify on port 3466.

Quality gate:

rtk npm run check
rtk npm run e2e

Sats Bid

Daily paid participation is implemented as an optional module with PostgreSQL, a separate verification worker, mock payments and a BTCPay adapter. It adds a Top Spot beside the BTC price, public rankings/history, participation and an operator console. UI and invoice creation are off by default. Real Lightning payments have not been verified on an operator's store; do not enable production bidding yet.

See Sats Bid setup, architecture and operations for reproducible local commands, API paths, configuration, verification evidence and launch requirements. Use npm run build:preview on a running installation: ordinary npm run build replaces the active dist assets.

Market interfaces

  • GET /api/stream?currency=USD — SSE events named price and status.
  • GET /api/price?currency=USD — current converted snapshot.
  • GET /api/history?currency=USD&range=24h — converted line points.
  • GET /api/currencies — supported metadata, never raw exchange rates.
  • GET /healthz — market, FX, stream, and process health.
  • /embed?... and /overlay?... — stable versioned renderers.

Widget parameters: v, currency, layout, theme, accent, text, surface, font, scale, background, change, chart, range, and motion. Values are allowlisted; arbitrary CSS/HTML is never accepted.

Deploy

Build, test, install the hardened systemd unit, and start the local service:

rtk bash scripts/deploy_release.sh

Configure and validate the existing named Cloudflare Tunnel ingress:

rtk bash scripts/configure_cloudflared.sh

In Cloudflare, onboard priceb.tc as a full zone and confirm its assigned nameservers are aragorn.ns.cloudflare.com and reza.ns.cloudflare.com. Then add these proxied records:

Type Name Target
CNAME @ 55ecc138-2b04-4678-b3cf-5460da1aa1ff.cfargotunnel.com
CNAME www 55ecc138-2b04-4678-b3cf-5460da1aa1ff.cfargotunnel.com

The script deliberately does not create DNS records: this Raspberry Pi's existing cert.pem is scoped to another zone, so using cloudflared tunnel route dns here could create a relative record in that zone.

Run public smoke checks after DNS resolves:

rtk bash scripts/smoke-production.sh

See operations runbook for verification and rollback.

Static hosting / FreeHosting

Build the browser-only edition with:

rtk npm run build:static

Upload the contents of pricebtc-freehosting/ to the hosting document root. It contains physical studio/, embed/, and overlay/ routes, a static 404, SEO/AEO discovery files, and needs no Node.js process. Market data comes directly from Coinbase in the browser; fiat rates come from the ExchangeRate-API open endpoint.

Data notice

BTC/USD is the latest Coinbase Exchange trade. Other currencies use indicative daily FX conversion and may differ from locally available rates. Data is informational, not financial advice. FX attribution: ExchangeRate-API.

Inquiries: contact@foreign.rodeo.

About

Live Bitcoin price, fiat embeds, and stream overlays hosted on Raspberry Pi

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages