Skip to main content
Cloud mode turns on three things that are off in self-hosted:
  1. Clerk authentication — login required, JWTs attached to every API request.
  2. Cloud sync — resumes round-trip through a NestJS Core API, with version history and resume sharing.
  3. agent-service (TypeScript, backend-side) — chat, interview, translation, JD-optimize, PDF parse.

How mode detection works

apps/web/src/lib/config/app.ts resolves the mode:
src/middleware.ts switches at module load between Clerk’s clerkMiddleware and a no-op handler based on this. There is no runtime toggle — the mode is baked at build time.
If you set NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY but forget NEXT_PUBLIC_API_URL, the app will still boot in cloud mode and every authenticated request will 404. Set both, or neither.

Environment variables

Backend services

The backend (Core API + agent) is deployed separately from this monorepo, fronted by a single gateway. For local cloud-mode development, run the backend and point NEXT_PUBLIC_API_URL at its gateway (dev default http://localhost:3110) — the frontend only ever needs that one URL. If you only want to develop the frontend, self-hosted mode is faster.

Auth flow

  • Clerk issues a JWT on sign-in.
  • apps/web/src/lib/api/httpClient.ts attaches that JWT as a Bearer token via an Axios request interceptor (configureHttpClient).
  • Both httpClient.api and httpClient.agent point at the same gateway origin and share the same interceptor — you should not pass tokens manually.
See Architecture → HTTP clients for the full request path.