Thank you for your interest in contributing! This project is open source and community-driven. Whether you're fixing a bug, adding a new problem, improving the UI, or enhancing the AI — every contribution matters. 🙌
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/<your-username>/CodePilot-AI.git cd CodePilot-AI
- Set up the development environment — follow the Quick Start guide
- Create a branch for your work:
git checkout -b feat/your-feature-name
- 📦 Node.js 18+ and npm
- 🐍 Python 3.10+
- ⚡ A Judge0 instance (RapidAPI or self-hosted)
- 🤖 An OpenAI API key (or any OpenAI-compatible provider)
# 🌐 Frontend
npm install
npm run dev
# 🐍 Backend (in a separate terminal)
cd server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000The frontend runs at http://localhost:3000 and proxies API calls to the backend at http://localhost:8000.
Add a JSON file to data/problems/. Each problem needs:
- Unique ID matching the filename
- Title, difficulty (Easy/Medium/Hard), and topic tags
- Problem prompt with examples and constraints
- Starter code for all 6 editor languages (Python, JS, TS, Java, C#, Go)
- Visible and hidden test cases with per-language stdin support
- AI notes (core idea, common bugs, expected complexity)
Use any existing problem file as a template.
Add a JSON file to data/syntax/trainer/ following the naming convention {language}-{category}.json. Each lesson needs:
- 3-5 sections with explanations, code examples, and exercises
- Exercise validation rules (output matching and pattern checking)
- Optional hints
See data/syntax/trainer/curriculum.json for the 13 category definitions.
The frontend uses Next.js 14, React, Tailwind CSS, and Lucide icons. Key files:
app/page.tsx— Landing pageapp/practice/page.tsx— Practice workspaceapp/contact/page.tsx— Contact pageapp/globals.css— Global styles and animationscomponents/— All React components
The backend uses Python FastAPI with Judge0 for code execution and OpenAI-compatible APIs for AI features. Key files:
server/main.py— API endpointsserver/services/judge0.py— Code executionserver/services/llm.py— AI/LLM integrationserver/services/prompts.py— Prompt templates
Check the Issues tab for open bugs. When submitting a fix, reference the issue number in your PR.
- 🔷 TypeScript — Use strict types. Avoid
any. Follow existing patterns. - ⚛️ React — Functional components with hooks. No class components.
- 🎨 Tailwind CSS — Use utility classes. Follow the existing dark theme (
#0f1117background,#161821surface,border-gray-800borders,brand-*for blue accents). - 🐍 Python — Follow PEP 8. Use type hints. Pydantic models for request/response schemas.
- 📦 No unnecessary dependencies — Prefer built-in solutions. If you need a new package, explain why in the PR.
Use clear, concise commit messages that describe what changed and why:
feat: add binary tree zigzag traversal problem
fix: correct test case stdin for Java solutions
ui: improve code editor header with traffic light dots
docs: update README with new routing structure
- 🎯 Keep PRs focused — One feature or fix per PR
- ✅ Test your changes — Make sure the app builds (
npm run build) and runs without errors - 📝 Update documentation — If your change affects the README or DOCUMENTATION.md, update them
- 💬 Write a clear PR description — Explain what you changed, why, and how to test it
- 🔗 Link related issues — Reference any GitHub issues your PR addresses
app/ → 🌐 Next.js pages and API routes
components/ → 🧱 React UI components
data/problems/ → 🧩 100 algorithm problem definitions (JSON)
data/syntax/ → 📚 Syntax trainer lessons and curriculum (JSON)
lib/ → 🔧 Shared TypeScript utilities and types
server/ → 🐍 Python FastAPI backend
public/ → 🖼️ Static assets
- 📧 Email: xadja35@gmail.com
- 💼 LinkedIn: Anvar Baltakhojayev
- 🐙 GitHub: Dante9988
🙏 Thank you for helping make CodePilot AI better for everyone!