Developer Docs
Local Setup
Install, run and check the monorepo locally.Prerequisites
Use Node 20 or newer and pnpm 9.
corepack enable
corepack prepare pnpm@9 --activate
pnpm installEnvironment
pnpm setupThe API uses port 4000. The web app uses port 3000. The docs app uses port 3001.
Set DATABASE_URL in .env to your local Mongo (see .env.example). Jobs run in-process locally — no Redis or separate worker process is required.
Run the app locally
pnpm infra:up # Mongo on :27017
pnpm seed # optional deterministic data
pnpm dev # API + webOpen http://localhost:3000 and log in as test@together.agency / somepassword after seeding.
pnpm infra:down # stop Mongo and wipe the volumeOther useful commands:
- API health:
http://localhost:4000/health - docs:
pnpm dev:docs, thenhttp://localhost:3001
Deploy (Vercel)
- Create two Vercel projects from this repo: one with root
apps/web, one with rootapps/api. - Put the API project ID in
apps/web/vercel.json→relatedProjects. - Set shared env vars (
DATABASE_URL,JWT_SECRET, AWS, GitHub) on both projects. - Preview deployments automatically use database
viz_preview_pr_<n>and seed it when empty. - The API project needs Vercel Pro or Enterprise: visual-test consumers
run for up to 800s at 3008 MB (Hobby caps duration at 300s). Fluid Compute is on by default and is what those limits apply to. Do not set QUEUE_BACKEND=local on Vercel — it is ignored, and in-process jobs would not finish anyway.
Check your work
pnpm typecheck
pnpm docs:checkdocs:check makes sure the generated API/model/contract reference is current and that every route has a JSDoc block for the docs.