This file provides guidance to all AI coding assistants (GitHub Copilot, Google Gemini, Cursor, Windsurf, Claude Code, etc.) when working with this repository.
Caution
This project uses pnpm exclusively. Do NOT use npm or yarn — they will fail to resolve workspace dependencies. The root package.json pins the exact pnpm release in its "packageManager" field (pnpm 10), and workspaces are defined in pnpm-workspace.yaml.
| Item | Value |
|---|---|
| Package Manager | pnpm 10 (NOT npm, NOT yarn) |
| Dev Server | pnpm dev → http://localhost:8443 |
| Framework | Next.js 16.4 (App Router, Turbopack) |
| Monorepo | Turborepo with pnpm workspaces |
| Package Namespace | @ever-hust/* |
| Workspace Config | pnpm-workspace.yaml |
| Node Version | ≥26 |
pnpm install # Install all dependencies
pnpm dev # Start dev server (port 8443, Turbopack)
pnpm build # Build all packages and apps (via Turborepo)
pnpm lint # Lint all packages (eslint --max-warnings 0)
pnpm check-types # Type-check all packages
pnpm test # Run all Jest unit tests
pnpm test:e2e # Run Playwright E2E tests
pnpm db:push # Push schema changes to database
pnpm db:migrate # Run database migrations
pnpm db:generate # Generate migration files
pnpm db:seed # Seed database with test data
pnpm db:studio # Open Drizzle Studio GUI
apps/web/ — Next.js application (the only app)
packages/ai/ — AI orchestrator, tools, model router, prompts
packages/auth/ — BetterAuth with LinkedIn OAuth
packages/config/ — Shared configuration
packages/cv-parser/ — CV/resume parsing
packages/db/ — Drizzle ORM schemas + database client
packages/email/ — React Email templates + Resend sender
packages/eslint-config/ — Shared ESLint configs
packages/jobs-api/ — Ever Jobs external API client (circuit breaker + retry)
packages/stripe/ — Stripe checkout, portal, webhooks
packages/supabase/ — Supabase client (Realtime + Storage)
packages/triggers/ — Trigger.dev scheduled tasks
packages/typescript-config/— Shared tsconfig presets
packages/ui/ — ShadCN components (import as @ever-hust/ui/<name>)
packages/utils/ — Shared utilities and constants
- UI imports:
import { Button } from "@ever-hust/ui/button"(direct file exports, no barrel) - Workspace deps: Use
"@ever-hust/<pkg>": "workspace:*"inpackage.json - API routes: Authenticate via
requireSessionUser(), validate with Zod, useapiBadRequest()/apiError()helpers - Testing: Jest unit tests live alongside source as
*.test.ts; Playwright E2E intests/e2e/ - DB client: Lazy singleton via Proxy — only connects on first access
- Environment: Copy
.env.example→.env.local; startup checks validate critical vars on boot
Important
Hust must always build, run, and ship without any Gauzy product. The only hard external
dependency is the Ever Jobs API (packages/jobs-api). Hust owns its own auth (BetterAuth +
LinkedIn), users, DB, and apply flow.
Hust optionally integrates with the wider Ever Gauzy platform (for the agency/company scenario) via two future seams, both through the Gauzy AI API and both off by default:
- Seam A — Auto-apply: default is manual apply (open the apply URL); optional auto-apply hands
the application to Gauzy AI's
AutomationTaskqueue + the Ever Gauzy AI Automation client. - Seam B — Identity/employee/org/tenant sync (SSO): default is own BetterAuth + LinkedIn;
optional SSO mirrors employees from Ever Gauzy API via a shared JWT and
external*Idrefs.
When adding/reviewing any Gauzy-related feature, keep these invariants:
- No hard Gauzy dependency — standalone must work with zero Gauzy config.
- Flagged + adapter + graceful fallback to the standalone behavior.
- Integrate via the Gauzy AI API, not by embedding Gauzy internals.
Full design: docs/GAUZY-INTEGRATION.md.
packages/jobs-api/is a client for the external Ever Jobs API service — do not rename its API references to "Hust"- The dev server runs on port 8443 (configured in
apps/web/package.json) - See
CLAUDE.mdfor more detailed architecture documentation