Skip to main content

Local Development

Quick links: FrontendBackend

Backend

Scripts:

  • Root: pnpm dev runs web and functions in parallel via Turbo.
  • Web only: pnpm dev:web
  • Functions emulator: pnpm dev:functions

Ports and URLs:

  • Next.js: http://localhost:3000
  • Functions emulator (if used): typically http://localhost:5001

Tips:

  • Set all required env vars before starting web.
  • Use /api/debug-env to inspect env availability without revealing secrets.
  • Error Handling: Set NODE_ENV=development for detailed error responses with stack traces during development.
  • TikTok: For local desktop auth use ?desktop=1 on the start URL; ensure TIKTOK_CALLBACK_URL matches the deployed URL for production. The callback handler serves verification .txt files automatically when probed.

Related frontend: see Frontend

Frontend

  • Use the Settings page to connect integrations; the app uses Functions start endpoints and returns to your current URL.
  • For TikTok local desktop flow, we use a proxy route /api/tiktok/callback to support desktop app constraints.

Related backend: see Backend