AI-powered interview platform for a given codebase — run contests, upload/inspect code, and generate targeted JS/TS interview questions.
- Frontend: Next.js (App Router) + React + Tailwind + shadcn/ui
- Backend: Bun + Express
- Auth: Better Auth (Google provider enabled)
- DB: Postgres (Neon) via Drizzle ORM
- LLM: Vercel AI Gateway (via
ai)
frontend/: Next.js app (UI)backend/: Bun + Express API
- Bun installed (backend and scripts use Bun)
- A Postgres database URL (local Postgres or hosted Neon)
- Optional: Google OAuth credentials (for Better Auth social login)
- Optional: Vercel AI Gateway API key (required for question generation endpoint)
Required:
DATABASE_URL: Postgres connection stringBETTER_AUTH_SECRET: Better Auth secretBETTER_AUTH_URL: Public backend base URL (e.g.http://localhost:3000)FRONTEND_URL: Frontend URL used for redirects (e.g.http://localhost:7000)AI_GATEWAY_API_KEY: Vercel AI Gateway API key (required for AI question generation)
Auth providers:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
Optional:
PORT: API port (defaults to3000)
Required:
NEXT_PUBLIC_BACKEND_URL: Backend base URL (e.g.http://localhost:3000)
Install dependencies (each package has its own package.json):
cd backend && bun install
cd ../frontend && bun installBecause the backend defaults to port 3000, it’s easiest to run the frontend on 7000.
cd backend
bun run devThe API serves:
GET /→ welcome messageGET /api/v1/health→ health checkPOST /api/v1/ai-question→ generate a single JS/TS question (requiresAI_GATEWAY_API_KEY)- Better Auth routes under
GET|POST /api/auth/*
cd frontend
bun run dev -- -p 7000The backend includes Drizzle Kit scripts:
cd backend
bun run gen
bun run migrateOther available commands:
cd backend
bun run push
bun run pull
bun run studioFrom each package:
cd frontend && bun run format && bun run lint
cd ../backend && bun run formatOr from the repo root:
bun run format
bun run format:check- Cross-origin isolation headers are enabled in
frontend/next.config.tsto support@webcontainer/api(SharedArrayBuffer). - The frontend also includes a rewrite for
/api/auth/*to the backend whenNEXT_PUBLIC_BACKEND_URLis set, but Better Auth client requests should still be configured to preserve cookies correctly.