Storefront SDK
Our React micro-framework for building Ecomiq stores with SSR routes, Storefront API, checkout, and deployment to any cloud.
Last updated:
@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:
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
| Import | Use it for |
|---|---|
@ecomiq/storefront | Pages, layout, data, providers, hooks, types, and authentication. |
@ecomiq/storefront/config | defineConfig and complete configuration types. |
@ecomiq/storefront/ui | Button, Card, Badge, Skeleton, Separator, and other bases. |
@ecomiq/storefront/styles.css | Framework 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
- Create the project with
create-ecomiq. - Review
domainin configuration. - Customize pages with
definePage. - Run
ecomiq dev. - 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.