New Contributors
Section titled “New Contributors”Use this guide for your first day in the repo.
Repo mental model
Section titled “Repo mental model”apps/— user-facing deployable entrypointsworkers/— backend/runtime Cloudflare Workerspackages/— reusable libraries and extracted feature slicesscripts/— repo automation and deploy helperstests/— cross-app and end-to-end verificationdocs/— canonical architecture, runbooks, ADRs, onboarding
First 10 minutes
Section titled “First 10 minutes”- Install dependencies:
pnpm install - Start the dashboard:
pnpm dev:dashboard - Open
http://localhost:5173 - Read
../../apps/README.md - Read
../architecture/00-repo-map.md - Read
../architecture/01-code-placement.md
Common commands
Section titled “Common commands”| Goal | Command |
|---|---|
| Start dashboard | pnpm dev:dashboard |
| Start marketing site | pnpm dev:marketing |
| Start docs site | pnpm dev:docs |
| Start ingestion workers | pnpm dev:ingestion |
| Start public API worker | pnpm dev:worker-consumer-api |
| Run architecture checks | pnpm ci:arch |
| Run repo validation | pnpm validate |
| Deploy dashboard | pnpm deploy:dashboard |
| Deploy marketing site | pnpm deploy:marketing |
Use the canonical names above.
Quick repo map
Section titled “Quick repo map”| Area | Purpose | Edit when… | Common command |
|---|---|---|---|
apps/dashboard | Main product UI + server functions | you are changing dashboard routes, pages, auth, or server functions | pnpm dev:dashboard |
apps/marketing | Public marketing site | you are changing public site content or marketing pages | pnpm dev:marketing |
apps/docs | Public docs site | you are changing published docs content | pnpm dev:docs |
workers/* | Cloudflare workers and operational services | you are changing queue consumers, public API, log processing, or rate limiting | pnpm dev:ingestion, pnpm dev:worker-consumer-api |
packages/feature-* | Reusable dashboard feature data/UI slices | logic is reused across dashboard screens | pnpm ci:arch |
packages/platform-* | Cross-feature infrastructure | multiple features or apps need shared platform support | pnpm ci:arch |
packages/domain-* / packages/utils / packages/db | Shared domain and platform foundations | logic is framework-light or schema/data related | pnpm ci:arch |
tests/ | Cross-app/system verification | you are adding or adjusting end-to-end coverage | pnpm test:all |
Choosing where new code goes
Section titled “Choosing where new code goes”| If you are adding… | Put it here |
|---|---|
| Dashboard page composition | apps/dashboard/src/features/{domain}/pages/ |
| Dashboard route declaration | apps/dashboard/src/routes/{-$locale}/... |
| Reusable dashboard feature queries or mutations | packages/feature-{domain}/src/ |
| Cross-feature platform logic | packages/platform-* |
| Shared business/domain rules | packages/domain-*, packages/utils, packages/db |
| Worker feature logic | workers/*/src/features/ |
| Worker runtime adapters/binding access | workers/*/src/infra/ |
| Canonical docs | docs/architecture/, docs/runbooks/, docs/adr/ |
If you are unsure, stop and check ../architecture/01-code-placement.md.
Fast decision tree
Section titled “Fast decision tree”Are you adding a deployable entrypoint? YES -> Is it user-facing? YES -> apps/ NO -> workers/ NO -> Is it dashboard-only page or route composition? YES -> apps/dashboard/src/features or apps/dashboard/src/routes NO -> Is it worker-runtime-specific (queues, D1 bindings, Durable Objects, wrangler-owned runtime)? YES -> workers/*/src/features or workers/*/src/infra NO -> Is it reused across multiple screens or multiple owners today? YES -> packages/feature-* or packages/platform-* NO -> Keep it with the current owning app/featureHow to work on a worker
Section titled “How to work on a worker”- Find the owning worker under
workers/* - Keep runtime entrypoints thin
- Put domain logic in
src/features/ - Put Cloudflare binding access and adapters in
src/infra/ - Use the root canonical dev/deploy commands instead of memorizing local package names
Common mistakes
Section titled “Common mistakes”- Putting dashboard page composition into
packages/feature-* - Putting Cloudflare runtime access into browser-safe layers
- Using generic folders like
helpers/,common/, or broadutils/without a narrow owner - Assuming workers participate in the main Turbo app pipeline
- Adding new production code to deprecated
workers/my-api/
Turbo vs Wrangler
Section titled “Turbo vs Wrangler”apps/dashboard,apps/marketing, andapps/docsare the main user-facing deployables and show up in the core Turbo workflow.workers/*are still deployables, but they are operated through Wrangler-oriented scripts and worker-specific flows.- The repo is organized by deployable ownership, not by forcing every deployable into the same toolchain path.
Scaffold shortcuts
Section titled “Scaffold shortcuts”pnpm scaffold dashboard-feature my-feature --route my-featurepnpm scaffold domain-module my-domainpnpm scaffold worker-feature worker-ingestion-process linkingExpected output paths:
pnpm scaffold dashboard-feature my-feature --route my-featureapps/dashboard/src/features/my-feature/...- route files under
apps/dashboard/src/routes/{-$locale}/(dashboard)/...
pnpm scaffold domain-module my-domainpackages/domain-my-domain/src/...
- shared ingestion runtime modules
packages/platform-ingestion/src/features/notifications/...