AI Code Reviewer is a web application that allows developers to submit their code and receive instant, AI-generated feedback on bugs, suggestions, readability, efficiency, and a corrected version (if applicable). It also compares the submitted code with ideal sample solutions and stores all submissions in a history log.
AI-Code-Reviewer/
├── Backend/ # FastAPI backend
│ ├── app/ # Main app files
│ │ ├── main.py
│ │ ├── models.py
│ │ ├── database.py
│ │ ├── schemas.py
│ │ └── ai_utils.py
│ ├── requirements.txt
│ └── start.sh
├── Frontend/ # React + Tailwind frontend (Vite)
│ ├── src/
│ │ ├── components/
│ │ ├── pages/
│ │ ├── App.jsx
│ │ └── main.jsx
│ ├── public/
│ ├── vite.config.js
│ └── .env
└── README.md
- ✅ Submit Python or JavaScript code
- 🧠 AI-generated feedback using Gemini API
- 📊 Readability & efficiency scoring
- 🐞 Bug detection & suggestions
- 💡 Improved code recommendations
- 🧩 Similarity check with ideal sample answers
- 🕓 Submission history viewer
- 🧑🏫 Admin panel to add sample answers
- 💻 Monaco-based code editor
Frontend
- React (Vite)
- TailwindCSS
- Axios
- Monaco Editor
- Chart.js
- Lucide Icons
- Deployed on Netlify
Backend
- FastAPI
- SQLAlchemy + SQLite
- Google Generative AI (Gemini 2.5 Pro)
- Uvicorn
- Deployed on Railway
cd Backend
python -m venv venv
source venv/bin/activate # Or venv\Scripts\activate on Windows
pip install -r requirements.txt
# Set up .env
echo "GEMINI_API_KEY=your-api-key-here" > .env
# Run server
uvicorn app.main:app --reload
cd Frontend
npm install
# Create .env file
echo "VITE_API_BASE_URL=http://localhost:8000" > .env
npm run dev
- Backend
GEMINI_API_KEY=your-api-key-here
- Frontend
VITE_API_BASE_URL=http://localhost:8000