Open-source, AI-powered coding interview preparation platform with algorithm practice, interactive syntax training, and guided coaching.
β¨ Features β’ π Quick Start β’ ποΈ Architecture β’ π οΈ Tech Stack β’ π€ Contributing
Developed by Anvar Baltakhojayev
π§© 100 Curated Problems β Challenges from Easy to Hard across 21 topic categories including arrays, trees, graphs, dynamic programming, backtracking, and more.
π 9 Programming Languages β Write and execute code in Python, JavaScript, TypeScript, Java, C++, C, Go, Rust, and C#.
π Interactive Syntax Trainer β 13 curriculum categories with ~500 hands-on exercises across all 9 languages. Learn data structure patterns and language syntax through guided practice with instant feedback.
π Monaco Editor β The same editor powering VS Code, with syntax highlighting, bracket colorization, and font ligatures.
β‘ Code Execution β Run your code against visible and hidden test cases via Judge0, with real-time execution time and memory stats.
π‘ AI-Guided Hints β Three modes to match your practice style:
| Mode | Style | Description |
|---|---|---|
| π Strict | No hints | Pure interview simulation |
| π Interviewer | Socratic | Guiding questions that nudge without revealing |
| π Learning | Direct | Pseudocode, partial snippets, and explanations |
Each mode supports 5 progressive hint levels β from a subtle nudge to a detailed walkthrough.
π AI Code Review β After running your code, get a senior-engineer-level debrief with overall feedback, time and space complexity analysis, edge cases to consider, and actionable improvements.
π€ AI Mentor Chat β Context-aware AI assistant with two personalities: coaching mode for problems (no spoilers) and tutoring mode for syntax (teaches freely with code examples).
πΎ Auto-Save β Your code is automatically saved to browser localStorage. Pick up right where you left off.
π¨ Modern Landing Page β Interactive homepage with animated hero, live code demo, mouse-parallax effects, and scroll-reveal animations.
π Formerly known as "AI Interview Coach" β rebranded to CodePilot AI.
cp .env.example .env.localEdit .env.local and fill in your keys:
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY |
β | OpenAI or compatible provider API key |
OPENAI_BASE_URL |
β | Default: https://api.openai.com/v1 |
OPENAI_MODEL |
β | Default: gpt-4.1-mini |
JUDGE0_URL |
β | Judge0 instance URL |
X_RAPIDAPI_KEY |
β * | Required for RapidAPI-hosted Judge0 |
cd server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000npm install
npm run devOpen π http://localhost:3000
docker compose up -dπ³ Starts Postgres & Redis β scaffolded for future features, not required for the current MVP.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Browser (localhost:3000) β
β β
β / ................ Landing page (overview, live demo, features) β
β /practice ........ Problem solving + Syntax trainer workspace β
β /contact ......... Contact page β
β β
β ββ Practice: Problems View βββββββββββββββββββββββββββββββββββ β
β β 100 problems | Difficulty & topic filters | Search β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β ββ Practice: Workspace βββββββββββββββββββββββββββββββββββββββ β
β β Problem Panel β Monaco Editor β Tests|Hint|Review|AI tabs β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β ββ Practice: Syntax Trainer ββββββββββββββββββββββββββββββββββ β
β β Learn|Reference β 9 Languages β 13 categories β AI Chat β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β localStorage βββ Auto-save code attempts (debounced 1s) βββΊ β
ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
POST /api/execute, /api/hint, /api/review,
/api/syntax/explain, /api/syntax/check
(Next.js API routes β FastAPI)
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FastAPI Backend (localhost:8000) β
β β
β β‘ POST /execute βββΊ Judge0 (code execution, 9 languages) β
β π‘ POST /hint βββΊ OpenAI-compatible LLM β
β π POST /review βββΊ OpenAI-compatible LLM β
β π POST /syntax/explain βββΊ LLM (syntax explain / translate) β
β β
POST /syntax/check βββΊ Judge0 + pattern checks + LLM β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
codepilot-ai/
βββ π app/ Next.js App Router
β βββ layout.tsx Root layout (Inter font, dark theme)
β βββ page.tsx Landing / homepage
β βββ practice/page.tsx Practice workspace (Problems + Syntax)
β βββ contact/page.tsx Contact page
β βββ globals.css Global styles + animations
β βββ api/ API proxy routes β FastAPI
β βββ execute/route.ts
β βββ hint/route.ts
β βββ review/route.ts
β βββ syntax/
β βββ explain/route.ts
β βββ check/route.ts
βββ π§± components/ React UI components
β βββ AIChatPanel.tsx AI chat (dual mode: syntax/problem)
β βββ CodeEditor.tsx Monaco editor + language picker
β βββ ProblemPanel.tsx Problem description & examples
β βββ ProblemsView.tsx Problem browser with filters
β βββ RightPanel.tsx Tabbed panel (Tests/Hint/Review/AI)
β βββ TestResults.tsx Execution results display
β βββ HintPanel.tsx Hint controls & display
β βββ ReviewPanel.tsx AI review display
β βββ syntax/ Syntax Trainer components
β βββ SyntaxPanel.tsx Main panel (Learn/Reference, language)
β βββ LessonTrainer.tsx Interactive trainer with progress
β βββ TrainerSection.tsx Exercise: explain β example β try β check
β βββ ExerciseEditor.tsx Monaco editor for exercises
β βββ FeedbackPanel.tsx Exercise result + AI feedback
β βββ LessonView.tsx Static reference lesson view
β βββ LessonList.tsx Reference lesson grid
β βββ SyntaxSnippet.tsx Code snippet with copy button
βββ π data/
β βββ problems/ 100 problem JSON definitions
β βββ syntax/
β βββ lessons/ 4 static reference lessons
β βββ trainer/ 117 interactive trainer lessons
β βββ curriculum.json 13 category definitions
βββ π§ lib/ Shared frontend utilities
β βββ types.ts TypeScript type definitions
β βββ problems.ts Problem loader (100 problems)
β βββ trainer.ts Trainer lesson loader (117 lessons)
β βββ syntax.ts Reference lesson loader
β βββ storage.ts localStorage helpers
βββ π server/ Python FastAPI backend
β βββ main.py App entry point, 7 endpoints
β βββ requirements.txt
β βββ models/schemas.py Pydantic request/response models
β βββ services/
β βββ judge0.py Judge0 integration (9 languages)
β βββ llm.py LLM client (hints, review, syntax)
β βββ prompts.py Prompt templates
βββ πΌοΈ public/ Static assets
β βββ favicon.svg App favicon
βββ π³ docker-compose.yml Postgres + Redis (scaffolded)
| Route | Page | Description |
|---|---|---|
/ |
π Home | Landing page with hero, feature grid, live code demo, how it works, open source section |
/practice |
π» Practice | Full workspace: Problems list, Syntax trainer, coding workspace with AI tools |
/contact |
π¬ Contact | Contact cards for email, LinkedIn, and GitHub |
| Method | Path | Description |
|---|---|---|
POST |
/execute |
β‘ Run code against test cases via Judge0 |
POST |
/hint |
π‘ Generate AI hint (5 levels, 3 modes) |
POST |
/review |
π Generate AI code review (structured JSON) |
POST |
/syntax/explain |
π AI syntax explanation with dual mode |
POST |
/syntax/check |
β Exercise validation: Judge0 + pattern checks + AI feedback |
GET |
/health |
π₯ Health check |
GET |
/problems |
π List all 100 problems |
GET |
/problems/{id} |
π Single problem details |
The backend works with any OpenAI-compatible API. Update your .env.local:
# π€ Anthropic Claude
OPENAI_BASE_URL=https://api.anthropic.com/v1
OPENAI_API_KEY=sk-ant-...
OPENAI_MODEL=claude-sonnet-4-20250514
# π Local model (Ollama, LM Studio, vLLM)
OPENAI_BASE_URL=http://localhost:11434/v1
OPENAI_API_KEY=not-needed
OPENAI_MODEL=llama3| Layer | Technology |
|---|---|
| π Frontend | Next.js 14, React 18, TypeScript, Tailwind CSS, Monaco Editor |
| π Backend | Python FastAPI, Pydantic, Uvicorn |
| β‘ Execution | Judge0 CE (9 languages) |
| π€ AI | OpenAI-compatible chat API (GPT, Claude, Llama, etc.) |
| πΎ Storage | Browser localStorage |
| π³ Infra | Docker Compose (Postgres + Redis scaffolded) |
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
MIT
β‘ CodePilot AI β Built with β€οΈ by Anvar Baltakhojayev