FiberMeter demo walkthrough
FiberMeter is reusable Fiber Network infrastructure for prepaid balances, service
metering, payment tracking, ledgering, and signed webhooks.
What is working
- API — Express + Prisma, seed data, simulated Fiber payment requests, usage
charging, insufficient-balance handling, append-only ledger entries, and webhook
delivery records.
- Dashboard — polished React app covering services, pricing rules, customers,
balances, payment requests, usage events, webhooks, and a developer quickstart.
Runs against the live API (JWT) or a fully in-browser demo engine.
- Demo Service — an AI Summary API that meters usage through FiberMeter.
- SDK — TypeScript SDK; Docker PostgreSQL setup.
Payment modes
The zero-setup walkthrough uses SimulatedFiberPaymentProvider, generating
fiber-sim:// URIs and exposing Simulate Paid. The hosted live walkthrough
uses LiveFiberPaymentProvider to create real fibt1... invoices; an independent
payer node settles them, and FiberMeter credits the balance only after Fiber RPC
confirms payment. See 08-fiber-integration.md.
Two ways to demo
- Live — run the API (
pnpm dev after seeding) and sign in at the dashboard
with demo@fibermeter.dev / password123. Everything reads/writes PostgreSQL.
- Demo (no backend) —
pnpm --filter @fibermeter/dashboard dev, then click
Explore in demo mode. The whole flow runs client-side for offline product
exploration.
The header badge always shows Live vs Demo.
Guided product flow
- Open the dashboard. Note the mode badge (Live or Demo).
- Overview — stat cards: funded, usage charged, customers, usage events.
- Services — open AI Summary API; show the pricing rule 10 CKB per 1,000
tokens and copy the service slug.
- Customers — Ada Demo (
cus_demo_001) with a 100 CKB balance.
- Quickstart — create an API key; copy it once.
- Open the standalone Demo Service at
https://demo.fibermeter.toneflix.net.
- Paste text and click Summarize → usage is recorded.
- FiberMeter calculates the charge and deducts the balance.
- Back on Usage Events, the charge appears (filter by status = charged).
- Webhooks — expand the
usage.charged delivery payload.
- In the demo app, submit a very large text that exceeds the balance.
- See the insufficient balance / payment required response.
- Payment Requests — create a request for the customer; copy the payment URI.
- Click Simulate Paid (the simulated Fiber payment).
- The balance is funded and a ledger entry records the credit.
- Retry the summary → it now succeeds.
Production hardening
Further hardening includes queue-backed webhook retries, balance reconciliation,
rate limits, operational audit logs, managed secrets, and production
observability. See ROADMAP.md.