Skip to content
Guides

Storefront SDK

Our React micro-framework for building Ecomiq stores with SSR routes, Storefront API, checkout, and Cloudflare Workers deployment.

Tus páginaslo que escribesEl frameworkrutas, SSR y despliegue

@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, production builds, and deployment to Cloudflare Workers.

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 to Cloudflare Workers.

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. Install the package.
  2. Set the store domain in configuration.
  3. Create 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