Skip to main content

Branch + dependency conventions

  • Prefix feature branches with the corresponding workstream, e.g. apimigration/app-launch-docs.
  • Use Bun for scripts/tests (bun install, bun run dev). pnpm is still supported for dependency audits, but Bun is the source of truth.
  • Keep workspaces aligned: if you change src/shared/, run bun run typecheck from the repo root so all services compile.

Core commands

Coding standards

Always log with logger from src/shared/utils/logger.ts. Include requestId (available via BaseController.getRequestId) and contextual identifiers such as phone, device, or user IDs. Langfuse spans should reuse the same IDs.
Throw domain-specific errors from src/shared/utils/errors.ts. Controllers call successResponse/errorResponse so the envelope stays consistent across /api/v1/* and /app/*.
Validate external input with Zod (see env.schema.ts and auth schemas). Update the OpenAPI file under docs/api-reference whenever you change the request contract or response shape.

Docs + design notes

  • Update the relevant markdown file at the repo root (APP_LAUNCH_IMPLEMENTATION.md, MOBILE_API_ENDPOINTS.md, etc.) whenever behavior changes.
  • The Mintlify docs live in /docs. Preview locally with mint dev --port 3334 (keep it different from the Bun server on 8080).

Pull request checklist

All items must be true before requesting review.
  • TypeScript compiles (bun run typecheck)
  • Tests relevant to the change pass (bun test or targeted bun test path)
  • Env schema updates documented in /docs/essentials/settings
  • OpenAPI + MDX docs updated if the API contract moved
  • Logs include enough context to debug from X-Request-ID
  • Screenshot of new docs sections (if applicable) attached to the PR

Troubleshooting