CodeLens: AI-Powered Code Review and Testing Platform
CodeLens is a browser-based AI developer workspace for reviewing Python code, generating starter tests, explaining logic, checking likely bugs, estimating complexity, suggesting optimizations, and scoring code quality.
Project Overview
The project is designed to make practical code analysis approachable for beginners. A user pastes Python code into the frontend, chooses an action, and receives a clear response from the FastAPI backend.
Gemini is used when a valid API key is configured. Local fallback analyzers keep reviews, explanations, test generation, bug checks, complexity estimates, and quality scoring useful when the external AI service is unavailable.
Key Features
- AI-powered code review with local fallback analysis.
- Starter unit-test generation for Python functions.
- Beginner and technical code explanations.
- Likely bug and edge-case verification.
- Static analysis, complexity estimation, and optimization suggestions.
- Quality scoring from 0 to 100.
- Email/password authentication with signed tokens.
- Project and review history for guest and logged-in users.
- Optional local Python execution for development.
Architecture
Browser UI (HTML, CSS, JavaScript) communicates with a FastAPI backend. The backend handles authentication, database access, analysis endpoints, and the optional Gemini integration. SQLite is used by default, with PostgreSQL available through DATABASE_URL.
Technology Stack
- Frontend: HTML, CSS, and JavaScript
- Backend: Python and FastAPI
- AI: Gemini API with local fallback analyzers
- Database: SQLite or PostgreSQL
- Deployment: Vercel static frontend and Render API
Try It Live and View the Code
Open the CodeLens live demo to explore the developer review workspace.
View the complete CodeLens source code on GitHub
Connect with Me
www.tauqueeralam.com
LinkedIn | GitHub
Discussion