[ case study · the lab ]

A dashboard with no backend

DuckDB 2.0 runs inside the visitor's browser and queries 250,000 rows of synthetic AI-usage data. No server, no API, no database to host — and every number on the page shows the SQL that produced it.

DuckDB 2.0 WebAssembly Parquet ECharts Claude Code

November 2026 · synthetic data throughout

$ open_the_dashboard → ./work_with_me

The problem

A firm running its own language models on its own hardware still wants the ordinary management answers: who is using them, for what, how fast, and what it costs. The catch is that the usage log is the single file they are least willing to hand to someone else's cloud.

That makes the thing hard to demonstrate. The usual analytics demo needs a warehouse, credentials and a monthly bill, so it can't just be published on a website for a stranger to open. I wanted a version with nothing behind it — one a visitor could open, poke at, and check for themselves.

What I built

The dashboard: filters for date range, model, use case and department above eight KPI tiles reading 250,407 requests, 60 active users, 620.5M tokens, $1,700 internal cost, 8.10 s median latency, 33.1 s p95, 1.11% error rate and 79.6% thumbs-up, with a requests-per-day chart below marking the GPU node incident.
  • Twelve months of synthetic usage for a fictional 60-person advisory firm: 250,407 requests across five locally hosted models, six departments and six use cases.
  • Every KPI, chart and table is a SQL query DuckDB runs in the browser against Parquet files. Nothing is precomputed into JSON, so the filters are real queries, not filtered arrays.
  • Show SQL under every panel prints the exact statement that produced it, how long it took, and a preview of the rows that came back.
  • A read-only SQL box lets a visitor write their own query — including against the JSON meta column, whose shape varies by use case. It is capped at 1,000 rows and ten seconds.

The data has things in it on purpose, so there is something to find: a week in March where a GPU node degrades and p95 latency triples, one model whose error rate climbs through June after a bad upgrade, and thumbs-up rates that fall as responses get slower.

How it was built

The spec came first. Before any code I wrote out the scenario, the tables and their columns, the patterns the data had to contain, the panels, the performance budget and the constraints — no backend, no paid service, no analytics tracker. Claude Code built from that spec; the parts I kept for myself were the spec, the version pinning and the verification.

The generator is deterministic. A Python script with a fixed seed writes the four Parquet files, and two runs produce byte-identical output. The weekday peaks, the holiday dips, the adoption ramp and the incident are all planted by that script, so anyone can regenerate the exact dataset the dashboard is showing.

The version check was not a formality. DuckDB 2.0 shipped a new storage format, and at build time the latest tag of the browser build still embedded a pre-2.0 engine. Pinning "the newest one" would have quietly shipped the wrong core. The build I use is pinned exactly, and because it identifies itself as a development build, DuckDB's extension autoloader looks for a folder that does not exist — so the Parquet and JSON readers are loaded by hand from a fixed, official URL instead.

Then the database locks itself. Once the data is loaded the page runs SET enable_external_access = false and SET lock_configuration = true. After that nothing on the page — the SQL box included — can fetch or load anything. "Nothing leaves your browser" is something the engine enforces, not a promise in a footer.

The single-threaded WebAssembly bundle is used deliberately, so the page needs no special cross-origin isolation headers and will drop onto any static host. Charts are Apache ECharts. There is no build step: the deliverable is plain HTML, CSS and ES modules.

What I learned

The browser is a far better analytics engine than its reputation suggests — a quarter of a million rows is nothing, and filtering the whole year re-runs real SQL fast enough that it feels local, because it is. What actually costs the visitor is the download, not the compute: the WebAssembly engine and the Parquet files dwarf every query on the page. That flips the usual optimisation instinct. I spent my time on what loads first and in what order, and almost none on making the SQL faster.

The other lesson was duller and more useful. The one decision that could have invalidated the whole exercise — which DuckDB the browser build actually contains — was a thing no amount of careful coding would have caught, only checking. Reproducibility is mostly made of boring verifications like that one.

Want something like this for your team?

A short plan back within 2 business days: problem, approach, deliverables, price, timeline.

$ request_proposal → ./open_the_dashboard