Frontend API Client

Frontend API Client

Orval (Generated Hooks)

Source of truth:

  • Orval config: frontend/orval.config.ts
  • Generated output: frontend/generated/ (do not edit)

Orval reads the repo root .openapi.json and generates React Query hooks by OpenAPI tags.

Axios Mutator

All generated hooks call customInstance from frontend/lib/api-client.ts.

That instance:

  • sets withCredentials: true (cookie auth)
  • injects X-Session-Token and X-CSRFToken automatically

Regenerate After Backend Changes

Prereq: backend running (Docker default is http://localhost:8080).

make create_spec

Auth API Is Separate

The allauth headless API is accessed via authClient and the useAuthStore actions in frontend/hooks/use-auth.ts.

Direct fetch (When You Will See It)

The repo contains some server-component pages that use fetch directly for public content (e.g. blog/docs). For application UI that runs on the client, prefer Orval-generated hooks and the shared Axios instances to keep auth/CSRF/session-token handling consistent.

Last updated June 21, 2026