Quickstart: Seeded Template
The sibling GitHub template repo, local path ../emdash-mika-template, is the fastest source-backed first success path. It is a host Astro app that wires the local Mika package, fixture commerce data, copied storefront files, admin action fields, and agent-readable metadata.
Use this quickstart to see the complete shape before copying files into another app.
Prerequisites
Section titled “Prerequisites”Use Node >=22.13.0 for the template. It depends on the sibling Mika package through file:../emdash-mika, so lifecycle scripts rebuild Mika locally before dev, build, preview, typecheck, test, and seed commands.
cd ../emdash-mika-templatenpm installnpm run fixture:resetnpm run devnpm run fixture:reset resets the local template fixture state under .emdash/; run it only when you want the smoke app returned to seeded data. A published template should replace the local Mika path with a released npm version.
Expected state after npm run dev: Astro starts the template app, the local Mika package has been rebuilt by the template lifecycle script, and the storefront paths below resolve from the host app.
Smoke The Browser Paths
Section titled “Smoke The Browser Paths”After npm run dev starts, open these paths in the template app:
/for product listing./products/mira-field-clipboardfor a product page./products/thirdbase-team-pennantsfor printable stock-state fixtures./products/junie-sidewalk-zine-kitfor zine-kit stock and cart fixtures./products/buttonwood-creator-bundlefor download, subscription, license, and stock-state fixtures./?category=creator-toolsor/?category=paper-goods&tag=printablesfor homepage category/tag filters./cart,/wishlist,/account, and/account/magic-linkfor customer flows./checkout/success?checkoutId=checkout_buttonwood_1001for a seeded checkout return./download/download_panel_pack_mirafor the seeded-repo download fixture; see Template Fixture Route./llms.txtand/.well-known/mika-agent.jsonfor agent-readable storefront metadata./_emdash/adminfor the EmDash admin UI./api/mika-action-contract.jsonfor the admin action provider contract.
Template-Only Files
Section titled “Template-Only Files”The seeded repo is not just a copy of ../emdash-mika/src/templates/astro/**. It adds host-app files that prove the integration:
| File | Purpose |
|---|---|
src/pages/products/[slug].astro |
Host product page that loads fixture product content and renders copied Mika purchase components. |
src/lib/mika-api.ts |
Host API entrypoint that combines fixture storefront overrides with admin/testbed behavior. |
src/lib/mika-fixture-storefront.ts |
Fixture catalog, cart, wishlist, account, checkout, and download behavior for smoke flows. |
src/plugins/mika-template-plugin.ts |
Native plugin entrypoint used when function overrides cannot be serialized through descriptor options. |
src/emdash/mika-action-fields.ts |
EmDash field-button wiring for Mika admin actions. |
src/pages/api/mika-action-contract.json.ts |
Readback endpoint for the admin action provider contract. |
Use those files to learn the shape of a host integration. Do not copy testbed fixture behavior into production unless you are intentionally building a fixture app.
Run The Template Checks
Section titled “Run The Template Checks”The seeded GitHub template repo should pass:
npm run typechecknpm run testnpm run buildExpected result: all three commands exit successfully.
Next: Install shows how to wire Mika into a separate Astro + EmDash app. First Product Page explains the same boundary in the smallest manual host route.
Source Anchors
Section titled “Source Anchors”- ⓣ
../emdash-mika-template/README.md - ⓣ
../emdash-mika-template/package.json - ⓣ
../emdash-mika-template/docs/testbed.md - ⓣ
../emdash-mika-template/docs/usage.md - ⓣ
../emdash-mika-template/src/pages/index.astro - ⓣ
../emdash-mika-template/src/pages/products/[slug].astro - ⓣ
../emdash-mika-template/src/lib/mika-api.ts - ⓣ
../emdash-mika-template/src/lib/mika-fixture-storefront.ts - ⓣ
../emdash-mika-template/src/plugins/mika-template-plugin.ts - ⓣ
../emdash-mika-template/src/emdash/mika-action-fields.ts - ⓣ
../emdash-mika-template/src/pages/api/mika-action-contract.json.ts