Skip to content

Astro Template File Map

Mika ships ⓐ copyable Astro template files under @bnomei/emdash-mika/templates/astro/*. In the source repo those files live at ../emdash-mika/src/templates/astro/**; after package install, use the published templates/astro/* export path rather than importing from src.

This page maps files in the core package repo. It is not the ⓣ seeded GitHub template repo.

Copy these first for a product-page slice: actions/, styles/kumo.css, product purchase components, ProductStructuredData.astro, and the route/display helpers the copied components import.

Main directories:

Directory Copy destination Purpose
actions/ src/actions/ Astro action registration shim and default server.mika export.
components/ src/components/ Product, cart, wishlist, checkout, account, and structured-data UI components.
lib/ src/lib/ Template route/display/account helpers. lib/form.ts is legacy compatibility.
styles/ src/styles/ or app stylesheet location Kumo standalone or Tailwind-backed template styles.
pages/ src/pages/ Optional host-owned routes for cart, account, checkout returns, downloads, webhooks, and metadata.
examples/ Read-only source material Markdown setup narratives behind these docs.

These are examples and copy paths, not hidden routes owned by Mika. lib/form.ts is only a compatibility shim for older copies; new templates import hidden-input helpers from @bnomei/emdash-mika/astro.

Copy the product group first when you only need product pages:

  • Directoryactions/
    • index.ts
    • mika.ts
  • Directorystyles/
    • kumo.css
  • Directorycomponents/
    • MikaKumoAppFrame.tsx
    • MikaKumoPage.astro
    • ProductPurchase.astro
    • ProductPurchaseSync.astro
    • AddToCartForm.astro
    • AddToCartFormSync.astro
    • BuyNowForm.astro
    • WishlistForm.astro
    • VariantOptionGroups.astro
    • VariantSelector.astro
    • StockBadge.astro
    • LowStockNotice.astro
    • UnavailableNotice.astro
    • ProductStructuredData.astro

Copy the full storefront group when the host needs customer flows:

  • Directorycomponents/
    • CartLines.astro
    • CartSummary.astro
    • CouponForm.astro
    • CheckoutForm.astro
    • WishlistList.astro
    • MagicLinkForm.astro
    • AccountSignInPanel.astro
    • AccountOrders.astro
    • AccountSubscriptions.astro
    • AccountLicenses.astro
    • AccountDownloads.astro
  • Directorypages/
    • cart.astro
    • wishlist.astro
    • account.astro
    • Directoryaccount/
      • orders.astro
      • subscriptions.astro
      • licenses.astro
      • downloads.astro
      • magic-link.astro
    • Directorycheckout/
      • success.astro
      • cancel.astro
    • Directorydownload/
      • [token].astro
    • Directoryapi/
      • Directorymika-webhook/
        • [provider].ts

Copy the metadata group when the host wants agent-readable public descriptions:

  • Directorycomponents/
    • ProductStructuredData.astro
  • Directorypages/
    • llms.txt.ts
    • Directory.well-known/
      • mika-agent.json.ts

Piecemeal page copies also need these support files:

  • Directorylib/
    • routes.ts
    • display.ts
    • cart.ts
    • account.ts
  • Directorystyles/
    • kumo.css

The seeded GitHub template repo also contains host-only files that are not exported as package templates, including src/pages/products/[slug].astro, src/lib/mika-api.ts, src/lib/mika-fixture-storefront.ts, src/plugins/mika-template-plugin.ts, src/emdash/mika-action-fields.ts, and src/pages/api/mika-action-contract.json.ts.

The package template download page is pages/download/[token].astro and uses a POST confirmation form so link scanners cannot consume a single-use token. The seeded GitHub template currently carries the same host-owned .astro interstitial pattern at src/pages/download/[token].astro.

  • ../emdash-mika/package.json
  • ../emdash-mika/src/templates/astro/README.md
  • ../emdash-mika/src/templates/astro/pages/download/[token].astro
  • ../emdash-mika-template/README.md
  • ../emdash-mika-template/src/pages/download/[token].astro
  • ../emdash-mika-template/src/pages/products/[slug].astro
  • ../emdash-mika-template/src/lib/mika-api.ts