Set up your local environment for building composable, data-aware templates in the Web Builder.
yarn, npm, or pnpm).Choose one setup path depending on how you plan to connect erxes.
git clone [email protected]:pages-web/web-builder.git
cd web-builder
If the team standardizes on a package manager, stick to it to avoid lockfile churn.
yarn install
# or: npm install
# or: pnpm install
In web-builder/apps/templates, clone the template you need (you will only update UI):
cd apps/templates
# choose one:
git clone [email protected]:erxes-web-templates/ecommerce-boilerplate.git
# or
git clone [email protected]:erxes-web-templates/tour-boilerplate.git
cp .env.example .env.local
CMS_BASE_URL, API_TOKEN). Keep secrets out of version control.If your template uses static data during development, you can skip API tokens and rely on mocked JSON fixtures.
Start the dev server:
yarn dev
Then open http://localhost:3000. Confirm that:
yarn lint # catches accessibility, typing, and styling issues early
yarn build # ensures templates compile before pushing
Run these before opening a PR to keep the template stable for designers and content editors.
git clone -b saas-dependent [email protected]:erxes-web-templates/ecommerce-boilerplate.git
cd ecommerce-boilerplate
Ensure a CORS extension is installed and enabled in your browser for local development.
Configure the environment values in next.config.ts. Use the current SaaS values for your project:
export default {
env: {
ERXES_API_URL: "https://sales.app.erxes.io/gateway/graphql",
ERXES_URL: "https://sales.app.erxes.io/gateway",
ERXES_FILE_URL: "https://sales.app.erxes.io/gateway/read-file?key=",
ERXES_CP_ID: "nwYOCDEOph3oAqo73dHq0",
ERXES_APP_TOKEN: "<redacted>",
NEXT_PUBLIC_POS_TOKEN: "<redacted>"
},
images: {
unoptimized: true,
remotePatterns: [
{
protocol: "https",
hostname: "sales.app.erxes.io",
},
]
},
};
ERXES_APP_TOKEN, NEXT_PUBLIC_POS_TOKEN, and ERXES_CP_ID change per project.
yarn dev
Move on to Template Structure to see how pages, sections, and shared components are organized for composability and data-awareness.
Introduction
Start here to learn how to work with the erxes Web Builder boilerplate and the UI-only constraints for template developers.
Development Guide
Rules and workflow for UI-only changes, repo setup, and what you are allowed to edit.