Paste code or a GitHub URL and get an instant, structured AI review β bugs, security issues, performance tips, and a fixed version, all in seconds.
Features Β· Tech Stack Β· Getting Started Β· API Docs Β· Contributing
- π€ AI-Powered Reviews β Deep code analysis via Google Gemini 2.5 Flash, returning structured JSON with bugs, security flaws, performance issues, and suggestions
- π GitHub Integration β Paste any GitHub file URL and the app fetches and reviews the raw code automatically, with language auto-detection from the file extension
- π JWT Authentication β Secure register/login flow with BCrypt password hashing and stateless JWT sessions
- π Quality Score β Animated circular score ring (0β10) with color-coded labels (Excellent β Critical Issues)
- ποΈ Review History β Every review is persisted to PostgreSQL and accessible per-user through the History page
- π 12 Languages β Java, Python, JavaScript, TypeScript, Kotlin, Go, Rust, C++, C#, PHP, Ruby, Swift
- π¨ Dark UI β GitHub-inspired dark theme with collapsible result sections and a one-click fixed-code copy button
- β‘ Reactive HTTP β Non-blocking WebClient for all outbound calls (Gemini API, GitHub raw content)
| Layer | Technology |
|---|---|
| Language | Java 24 |
| Framework | Spring Boot 4.0.6 |
| AI Model | Google Gemini 2.5 Flash |
| Database | PostgreSQL (Hibernate / Spring Data JPA) |
| Security | Spring Security 6 Β· JWT (JJWT 0.11.5) Β· BCrypt |
| HTTP Client | Spring WebFlux WebClient (reactive) |
| Build Tool | Gradle 9 |
| Frontend | Vanilla HTML/CSS/JS (single-page, no framework) |
| Code Review | GitHub URL Tab | Review History |
|---|---|---|
![]() |
![]() |
![]() |
Add your own screenshots to
docs/screenshots/to populate this section.
- Java 24 (or later)
- PostgreSQL 14+ running locally
- A Google Gemini API key β get one free at aistudio.google.com
git clone https://github.com/your-username/codesense-ai.git
cd codesense-aiCREATE DATABASE code_reviewer;Tables are created automatically on first run via Hibernate
ddl-auto=update.
Copy the example properties file and fill in your values:
cp src/main/resources/application.properties.example src/main/resources/application.propertiesSee the Environment Variables section for all required keys.
./gradlew bootRunThe server starts on http://localhost:8080.
Navigate to http://localhost:8080 and create an account to start reviewing code.
All configuration lives in src/main/resources/application.properties.
| Property | Description | Example |
|---|---|---|
spring.datasource.url |
PostgreSQL JDBC URL | jdbc:postgresql://localhost:5432/code_reviewer |
spring.datasource.username |
Database username | postgres |
spring.datasource.password |
Database password | yourpassword |
gemini.api.key |
Google Gemini API key | AIzaSy... |
gemini.api.url |
Gemini model endpoint | https://generativelanguage.googleapis.com/... |
jwt.secret |
HMAC-SHA256 signing secret (β₯ 32 chars) | MyS3cr3tK3y... |
jwt.expiration |
Token validity in milliseconds | 86400000 (24 hours) |
β οΈ Never commit real secrets. Addapplication.propertiesto.gitignoreand use environment variable substitution or a secrets manager in production.
| Method | Endpoint | Body | Description |
|---|---|---|---|
POST |
/api/auth/register |
{ username, email, password } |
Create a new account, returns JWT |
POST |
/api/auth/login |
{ email, password } |
Login, returns JWT |
All review endpoints require
Authorization: Bearer <token>header.
| Method | Endpoint | Body | Description |
|---|---|---|---|
POST |
/api/review |
{ code, language } |
Review pasted code |
POST |
/api/review/github |
{ githubUrl } |
Fetch a GitHub file and review it |
GET |
/api/reviews |
β | Return the authenticated user's review history |
curl -X POST http://localhost:8080/api/review \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-token>" \
-d '{
"code": "public int divide(int a, int b) { return a / b; }",
"language": "java"
}'{
"summary": "Simple division method with no null-check or zero-division guard.",
"bugs": ["Division by zero throws ArithmeticException when b = 0"],
"security": [],
"performance": [],
"suggestions": ["Add input validation", "Consider returning Optional<Integer>"],
"overallScore": 5.5,
"fixedCode": "public int divide(int a, int b) {\n if (b == 0) throw new IllegalArgumentException(\"Divisor cannot be zero\"); // FIXED: guard against division by zero\n return a / b;\n}"
}curl -X POST http://localhost:8080/api/review/github \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your-token>" \
-d '{
"githubUrl": "https://github.com/user/repo/blob/main/src/Main.java"
}'Contributions are welcome! Here's how to get started:
- 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
Please make sure your code compiles cleanly (./gradlew build) before submitting.
- OAuth2 / GitHub login
- Support for more languages (Scala, Dart, Elixirβ¦)
- Export review as PDF or Markdown
- VS Code extension
- Rate limiting per user
- Webhook support for CI/CD pipelines
This project is licensed under the MIT License β see the LICENSE file for details.
Built with β and π€ by Abood170
β Star this repo if you find it useful!


