Local Development
This is the canonical “Setting Up Terra” guide. If onboarding notes conflict with this page, use this page.
Who This Is For
- New engineers joining Terra development
- Existing engineers setting up a new laptop
- Engineers troubleshooting local environment drift
Prerequisites
- macOS or Linux shell access
- Node.js 20+
- pnpm 9+
- Access to Terra GitHub repo (
scholarfund/terra) - Doppler access for the
unify-platformproject
Fast Setup (macOS)
Environment Setup
Doppler (recommended)
Terra scripts are designed to run with Doppler-managed secrets.Local .env fallback
Use only when Doppler is unavailable.
- Copy
apps/terra/.env.exampletoapps/terra/.env.local. - Populate required values (Supabase, WorkOS, encryption key, integrations).
- Run with local env.
Useful CLI Tools (Optional but Recommended)
Supabase CLI
Useful for local DB operations, policy checks, and migration work.Vercel CLI
Useful for debugging deployment behavior and environment issues.Daily Commands
Quick Verification Checklist
pnpm --dir apps/terra devstarts without missing-env crashespnpm --dir apps/terra testruns locallypnpm --dir apps/terra tsc --noEmitpasses- You can open
/statuslocally and get HTTP 200
Migrations
Terra SQL migrations live inapps/terra/migrations/.
When adding a migration:
- Create the next sequential migration file.
- Run verification/tests locally.
- Include rollback notes in your PR/release context.