Astro Template Files
Use @bnomei/emdash-mika/templates/astro/* as ⓐ copyable source material from the core package repo.
These are ordinary files for the host app to own after copying. Keep localization, routes, auth, provider credentials, tax, shipping, and deployment in the host app. New copies use form helpers from @bnomei/emdash-mika/astro; lib/form.ts is a compatibility shim, not a required copy path.
Do not confuse these ⓐ copyable Astro template files with the ⓣ seeded GitHub template repo, which is a runnable smoke-test app.
The template README is an orientation document. When the README and source tree differ, use the actual files under ../emdash-mika/src/templates/astro/** and the ./templates/astro/* package export as the source of truth.
When copying files, preserve this distinction:
- copied Astro pages and endpoints are host-owned;
- Astro Actions are browser form mutation surfaces;
- EmDash plugin JSON routes are server/plugin contracts;
- agent manifests are descriptors, not protected tool grants.
Minimum product page copy set:
| Group | Files |
|---|---|
| Actions | actions/index.ts, actions/mika.ts |
| Product UI | ProductPurchase.astro, ProductPurchaseSync.astro, add-to-cart/buy-now/wishlist/variant/stock components |
| Metadata | ProductStructuredData.astro |
| Support | styles/kumo.css, MikaKumoAppFrame.tsx, MikaKumoPage.astro, lib/routes.ts, lib/display.ts, lib/cart.ts |
Copy cart, checkout, account, download, webhook, and metadata pages only when those routes are part of the host app.
Support Files
Section titled “Support Files”Copied pages are not all standalone. Full storefront pages commonly depend on these support files:
| File | Purpose |
|---|---|
lib/routes.ts |
Template route constants for cart, checkout, account, products, and downloads. |
lib/display.ts |
Template formatting helpers such as pluralized counts. |
lib/cart.ts |
Cart display helpers used by cart summary/line components. |
lib/account.ts |
Account projection helpers for orders, subscriptions, licenses, and downloads. |
styles/kumo.css |
Kumo standalone stylesheet import and template CSS hooks. |
lib/form.ts remains only for older copies. New templates import form helpers from @bnomei/emdash-mika/astro.
Exact Copy Matrix
Section titled “Exact Copy Matrix”Use this matrix when starting from the package template export:
| Source package file | Host destination | Required by |
|---|---|---|
templates/astro/actions/index.ts |
src/actions/index.ts |
Astro action registration. |
templates/astro/actions/mika.ts |
src/actions/mika.ts |
Re-exported Mika action factory. |
templates/astro/styles/kumo.css |
src/styles/kumo.css or host stylesheet |
Kumo-backed copied UI. |
templates/astro/components/MikaKumoAppFrame.tsx |
src/components/MikaKumoAppFrame.tsx |
Template page shell. |
templates/astro/components/MikaKumoPage.astro |
src/components/MikaKumoPage.astro |
Template page shell. |
templates/astro/components/ProductPurchase.astro |
src/components/ProductPurchase.astro |
Product page purchase panel. |
templates/astro/components/ProductPurchaseSync.astro |
src/components/ProductPurchaseSync.astro |
Multi-option product purchase sync script. |
templates/astro/components/AddToCartForm.astro |
src/components/AddToCartForm.astro |
Product and cart form flows. |
templates/astro/components/AddToCartFormSync.astro |
src/components/AddToCartFormSync.astro |
Grouped variant add-to-cart sync script. |
templates/astro/components/BuyNowForm.astro |
src/components/BuyNowForm.astro |
Product buy-now checkout start. |
templates/astro/components/WishlistForm.astro |
src/components/WishlistForm.astro |
Product wishlist add. |
templates/astro/components/VariantOptionGroups.astro |
src/components/VariantOptionGroups.astro |
Grouped variant controls. |
templates/astro/components/VariantSelector.astro |
src/components/VariantSelector.astro |
Fallback sellable selector. |
templates/astro/components/StockBadge.astro |
src/components/StockBadge.astro |
Product/cart availability display. |
templates/astro/components/LowStockNotice.astro |
src/components/LowStockNotice.astro |
Product/cart availability display. |
templates/astro/components/UnavailableNotice.astro |
src/components/UnavailableNotice.astro |
Product/cart availability display. |
templates/astro/components/ProductStructuredData.astro |
src/components/ProductStructuredData.astro |
Product JSON-LD. |
templates/astro/components/CartLines.astro |
src/components/CartLines.astro |
Cart page line-item rendering. |
templates/astro/components/CartSummary.astro |
src/components/CartSummary.astro |
Cart totals and checkout-start controls. |
templates/astro/components/CouponForm.astro |
src/components/CouponForm.astro |
Cart coupon add/remove flows. |
templates/astro/components/CheckoutForm.astro |
src/components/CheckoutForm.astro |
Cart checkout-start form flow. |
templates/astro/components/WishlistList.astro |
src/components/WishlistList.astro |
Wishlist page and move/save-for-later controls. |
templates/astro/components/MagicLinkForm.astro |
src/components/MagicLinkForm.astro |
Account sign-in magic-link request. |
templates/astro/components/AccountSignInPanel.astro |
src/components/AccountSignInPanel.astro |
Account pages that need signed-in state. |
templates/astro/components/AccountOrders.astro |
src/components/AccountOrders.astro |
Account order history and invoice links. |
templates/astro/components/AccountSubscriptions.astro |
src/components/AccountSubscriptions.astro |
Account subscription actions. |
templates/astro/components/AccountLicenses.astro |
src/components/AccountLicenses.astro |
Template license display rows. |
templates/astro/components/AccountDownloads.astro |
src/components/AccountDownloads.astro |
Account download links. |
templates/astro/lib/routes.ts |
src/lib/routes.ts |
Copied pages and checkout forms. |
templates/astro/lib/display.ts |
src/lib/display.ts |
Copied pages and account/cart components. |
templates/astro/lib/cart.ts |
src/lib/cart.ts |
Product/cart item counts. |
templates/astro/lib/account.ts |
src/lib/account.ts |
Account pages and account components. |
templates/astro/lib/form.ts |
src/lib/form.ts |
Legacy compatibility only; new copies use @bnomei/emdash-mika/astro helpers. |
Copy cart, wishlist, checkout, account, download, webhook, and metadata pages only when those routes are part of the host app.
Optional copied pages/endpoints:
templates/astro/pages/cart.astro -> src/pages/cart.astrotemplates/astro/pages/wishlist.astro -> src/pages/wishlist.astrotemplates/astro/pages/account.astro -> src/pages/account.astrotemplates/astro/pages/account/orders.astro -> src/pages/account/orders.astrotemplates/astro/pages/account/subscriptions.astro -> src/pages/account/subscriptions.astrotemplates/astro/pages/account/licenses.astro -> src/pages/account/licenses.astrotemplates/astro/pages/account/downloads.astro -> src/pages/account/downloads.astrotemplates/astro/pages/account/magic-link.astro -> src/pages/account/magic-link.astrotemplates/astro/pages/checkout/success.astro -> src/pages/checkout/success.astrotemplates/astro/pages/checkout/cancel.astro -> src/pages/checkout/cancel.astrotemplates/astro/pages/download/[token].astro -> src/pages/download/[token].astrotemplates/astro/pages/api/mika-webhook/[provider].ts -> src/pages/api/mika-webhook/[provider].tstemplates/astro/pages/llms.txt.ts -> src/pages/llms.txt.tstemplates/astro/pages/.well-known/mika-agent.json.ts -> src/pages/.well-known/mika-agent.json.tsExternal References
Section titled “External References”- Astro routing reference for how copied files under
src/pages/become host routes. - Astro on-demand rendering for request-bound copied pages.
Source Anchors
Section titled “Source Anchors”- ⓟ
../emdash-mika/package.json - ⓐ
../emdash-mika/src/templates/astro/README.md - ⓐ
../emdash-mika/src/templates/astro/actions/index.ts - ⓐ
../emdash-mika/src/templates/astro/actions/mika.ts - ⓐ
../emdash-mika/src/templates/astro/lib/routes.ts - ⓐ
../emdash-mika/src/templates/astro/lib/display.ts - ⓐ
../emdash-mika/src/templates/astro/lib/cart.ts - ⓐ
../emdash-mika/src/templates/astro/lib/account.ts - ⓐ
../emdash-mika/src/templates/astro/components/ProductPurchase.astro - ⓐ
../emdash-mika/src/templates/astro/components/AddToCartForm.astro - ⓐ
../emdash-mika/src/templates/astro/components/CartSummary.astro - ⓐ
../emdash-mika/src/templates/astro/components/CheckoutForm.astro - ⓐ
../emdash-mika/src/templates/astro/components/WishlistList.astro - ⓐ
../emdash-mika/src/templates/astro/components/AccountDownloads.astro - ⓐ
../emdash-mika/src/templates/astro/pages/api/mika-webhook/[provider].ts - ⓐ
../emdash-mika/src/templates/astro/pages/download/[token].astro - ⓐ
../emdash-mika/src/templates/astro/pages/llms.txt.ts - ⓐ
../emdash-mika/src/templates/astro/pages/.well-known/mika-agent.json.ts