Installation
Installing dependencies, what the installer does, and how to do it by hand.
The installer
node setup.js (also pnpm run setup) is an interactive first-run script:
- Checks the Node.js version.
- Ensures pnpm is available.
- Installs workspace dependencies.
- Uses the root
.envthat ships with the package (and writes a minimal one if it has been deleted). - Asks for
MONGO_URI, and generatesJWT_SECRETandINTERNAL_API_KEYwhile they are empty. - Asks for ImageKit or Cloudinary keys if neither is set.
- Loads the demo store into your database and image CDN, if you say yes.
Manual install
bash
pnpm installpnpm installs all three apps and the e2e workspace in one pass. Native postinstall scripts (sharp, esbuild, @firebase/util, protobufjs, unrs-resolver, @parcel/watcher) are allow-listed in pnpm-workspace.yaml; pnpm 11 refuses to run any that are not.
Verifying the install
the four gates
pnpm run type-check && pnpm run lint && pnpm run test && pnpm run buildAll four should pass on a fresh install. build compiles both Next apps and the API; the API's build regenerates swagger.json first and then emits dist/ from tsconfig.build.json, which excludes tests and scripts.
Building without the API upThe storefront's
build logs an *"[api] unreachable"* line per route when the API is not running at build time. That is expected — every route falls back to dynamic rendering — not a failure.