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-domThe package requires React 19. Use ESM and add the CLI scripts to 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:
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
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 devThe CLI generates .ecomiq/ and serves the store with SSR and HMR. Add the
directory to .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/.