Professional AI-powered code review platform with real-time analysis
CodeLens AI is a modern, production-ready code review application that leverages Google Gemini AI to provide comprehensive code analysis, security audits, and performance recommendations.
- π€ AI-Powered Reviews - Leverages Google Gemini 1.5 Flash for intelligent code analysis
- π Security Analysis - Detects vulnerabilities and security best practices
- β‘ Performance Insights - Identifies bottlenecks and optimization opportunities
- π Code Quality Metrics - Severity-based issue classification (Critical β Low)
- π¨ Modern UI - Beautiful glassmorphism design with premium 2026 aesthetics
- β¨οΈ Keyboard Shortcuts - Power user features (Ctrl+Enter to review)
- π Syntax Highlighting - Multi-language support with Prism.js
- Real-time code metrics (lines, complexity, comments)
- Detailed improvement suggestions with code examples
- Empty state guidance for new users
- Responsive design (mobile, tablet, desktop)
- Professional error handling
- Loading states with animated indicators
- Node.js >= 18.0.0
- npm >= 9.0.0
- Google Gemini API key (Get one here)
- Clone the repository
git clone https://github.com/yourusername/codelens-ai.git
cd codelens-ai- Install dependencies
Frontend:
cd frontend
npm installBackend:
cd backend
npm install- Configure environment variables
Create .env in the backend directory:
cp backend/.env.example backend/.envAdd your Google Gemini API key:
GOOGLE_GEMINI_KEY=your_api_key_here
PORT=3000
CORS_ORIGIN=http://localhost:5173- Start the application
Terminal 1 - Backend:
cd backend
npm startTerminal 2 - Frontend:
cd frontend
npm run dev- Open your browser
http://localhost:5173
Frontend:
- React 18.3 - UI library
- Vite - Build tool
- Framer Motion - Animations
- Prism.js - Syntax highlighting
- Axios - HTTP client
- React Markdown - Review rendering
Backend:
- Node.js - Runtime
- Express.js - Web framework
- Google Gemini AI - AI model
- CORS - Cross-origin requests
- dotenv - Environment configuration
- Paste your code in the left editor
- Click "Run AI Review" (or press
Ctrl+Enter) - View comprehensive analysis in the right panel
| Shortcut | Action |
|---|---|
Ctrl+Enter |
Run AI review |
| Variable | Description | Default |
|---|---|---|
PORT |
Backend server port | 3000 |
GOOGLE_GEMINI_KEY |
Google Gemini API key | Required |
CORS_ORIGIN |
Allowed frontend URL | http://localhost:5173 |
Google Gemini Free Tier:
- 15 requests per minute
- 1,500 requests per day
- Optimized prompts to minimize token usage
Generate AI code review
Request:
{
"code": "function example() { return true; }"
}Response:
{
"review": "## Summary\nQuality: Good\n...",
"success": true,
"timestamp": "2026-01-19T12:00:00.000Z",
"responseTime": "1234ms",
"codeLength": 42
}Health check endpoint
Response:
{
"status": "ok",
"uptime": 123.45,
"timestamp": "2026-01-19T12:00:00.000Z"
}"Cannot connect to server"
- β
Ensure backend is running:
npm start - β Check if port 3000 is available
- β Verify CORS_ORIGIN matches frontend URL
"Invalid API key"
- β
Check
.envfile exists in backend directory - β Verify API key has no extra spaces
- β Get a new key from Google AI Studio
"API quota exceeded"
- β Wait for quota reset (resets daily)
- β Check usage at rate limits
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: @farmanali11
- LinkedIn: Farman Ali
- Google Gemini AI - AI model provider
- React - UI framework
- Prism.js - Syntax highlighting
- Framer Motion - Animation library
- Support for more programming languages
- Review history with local storage
- Export reviews as PDF/Markdown
- VS Code extension
- GitHub integration for PR reviews
- Team collaboration features
Give a βοΈ if this project helped you!