Skip to content
Guides

Installation

Create the minimum structure for an @ecomiq/storefront project.

1. Install dependencies

npm install @ecomiq/storefront react react-dom
npm install --save-dev typescript @types/node @types/react @types/react-dom

The package requires React 19. Use ESM and add the CLI scripts to package.json:

package.json
{
  "private": true,
  "type": "module",
  "scripts": {
    "dev": "ecomiq dev",
    "build": "ecomiq build",
    "deploy": "ecomiq deploy",
    "clean": "ecomiq clean"
  }
}

2. Identify the store

The CLI looks specifically for ecomiq.config.js at the project root:

ecomiq.config.js
import { defineConfig } from "@ecomiq/storefront/config";

export default defineConfig({
  domain: "marketplace",
});

domain can be a slug (marketplace) or a domain (marketplace.ecomiq.app or marketplace.com).

3. Create the first page

pages/index.tsx
import { definePage } from "@ecomiq/storefront";

export default definePage({
  meta: () => ({ title: "Home" }),
  component: ({ settings }) => (
    <main>
      <h1>{settings.store.name}</h1>
      <p>{settings.store.description}</p>
    </main>
  ),
});

4. Start the server

npm run dev

The CLI generates .ecomiq/ and serves the store with SSR and HMR. Add the directory to .gitignore:

.gitignore
.ecomiq/

The CLI has no init or create command. The project must contain ecomiq.config.js and at least one .tsx or .jsx page under pages/.

On this page