React + TypeScript frontend for the Applera job application platform.
- Framework: React 19
- Routing: TanStack Router (file-based)
- Data fetching: TanStack Query
- Auth: Clerk
- Styling: Tailwind CSS v4
- UI Components: shadcn/ui + Radix UI
- HTTP Client: Axios (modularised interceptors)
- Build tool: Vite
- Node.js 20+
- pnpm 10.20.0
From the repo root:
pnpm installOr from this directory:
cd apps/client
pnpm installCreate a .env.development or .env.production file in apps/client/ (see .env.example):
VITE_CLERK_PUBLISHABLE_KEY=pk_live_...
VITE_API_URL=https://api.applera.site| Variable | Required | Description |
|---|---|---|
VITE_CLERK_PUBLISHABLE_KEY |
Yes | Clerk publishable key |
VITE_API_URL |
Yes | Backend API base URL |
Only VITE_ prefixed variables are exposed to the browser.
From the repo root:
pnpm dev:clientOr from this directory:
pnpm devStarts the dev server on http://localhost:5173.
pnpm buildOutputs to dist/.
src/
├── api/
│ ├── application/
│ ├── cv/
│ ├── interview/
│ ├── job/
│ ├── interceptors/
│ ├── client.ts
│ ├── queryKeys.ts
│ └── types.ts
├── components/
│ ├── common/
│ └── ui/
├── core/
│ ├── App.tsx
│ ├── queryClient.ts
│ └── router.ts
├── hooks/
├── lib/
├── pages/
│ ├── auth/
│ ├── application/
│ └── cv/
├── routes/
├── utils/
├── declarations.d.ts
├── globals.css
├── main.tsx
└── routeTree.gen.ts
Each domain has three files:
*.api.ts— raw API functions (fetch, parse, return typed data)*.hooks.ts— TanStack Query hooks (useQuery, useMutation)*.schemas.ts— Zod schemas and inferred TypeScript types
Hooks delegate to API functions — no inline fetch logic in hooks.
The Axios client (api/client.ts) uses two interceptors:
- Request (
interceptors/request.interceptor.ts) — attaches Bearer token and CSRF token with in-flight deduplication to prevent parallel token races - Response (
interceptors/response.interceptor.ts) — normalises all errors to a typedClientErrorshape with codes:TIMEOUT,NETWORK_ERROR,UNAUTHORIZED,FORBIDDEN,NOT_FOUND,RATE_LIMITED,USAGE_LIMIT_REACHED,UNKNOWN
Routes are file-based via TanStack Router. routeTree.gen.ts is auto-generated on dev/build — do not edit it manually.
Protected routes live under routes/__protected/ and redirect unauthenticated users to sign-up.
Deployed on Vercel.
- Build command:
vite build - Output directory:
dist - Root directory:
apps/client
Environment variables are set in the Vercel dashboard.