Quickstart
Goal: run a theme locally without running the Shoppex backend locally.
Recommended setup for external theme devs: run the theme on localhost, fetch real data from https://api.shoppex.io.
Step-By-Step
Pick a reference theme
In this repo you can start with:
themes/default
themes/classic
Start the dev server
Choose one option below (Public API vs mocks vs local backend).
Verify it loads
You should see store info and products. If you use mocks, you should see mock data.
Options
Public API (Recommended)
MSW Mocks
Local Backend (Advanced)
This is the easiest setup if you do not have the backend locally.cd themes/default
VITE_API_BASE_URL=https://api.shoppex.io VITE_SHOP_SLUG=your-shop bun run dev
What this does:
- Your theme runs on
http://localhost:<port>
- Data comes from
https://api.shoppex.io
Use this for fast UI work without real data.cd themes/default
VITE_USE_MSW=true VITE_SHOP_SLUG=demo bun run dev
MSW (Mock Service Worker) intercepts API calls in the browser and returns mock data — no backend needed. See MSW Mocking for details on what endpoints are mocked and how to add custom handlers. If you run the backend locally, point the theme to it:cd themes/default
VITE_API_BASE_URL=http://localhost:3001 VITE_SHOP_SLUG=your-shop bun run dev
If you do not run a backend on localhost:3001, the theme will fail with “connection refused”.
Next Steps