An intelligent code review tool powered by Mistral AI that provides comprehensive analysis of your code for security vulnerabilities, performance issues, and best practices.
- 🤖 AI-Powered Analysis - Uses Mistral AI's latest models for intelligent code review
- 🔒 Security Focus - Identifies SQL injection, XSS, authentication issues, and more
- ⚡ Performance Review - Detects algorithmic complexity and optimization opportunities
- 📋 Best Practices - Ensures code quality, maintainability, and design patterns
- 🎯 Multiple Languages - Supports JavaScript, TypeScript, Python, Java, Go, Rust, and more
- 🎨 Clean UI - Modern, responsive interface built with Tailwind CSS
- 📊 Severity Levels - Issues categorized as Critical, High, Medium, or Low
- 💡 Actionable Suggestions - Each issue includes specific fix recommendations
- Node.js 18+ installed
- A Mistral AI API key (get one at console.mistral.ai)
Just visit: https://ai-code-review-tool-seven.vercel.app/
-
Clone the repository
git clone git@github.com:het-tale/ai-code-review-tool.git cd ai-code-review-tool -
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile in the root directory:MISTRAL_API_KEY=your_mistral_api_key_here
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
- Paste Your Code - Copy and paste your code into the text area
- Select Language - Choose the programming language from the dropdown
- Choose Review Focus - Select what to focus on:
- All - Comprehensive review (security + performance + best practices)
- Security - Focus on vulnerabilities and security issues
- Performance - Focus on optimization opportunities
- Best Practices - Focus on code quality and maintainability
- Click "Review Code" - Get your AI-powered analysis in seconds
- Review Results - See issues categorized by severity with actionable suggestions
Click the "Load Sample" button to load example code with intentional issues for testing.
code-review-ai/
├── app/
│ ├── api/
│ │ └── review/
│ │ └── route.ts # API endpoint for code review
│ ├── page.tsx # Main page component
│ └── layout.tsx # Root layout
├── components/
│ ├── CodeInput.tsx # Code input form component
│ └── ReviewResults.tsx # Results display component
├── lib/
│ └── mistral.ts # Mistral AI client configuration
├── types/
│ └── index.ts # TypeScript type definitions
├── .env.local # Environment variables (not in git)
└── README.md # This file
- Framework: Next.js (App Router)
- Language: TypeScript
- AI Model: Mistral AI SDK
- Styling: Tailwind CSS
- Runtime: Node.js
The tool returns structured JSON with the following format:
{
"summary": "Brief overall assessment",
"issues": [
{
"severity": "critical" | "high" | "medium" | "low",
"title": "Issue title",
"description": "Detailed description",
"lineNumber": 5,
"suggestion": "How to fix it"
}
],
"strengths": ["Positive aspects"],
"recommendations": ["General improvements"]
}The project uses:
- TypeScript for type safety
- ESLint for code linting
- Built with Mistral AI
- Powered by Next.js
- Styled with Tailwind CSS