Fixture Testbed
The ⓣ seeded GitHub template repo provides resettable storefront and admin data.
It includes products, stock items, checkout sessions, customers, orders, entitlements, downloads, licenses, emails, and webhooks.
Admin collections expose action buttons for catalog sync, stock adjustment, entitlement grants/revokes, order refunds/cancels, webhook replay, email resend, license revoke, and download issue.
Do not use fixture behavior in production; use it to inspect shape and smoke flows.
Reset fixtures with:
npm run fixture:resetStop the template dev server before a full reset. The reset script removes local SQLite files and reapplies seed/mika-actions.seed.json.
What Is Fixture-Only
Section titled “What Is Fixture-Only”The fixture API is deliberately local and seeded. It proves Mika contracts without standing up a real payment provider or production persistence layer.
| Fixture file | What to learn from it |
|---|---|
src/lib/mika-fixture-storefront.ts |
Shape of MikaApiOverrides for catalog, cart, wishlist, checkout, account, and downloads. |
src/lib/mika-api.ts |
How a host can compose storefront overrides and admin operations behind one API object. |
seed/mika-actions.seed.json |
Example EmDash content/JSON fields for products, stock, orders, licenses, entitlements, emails, and webhooks. |
src/pages/api/mika-action-contract.json.ts |
Read-only JSON readback of the Mika admin action provider config and manifest. |
.emdash/mika-template.sqlite |
Local SQLite state used by the smoke app; not a package API. |
Production integrations should replace fixture overrides with durable repositories, provider adapters, verified webhooks, and real email delivery.
Current fixture smoke behavior also covers homepage category/tag filters, the BUTTONWOOD10 coupon, cart and wishlist merge from sourceSessionId, checkout status token checks outside the owning session, buy-now preview totals matching checkout start, and cart.update quantity clamping to availability. Those are fixture-backed contract examples, not production storage or provider implementations.
The fixture webhook route preserves provider metadata, signature-header presence, and raw-body hash/length for smoke tests. It does not verify real provider signatures or implement a production adapter.
Next: Quickstart: Seeded Template runs the fixture app. Admin Actions explains the action provider wiring.
Source Anchors
Section titled “Source Anchors”- ⓣ
../emdash-mika-template/docs/testbed.md - ⓣ
../emdash-mika-template/docs/usage.md - ⓣ
../emdash-mika-template/src/lib/mika-api.ts - ⓣ
../emdash-mika-template/src/lib/mika-fixture-storefront.ts - ⓣ
../emdash-mika-template/src/pages/api/mika-action-contract.json.ts - ⓣ
../emdash-mika-template/test/mika-api.test.ts - ⓣ
../emdash-mika-template/seed/mika-actions.seed.json