Skip to content

anhlamtruong/cafair

Repository files navigation

AI Hire AI banner

AI Hire AI logo

AI Hire AI is a dual-sided multi-agent app that automates BOTH candidate applications and recruiter workflows in a busy world.

We envision the 2nd Earth where AI comes to HIRE another AI. So please stay tuned!



Hiring is getting faster, noisier, and more automated.

AI Hire AI explores a future where:

  • candidates use AI to apply smarter,
  • recruiters use AI to screen faster,
  • and eventually, AI agents interact with other AI agents in the hiring loop.

  • Candidate-side AI

    • application planning
    • resume tailoring
    • job search workflow support
    • follow-up guidance
  • Recruiter-side AI

    • candidate triage
    • verification and risk checks
    • micro-screening
    • social screening
    • recruiter-ready summaries and ATS-style handoff

Stack

  • Web Client: Next.js 16 + TypeScript + tRPC + Hono + Drizzle ORM + Clerk Auth + Tailwind CSS v4 + shadcn/ui
  • LLM Service: Express + TypeScript + Amazon Nova Lite (Bedrock) + Google Gemini (fallback) + Redis
  • Database: Supabase (PostgreSQL) with Row Level Security
  • Theme Engine: 20+ presets, live editor, Zustand store, View Transitions API

Project Structure

cafair/
├── apps/
│   ├── web-client/          # Next.js frontend + API layer
│   └── llm/                 # Express LLM prompt microservice
├── supabase/
│   ├── config.toml          # Supabase configuration
│   └── migrations/          # SQL migrations (Drizzle Kit)
├── ARCHITECTURE.md          # System architecture diagrams
├── SYSTEM_DESIGN.md         # Developer guide
└── package.json             # npm workspaces root

Quick Start

Prerequisites

  • Node.js 20+
  • Docker (for Supabase local dev & LLM Redis)
  • npm

1. Install Dependencies

npm install

2. Set Up Environment Variables

# Web client
cp apps/web-client/.env.example apps/web-client/.env

# LLM service
cp apps/llm/.env.example apps/llm/.env

Required keys:

  • CLERK_SECRET_KEY / NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
  • SUPABASE_URL / SUPABASE_ANON_KEY / SUPABASE_SERVICE_ROLE_KEY
  • GEMINI_API_KEY
  • AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_REGION (for Nova scoring)

3. Start Supabase (Local)

npm run supa:start

4. Run Database Migrations

npm run db:migrate

5. Start Development Servers

# Web client (Next.js :3000)
npm run dev:web

# LLM service (Express :3001)
npm run dev:llm

Available Scripts

Script Description
dev:web Start web client dev server
build:web Build web client for production
dev:llm Start LLM service dev server
build:llm Build LLM service
db:generate Generate Drizzle migrations
db:migrate Run database migrations
db:push Push schema changes (dev only)
db:studio Open Drizzle Studio
db:seed Seed database with sample data
db:reset Delete all data and re-seed
supa:start Start local Supabase
supa:stop Stop local Supabase

Documentation

Doc What it covers
ARCHITECTURE.md System diagrams, data flows, port map
SYSTEM_DESIGN.md Developer guide — adding services & APIs
THEME-DEFINITION.md Theme design contract for designers
apps/llm/README.md LLM service API, Nova + Gemini, Docker setup
src/docs/BACKEND_API_GUIDE.md Recruiter tRPC procedures, Nova scoring flow
src/docs/TRPC_USAGE_GUIDE.md tRPC + TanStack Query patterns
src/docs/MOBILE_CLIENT.md Hono REST API for mobile clients
src/docs/THEME_DEFINITIONS.md CSS variable → Tailwind class reference
src/services/theme/README.md Theme engine setup & customization

Auth Flow

  1. User signs in via Clerk
  2. Clerk JWT is injected into Supabase via secure-client.ts
  3. RLS policies enforce per-user data isolation using auth.user_id()

Adding New Features

See SYSTEM_DESIGN.md for step-by-step instructions covering:

  • Creating a new service module
  • Defining Drizzle schemas
  • Adding tRPC procedures
  • Adding Hono REST endpoints
  • Running migrations

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors