An adaptive AI interview coach for DSA preparation. Unlike static roadmap tools, it personalizes recommendations, difficulty, and pacing based on your actual performance — pattern mastery tracking, weakness detection, and AI-evaluated approach submissions.
Phase 1 status: MVP backend + minimal frontend complete. Chat (SSE), attempt evaluation, weakness detection, roadmap, and tracker pages all wired end-to-end. See
plan.mdfor the implementation log.
| Layer | Choice |
|---|---|
| Frontend | React 19 + Vite, Tailwind CSS, Zustand, React Router v6 |
| Backend | Express.js (Node, TypeScript) |
| Database | PostgreSQL + Prisma ORM |
| Auth | Clerk (@clerk/clerk-react + @clerk/express) |
| AI | OpenRouter (single gateway → Claude Sonnet, GPT-4 Turbo, GPT-4o-mini) |
All model calls go through one abstraction in server/src/lib/ai/client.ts so swapping providers is a string change.
client/ React + Vite SPA
src/
pages/ RoadmapPage, TrackerPage, ...
hooks/useChat.ts SSE chat hook
store/userStore.ts Zustand + Clerk bridge
lib/api.ts Typed fetch client
server/ Express backend
src/
routes/ users, chat, attempts, progress, roadmap, weakness
lib/
ai/ OpenRouter client + versioned prompt files
db/queries/ Reusable Prisma helpers
weakness/detect.ts Passive weakness detection
recommendation/ Today's plan builder
prisma/
schema.prisma 11 normalized tables
seed.ts Idempotent topic/pattern/problem seed
data/ Human-editable seed JSON
topics.json 10 topics
patterns.json 8 DSA patterns
problems.json 54 curated problems
plan.md Step-by-step implementation log
CLAUDE.md Product spec + architecture decisions
- Node.js 20+
- PostgreSQL 14+ with a database you can write to
- A Clerk project (for auth)
- An OpenRouter API key (for AI calls)
npm installThis installs both workspaces (client and server) via npm workspaces.
Copy .env.example into both server/.env and client/.env and fill in the values relevant to each side. The example file documents what goes where.
Without
CLERK_SECRET_KEY+CLERK_PUBLISHABLE_KEYthe server still boots, but every protected route returns401. This is intentional for smoke tests.
cd server
npx prisma migrate dev --name init
cd ..
npm run seed # loads 10 topics, 8 patterns, 54 problemsTo wipe and reseed:
npm run db:resetnpm run devThis launches both servers concurrently:
- Client — http://localhost:5173 (Vite, proxies
/api/*to the server) - Server — http://localhost:4000
Sanity check: curl http://localhost:4000/health → {"status":"ok"}.
| Command | What it does |
|---|---|
npm run dev |
Start client + server concurrently |
npm run dev:client |
Vite only |
npm run dev:server |
Express only (ts-node-dev --respawn) |
npm run build |
Type-check + bundle both workspaces |
npm run type-check |
tsc --noEmit for both |
npm run seed |
Run the Prisma seed script |
npm run db:reset |
prisma migrate reset --force && seed |
- Single AI client. Every model call goes through
streamChat/evaluateApproach/generateRoadmapinserver/src/lib/ai/client.ts, which routes to OpenRouter and falls back automatically per use case. - Versioned prompts. Stored as
.mdfiles underserver/src/lib/ai/prompts/with frontmatter (<!-- version: 1.0 | updated: ... -->). Loaded via a tiny templating helper, never inlined. - Tracker is home base. Every write path (
POST /api/attempts) updatesTopicProgress+PatternMasteryin the same transaction and fires passive weakness detection without blocking the response. - Pattern from AI, not DB. Mastery is updated against the pattern the user actually used (per the AI evaluation), not the canonical pattern tagged on the problem.
- SSE for chat. All chat responses stream token-by-token; the user message is persisted before streaming starts so history survives mid-stream disconnects.
See CLAUDE.md for the full product vision and architecture decisions.
| Phase | Features |
|---|---|
| 1 ✅ | Scaffold, Clerk auth, AI chat (SSE), AI approach evaluation, static roadmap, tracker, weakness detection |
| 2 | Adaptive roadmap (topic graph), pgvector chat memory, recommendation engine |
| 3 | Readiness score, PostHog analytics, mock interview mode |
| 4 | Voice interviews, exportable reports |
MIT — see LICENSE.