Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⟨/⟩ CodeSensei — AI-Powered Code Reviewer

Your personal senior developer, available 24/7. Paste code, get deep feedback on bugs, performance, and best practices.

Before Review

CodeSensei Before Review

After Review

CodeSensei After Review


✨ Features

Feature Description
🐛 Bug Detection Finds bugs with severity levels (critical / high / medium / low) and exact fix suggestions
Performance Analysis Identifies inefficiencies in memory, performance, and algorithmic complexity
📐 Best Practices Flags naming, structure, security, readability, testing, and documentation issues
Positive Highlights Recognizes what you did well — not just what's wrong
🔧 Refactored Snippets Optionally shows a cleaner version of the most critical section
🔢 Quality Score 1–10 score with animated ring visualization
🌐 17 Languages JavaScript, TypeScript, Python, Java, Go, Rust, and more

🖥️ Tech Stack

Frontend

  • React 18
  • Custom CSS with CSS variables (dark, industrial aesthetic)
  • Google Fonts: Syne + Space Mono

Backend

  • Node.js + Express
  • Google Gemini API (gemini-2.5-flash)
  • Structured JSON responses for reliable parsing

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • A Google Gemini API key

1. Clone the repo

git clone https://github.com/YOUR_USERNAME/ai-code-reviewer.git
cd ai-code-reviewer

2. Install dependencies

npm run install:all

3. Configure the backend

cp backend/.env.example backend/.env

Then edit backend/.env and add your API key:

GEMINI_API_KEY=your_gemini_api_key

4. Run the app

Terminal 1 — Backend:

npm run dev:backend
# Server starts at http://localhost:3001

Terminal 2 — Frontend:

npm run dev:frontend
# App opens at http://localhost:3000

📁 Project Structure

ai-code-reviewer/
│
├── backend/
│   ├── server.js
│   ├── package.json
│   ├── package-lock.json
│   └── .env.example
│
├── frontend/
│   ├── src/
│   │   ├── App.jsx
│   │   ├── App.css
│   │   └── index.jsx
│   ├── index.html
│   ├── vite.config.js
│   ├── package.json
│   └── package-lock.json
│
├── screenshots/
│   └── codesensei-home.png
│
├── .gitignore
├── README.md
├── package.json
└── package-lock.json

🔌 API Reference

POST /api/review

Request body:

{
  "code": "function foo() { ... }",
  "language": "JavaScript",
  "context": "This is a utility function for array sorting"
}

Response:

{
  "summary": "The code has a critical off-by-one error and uses var instead of const/let.",
  "score": 4,
  "language": "JavaScript",
  "bugs": [
    {
      "line": "3",
      "severity": "critical",
      "issue": "Loop condition `i <= arr.length` causes out-of-bounds access",
      "fix": "Change to `i < arr.length`"
    }
  ],
  "inefficiencies": [...],
  "bestPractices": [...],
  "positives": ["Good use of descriptive parameter names"],
  "refactoredSnippet": "..."
}

🌍 Deployment

Backend — Deploy to Railway, Render, or any Node host. Set GEMINI_API_KEY as an environment variable.

Frontend — Run npm run build:frontend, then deploy the frontend/build/ folder to Vercel, Netlify, or GitHub Pages. Update the proxy URL in frontend/package.json to point to your deployed backend.


📝 License

MIT — use it, fork it, ship it.


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages