Each front-end is its own Vercel project, created from the same repository with a different Root Directory. Vercel detects pnpm and installs the whole workspace.
Storefront
- vercel.com/new → import your repository.
- Root Directory:
apps/web. Framework: Next.js (detected). - Environment Variables:
NEXT_PUBLIC_API_URL=https://api.yourstore.com
NEXT_PUBLIC_SITE_URL=https://yourstore.com
# plus the other NEXT_PUBLIC_* values from apps/web/.env
- Deploy, then add your domain under Settings → Domains.
Admin + seller panel
- Import the repository again as a new project.
- Root Directory:
apps/admin. Framework: Vite (detected). - Environment Variables:
VITE_NEXT_PUBLIC_API_URL=https://api.yourstore.complus the otherVITE_*values. - Deploy.
apps/admin/vercel.jsonalready sends every route toindex.htmland adds security headers.
Netlify instead
For the admin on Netlify: base directory apps/admin, build command pnpm build, publish directory apps/admin/dist. Add a _redirects file in apps/admin/public with /* /index.html 200 so page refreshes work.
Static showcase and this site
| Project | Root Directory | Framework |
|---|---|---|
| Static storefront | static_app/web |
Next.js |
| Static admin | static_app/admin |
Vite |
| Documentation (this site) | static_app/docs |
Astro |
They need no environment variables.
Deploy on every push
When the project is imported from GitHub, GitLab or Bitbucket, Vercel redeploys it on every push to your main branch and creates a preview link for every other branch. Nothing else to set up.
Tip
Change Settings → Git → Ignored Build Step if you want a project to rebuild only when its own folder changes, for example git diff HEAD^ HEAD --quiet -- apps/admin.
