Stage 1 · Code
Building a Terminal Dashboard with Bubble Tea
Demo Data, Snapshot Replay, and Shipping It
Give the dashboard two ways to get its numbers — a simulated feed and a real snapshot file — then finish the project the way tasker finished: a README, a release, and proper credit.
One Interface, Two Sources
The spec from earlier promised two ways to run burnrate: demo, for an instant self-contained dashboard, and run --file, for replaying real per-minute counts from a JSON snapshot. Rather than branching all through internal/tui on "which mode am I in," both modes satisfy one small interface, and the model never needs to know which one it's talking to.
The Demo Feed
The demo source exists so that anyone can see burnrate working in ten seconds, with zero setup — no real service, no metrics backend, nothing to configure. It simulates realistic traffic on each Tick(), with an occasional deliberate spike so the "CRITICAL" badge from the styling lesson actually gets exercised.
The Snapshot Source
The second mode is the one that makes burnrate genuinely useful beyond a demo: replaying a fixed JSON file of real per-minute request/error counts, exported from wherever your actual metrics live.
Look back at tui.New(service, target, src, live) from the previous lesson: src is typed as data.Source, not *demoSource or *fileSource. That is the entire payoff of programming to an interface — the exact same Model, Update, and View code renders both a simulated feed and a real, replayed incident without a single if demo { ... } else { ... } branch inside the UI layer.
Shipping It — and Crediting Charm
Everything you already know from the capstone module about finishing a tool applies here unchanged: cross-compile releases for the platforms people actually use, write a README a stranger can follow, and tag a version. Reuse the exact Makefile pattern and cross-compile approach from module 8's cross-compile-releases lesson — the process doesn't change just because this tool happens to be interactive.
What is new here is the credit. Bubble Tea, Lip Gloss, and Bubbles are open-source libraries built by Charm, and this project would not exist in this form without them. burnrate's own --help output says so directly, and its README does too — not as a formality, but because giving credit to the tools and teams that make your work possible is simply the right thing to do, and it costs you nothing.
burnrate — a multi-window, multi-burn-rate SLO dashboard for your terminal
Usage:
burnrate demo [--service NAME] [--slo 99.9]
Run an instant live dashboard fed by simulated traffic. No setup
required — this is the fastest way to see how it works.
burnrate run --file snapshot.json [--service NAME] [--slo 99.9]
Render a fixed snapshot of real (or exported) per-minute request and
error counts. See testdata/sample.json for the expected file shape.
burnrate help
Show this message.
Built with Bubble Tea and Lip Gloss by Charm (https://charm.sh).This is the actual usage text burnrate prints. The last line is not decoration — it is an honest acknowledgment that this entire project stands on work Charm has open-sourced for the whole Go community to build on.
- Cross-compile for linux/amd64, darwin/arm64, and windows/amd64, exactly as in the capstone's release lesson.
- Write a README covering both modes (
demoandrun --file), the keybindings (qto quit,spaceto pause), and a short explanation of the burn-rate concept for anyone unfamiliar with it. - Credit Bubble Tea, Lip Gloss, and Bubbles by name, with a link to charm.sh, in both the README and the program's own help text.
- Tag a release the same way
taskerdid —git tag v0.1.0, then let the Makefile'sreleasetarget build every platform's binary from that tag.
That's the whole project: a pure, tested math package underneath, a clean data-source interface in the middle, and a Bubble Tea + Lip Gloss dashboard on top — built with the same scoping, testing, and shipping discipline as tasker, applied to a genuinely different, genuinely useful kind of tool.
Mark this lesson complete to store local progress and unlock a cleaner resume path the next time you visit.