CodeCraft AI is a revolutionary AI-powered code review assistant that helps developers of all levels learn, improve, and write better code. Leveraging the power of OpenAI's GPT-4, it provides instant, detailed, and educational feedback on code submissions across multiple programming languages.
Every developer has experienced the frustration of writing code that works but could be better. Traditional code reviews are:
- Time-consuming: Waiting for peer reviews slows down development
- Inconsistent: Review quality depends on the reviewer's expertise
- Limited: Not everyone has access to senior developers
- Reactive: Issues are caught late in the development cycle
CodeCraft AI acts as your personal Senior Software Engineer, providing:
- Instant Feedback: Get reviews in seconds, not hours
- Comprehensive Analysis: Logic, efficiency, style, and security
- Educational Approach: Learn why something is wrong and how to fix it
- 24/7 Availability: Review code anytime, anywhere
| Feature | Description |
|---|---|
| π Logic Analysis | Detect bugs, edge cases, and logical flaws |
| β‘ Efficiency Review | Identify performance bottlenecks and optimize algorithms |
| π¨ Code Style Check | Ensure clean, readable, and maintainable code |
| π Security Audit | Find vulnerabilities and security risks |
| π Review History | Track your progress and revisit past reviews |
| π Multi-Language | Support for JavaScript, Python, Java, C++, TypeScript |
- Personalized Feedback: Tailored suggestions based on code context
- Educational Explanations: Understand the "why" behind each suggestion
- Code Quality Metrics: Track your improvement over time
- Export Reports: Share reviews with team members
| Technology | Version | Purpose |
|---|---|---|
| Python | 3.10+ | Core language |
| FastAPI | 0.104.0 | API framework |
| PostgreSQL | 15+ | Database |
| SQLAlchemy | 2.0.23 | ORM |
| OpenAI API | Latest | AI integration |
| JWT | - | Authentication |
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 14.0.4 | React framework |
| React | 18.2.0 | UI library |
| Tailwind CSS | 3.3.6 | Styling |
| react-simple-code-editor | 0.13.1 | Code editor |
| Technology | Purpose |
|---|---|
| Docker | Containerization |
| Docker Compose | Multi-container orchestration |
| Render.com | Cloud deployment |
| GitHub Actions | CI/CD (optional) |
- Docker and Docker Compose
- Node.js 18+ (for manual setup)
- Python 3.10+ (for manual setup)
- OpenAI API Key (Get one here)
# Clone the repository
git clone https://github.com/abdulboyprogramming-arch/codecraft-ai.git
cd codecraft-ai
# Set up environment variables
cp backend/.env.example backend/.env
cp frontend/.env.local.example frontend/.env.local
# Edit .env files with your API keys
# Make sure to set OPENAI_API_KEY in backend/.env
# Start the application
docker-compose up -d
# Access the application
# Frontend: http://localhost:3000
# Backend API: http://localhost:8000
# API Docs: http://localhost:8000/docscd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment
cp .env.example .env
# Edit .env with your values
# Run migrations
alembic upgrade head
# Start the server
uvicorn app.main:app --reloadcd frontend
# Install dependencies
npm install
# Set up environment
cp .env.local.example .env.local
# Start development server
npm run devcodecraft-ai/
βββ backend/
β βββ app/
β β βββ api/ # API routes
β β βββ core/ # Core configuration
β β βββ models/ # Database models
β β βββ schemas/ # Pydantic schemas
β β βββ services/ # Business logic
β β βββ utils/ # Utility functions
β βββ migrations/ # Alembic migrations
β βββ tests/ # Backend tests
β βββ requirements.txt
β βββ Dockerfile
β βββ .env
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ context/ # React Context
β β βββ hooks/ # Custom hooks
β β βββ pages/ # Next.js pages
β β βββ services/ # API services
β β βββ styles/ # CSS styles
β βββ public/ # Static assets
β βββ package.json
β βββ next.config.js
β βββ Dockerfile
βββ docs/ # Documentation
βββ scripts/ # Utility scripts
βββ docker-compose.yml
βββ README.md
Once the backend is running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/signup |
Create a new account |
| POST | /api/auth/login |
Login and get JWT token |
| POST | /api/reviews |
Submit code for review |
| GET | /api/reviews/history |
Get review history |
| GET | /api/reviews/{id} |
Get specific review |
cd backend
pytestcd frontend
npm testBackend: Create a new Web Service
- Build Command:
pip install -r requirements.txt - Start Command:
uvicorn app.main:app --host 0.0.0.0 --port $PORT - Environment Variables:
DATABASE_URL,OPENAI_API_KEY,SECRET_KEY
Frontend: Create a new Static Site
- Build Command:
npm run build - Publish Directory:
.next - Database: Use Render's PostgreSQL service
For detailed deployment instructions, see docs/DEPLOYMENT.md.
Contributions are welcome! Please read our contributing guidelines before submitting a pull request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for their incredible APIs
- The FastAPI and Next.js communities
- All hackathon participants and judges
- Special thanks to the Prometheus July AI Challenge organizers
- Issues: GitHub Issues
- Email: support@codecraft-ai.com
- Documentation: docs/
This project was built for the Prometheus July AI Challenge (Deadline: July 31, 2026).
- Working prototype
- 2-minute demo video
- Source code (GitHub)
- Documentation
- Deployment link
Built with β€οΈ by Abdulrahman Adeeyo for the Prometheus July AI Challenge
Copyright Β© CodeCraft AI. All Rights Reserved.