← All writing
tech2026-06-13engineeringproduct

Build the demo before you have the keys

A demo that needs a live API key is a demo that will eventually break in front of the wrong person.

Nobody clicking your project link in six months is going to paste in an API key. If the demo calls a live model on load, the first thing they see is an error, or a bill you forgot to cap.

So I build mock-first. Every app has a runner with two implementations behind one interface.

  • No key set: return synthetic but realistic output with a bit of fake latency. No keys, no database, no cost.
  • Key set: the same interface swaps in the real model.

Three things fall out of this. The hosted demo always works. CI is free and deterministic, because it never depends on a paid call. And the real integration stays a clean, swappable boundary instead of getting smeared through the code.

The cost is that you have to design the output contract first and treat the model as one way of satisfying it. That's just good engineering, so it isn't really a cost.