An AI-powered code review application that provides instant feedback on code quality, bugs, security, and best practices using Groq's LLaMA 3.3 70B model.
- Real-time Code Editor - Syntax highlighting with Prism.js
- AI-Powered Reviews - Comprehensive code analysis using Groq AI
- Modern UI - Dark/light theme, responsive design, glassmorphism effects
- Keyboard Shortcuts - Ctrl/Cmd + Enter to review
- Copy/Clear Actions - Easy code management
Frontend: React, Vite, Prism.js, react-markdown, Axios
Backend: Node.js, Express, Groq SDK
AI Model: LLaMA 3.3 70B Versatile
- Node.js 19
- Groq API key (Get one here)
- Clone the repository
git clone https://github.com/mr-rishikesh/AI-Code-Review.git
cd ai-code-reviewer- Install dependencies
# Frontend
cd frontend
npm install
# Backend
cd ../backend
npm install- Configure environment variables
Create backend/.env:
GROQ_APIKEY=your_groq_api_key_here- Run the application
Terminal 1 - Backend:
cd backend
npm run devTerminal 2 - Frontend:
cd frontend
npm run devOpen http://localhost:5173 in your browser.
- Paste your code in the editor (left panel)
- Click "Review Code" or press
Ctrl/Cmd + Enter - View AI feedback in the review panel (right panel)
POST http://localhost:3000/ai/get-response
Content-Type: application/json
ai-code-reviewer/
├── frontend/
│ ├── src/
│ │ ├── App.jsx # Main React component
│ │ ├── App.css # Styles
│ │ └── main.jsx # Entry point
│ └── package.json
│
├── backend/
│ ├── src/
│ │ ├── controllers/
│ │ │ └── ai.controller.js
│ │ │ └── groq-code-review-simple.service.js
│ ├── server.js # Server entry
│ └── package.json
│
└── README.md
The AI service (backend/src/services/groq-code-review-simple.service.js) uses:
- Model:
llama-3.3-70b-versatile - Temperature:
0.7 - Max Tokens:
2000
Change the AI prompt in groq-code-review-simple.service.js:
const codeReviewPrompt = `
Your custom prompt here...
`;CORS Errors:
// backend/src/app.js
app.use(cors({
origin: ['http://localhost:5173']
}));Groq API Issues:
- Verify API key in
.env - Check Groq status
- Restart backend server after updating
.env
MIT License - see LICENSE file for details.