Skip to content
07Free course · Lesson 7 of 12 · 5 min

Mocks and demo data: building without paid API keys

A mock is a fake version of an API that answers like the real one. With mocks, anyone can run and change an app before a single paid key is shared.

Roman Urdu: Mock ek nakli API ha jo asli jaisa jawab deti ha. Is se app bina paid keys ke chal jati ha, aur koi paisa kharch nahi hota.

Why mock

  • New contributors can start in minutes instead of waiting for access.
  • Nobody burns your credits while experimenting.
  • Tests run the same way every time, offline.

Stateful mocks

A simple mock returns the same canned answer. A stateful mock remembers: create a customer, then list customers, and it is there. That is enough to click through most of an app. LogicPacks starts a local stateful mock with demo data for every key you do not have.

Many providers also have a test mode (Stripe test keys, a separate staging Supabase project). Use those when you need the real behaviour, and share them through LogicPacks too.

Know the limits

A mock is not the real service. Before you ship, test the parts that matter against the real API or its test mode.

Try it

Clone one of our open-source apps with a pack and local mocks for its six AI keys (needs uv):

$ uvx logicpacks@latest add github.com/waleedsworld/ai-seo-tool --clone
$ cd ai-seo-tool && cat LOGICPACKS.md
$ ./lp-mock.sh &

Then run the app through ./lp-run.sh <command> with the run command listed in LOGICPACKS.md. The key table there shows which services are on mocks.