On this page
You finish with the web app and the worker running on your machine, a sample organization to look at, and the inner-loop checks passing. Plan for about 30 minutes, most of it the first pnpm install and image pulls.
Before you start#
| Need | Version | Where it is pinned |
|---|---|---|
| Node | 26.13.1 | .; engines in package. is >=26. |
| pnpm | 12.23.0 | package in package.; Node 26 has no Corepack, so install it with npm install - |
| Docker with Compose | any current | docker- starts Postgres, Redis and RustFS (S3-compatible storage) |
| Python | 3.10 or newer | only for the audit scripts in scripts/ |
| Free disk | 20 GiB | start- stops below that |
Check what you have:
node --version # v26.13.x
pnpm --version # 12.23.0
docker compose version
If a default port is taken on your machine, set WEB_PORT, PG_PORT, REDIS_PORT, MINIO_API_PORT or MINIO_CONSOLE_PORT in .env after step 2 and before step 3.
Steps#
Clone and install.
git clone <repository URL from your onboarding invite> cd <the cloned directory> pnpm installRun
pnpm installagain after every pull.Cannot find module 'zod'together with anode_modules missingwarning means a reinstall is due; do not edit a tsconfig or an import to work around it.Create
.envfrom the example.cp .env.example .envLeave the values as they are. The example ships local-only defaults:
DATABASE_URLpoints at the Compose Postgres,NEXTAUTH_URLathttp://localhost:3000,ENCRYPTION_KEYis all zeros.start-dev.shreplaces a missing or placeholderNEXTAUTH_SECRET,SESSION_SECRET,ENCRYPTION_KEY,RLS_CONTEXT_HMAC_KEYandCUBE_API_SECRETwithopenssl rand -hex 32values (it printsgenerated <KEY> in .env). Do not paste a real vendor token, a production key or a password from another system into this file. Connector credentials you add later go through the app, which stores them encrypted withENCRYPTION_KEY.Bring up the data plane, migrate and seed.
./scripts/start-dev.sh --no-appIn order, the script starts Postgres, Redis and RustFS with
docker compose up -d, waits for Postgres and Redis, runspnpm --filter @yng/schema migrate, then seeds sample data withpnpm tsx scripts/generate-sample-data.tsunless an organization withis_sample = truealready exists. It then seeds a super admin (pnpm seed:admin) and a second demo tenant, and starts the Cube semantic layer on:4000(best effort: a slow Cube only warns; add--no-cubeto skip it).Flag Effect -- reseed wipe and recreate the sample data -- no- seed skip seeding, for real-org work -- no- cube do not start Cube pnpm sample:removedrop the sample data later Start the app.
./scripts/start-dev.sh --foreground # live logs in this terminal, Ctrl-C stops the appWithout a flag the script runs
pnpm dev(web and worker through Turborepo) detached, writes.dev-server.logand.dev-server.pid, and returns oncehttp://localhost:3000answers. Keep one dev server per checkout: a secondpnpm devis refused when the ports are held. To stop everything, run./scripts/stop-dev.sh(containers and app, data kept) or./scripts/stop-dev.sh --volumes(also wipes Postgres, Redis and RustFS data).Check both processes:
curl -fsS http://localhost:3000/api/health curl -fsS http://localhost:9464/ready # worker; WORKER_METRICS_PORT overrides 9464Sign in. Open
http://localhost:3000/auth/signin. The sample organization issample-retailer; its owner isdemo@yng.local. The password is inscripts/CREDENTIALS.md, which is tracked in git: treat every password in it as public, use it only against this local stack, and never reuse it elsewhere. The sample data holds brands, orders across TikTok Shop, Shopee and Lazada, creators and inventory, so the dashboards render with numbers.Run the inner loop. From the repository root:
pnpm run typecheck pnpm run lint pnpm test pnpm run audit:allpnpm testis pure unit (no database, Redis or network; a socket opened in a unit test fails it) and also runs the script tests. Runtestandverifyat the root, never through--filter, which hides cross-package failures.pnpm run verifyis the complete local non-browser gate (format, typecheck, lint, test, build, security scan,verify:data,verify:rls,audit:all) and needs the data plane from step 3 running. On a 16-core or smaller machine, do not runtypecheck,testand a build at the same time.
If it fails#
| Symptom | Cause and fix |
|---|---|
REFUSING TO RUN — this host looks like production |
A production signal was found (a production env file, production Compose services, NODE_). You are on the wrong machine. |
insufficient free disk space |
Fewer than 20 GiB free. Clear generated caches (apps/, .) or free disk. |
an app dev port is already in use |
Another pnpm dev holds :3000 or :9464. Run ., or KILL_, or pick WEB_. |
pnpm install reports peer-dependency errors |
pnpm is not the pinned version. npm install -. |
Postgres permission denied for table X |
Row-level security blocked an unscoped query. Use orgProcedure or brandProcedure, or wrap the whole short DB unit in runWithRlsContext (Coding standards). |
| Cube not ready after 60 s | The app still starts. Check docker compose logs cube, or start with -. |
Where to go next#
- Connect a satellite app: sign a second application in through MSO Cloud and call the Platform API.
- Add a marketing connector: the worked example that touches the worker, the plugin registry and the audits.
- Engineering standards: what
pnpm run verifyand the pre-push hook enforce, and Definition of done before you open a pull request. - Onboarding and Project status.