Local Development
Quick links: Frontend • Backend
Backend
Scripts:
- Root:
pnpm devruns 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-envto inspect env availability without revealing secrets. - Error Handling: Set
NODE_ENV=developmentfor detailed error responses with stack traces during development. - TikTok: For local desktop auth use
?desktop=1on the start URL; ensureTIKTOK_CALLBACK_URLmatches the deployed URL for production. The callback handler serves verification.txtfiles 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/callbackto support desktop app constraints.
Related backend: see Backend