Skip to content
Guides

Storefront SDK

Our React micro-framework for building Ecomiq stores with SSR routes, Storefront API, checkout, and deployment to any cloud.

Last updated:

Your pageswhat you writeThe frameworkrouting, SSR and deployment

@ecomiq/storefront is our micro-framework for building Ecomiq stores with React. It generates routes and the SSR server from pages/; its loaders and server functions call the Storefront API.

It also includes providers and hooks for store settings, menus, and cart, plus flows for checkout, authentication, customer accounts, and CMS pages.

The CLI handles the local environment and production builds. We ship ready-made batteries for Cloudflare Workers, but you can deploy your store to any cloud: Vercel, Railway, AWS, Google Cloud, a VPS, or another compatible Node host.

You maintain this project structure:

ecomiq.config.js
layout.tsx

The CLI generates .ecomiq/ with the router, SSR server, and build configuration. Do not edit or commit that directory.

What it includes

  • SSR routes generated from pages/, with a global layout and file-based parameters.
  • Loaders and server functions that call Storefront API through serverApi.
  • Providers and hooks for settings, menus, cart, and authentication.
  • Included flows for checkout, CMS pages, and the account area.
  • Commands for development, builds, cleanup, and deployment (with a ready-made Cloudflare Workers target; also usable on other hosts).

Public imports

ImportUse it for
@ecomiq/storefrontPages, layout, data, providers, hooks, types, and authentication.
@ecomiq/storefront/configdefineConfig and complete configuration types.
@ecomiq/storefront/uiButton, Card, Badge, Skeleton, Separator, and other bases.
@ecomiq/storefront/styles.cssFramework styles; the CLI includes them automatically.

The @ecomiq/storefront/internal/* imports are for code generated in .ecomiq/. Do not use them in a store.

Basic workflow

  1. Create the project with create-ecomiq.
  2. Review domain in configuration.
  3. Customize pages with definePage.
  4. Run ecomiq dev.
  5. Publish with ecomiq deploy.

One store per project

domain identifies the store consumed by the project.

The name, SEO, currency, menus, and checkout rules come from Storefront API through GET /v1/settings.

On this page