An AI-powered code review platform that automatically analyzes pull requests and provides intelligent feedback, suggestions, and security insights to help developers ship better code faster.
AI Code Review is a web application that integrates with GitHub to provide automated AI analysis of pull requests. The platform uses multiple AI providers to generate comprehensive code reviews, including bug detection, security vulnerability identification, and code quality suggestions. It features a modern dashboard for tracking review history, contribution analytics, and repository management.
Target audience: Individual developers and development teams looking to accelerate their code review process and improve code quality through AI-powered automation.
- AI PR Summaries: Get instant, intelligent summaries of pull requests to understand changes at a glance
- Inline Suggestions: Receive contextual code suggestions directly in pull requests for better implementations
- Security Detection: Automatically identify security vulnerabilities and potential issues before they reach production
- Auto Comments: AI automatically adds meaningful comments explaining complex code changes and improvements
- Faster Reviews: Reduce review time by 80% with AI-powered analysis that catches issues humans might miss
- Code Quality: Ensure consistent code quality with automated checks for best practices and standards
- GitHub Integration: Seamless integration with GitHub repositories and pull requests
- Dashboard Analytics: Track review history, contribution patterns, and repository statistics
- Multi-Provider AI: Support for multiple AI providers including Google AI, Groq, and Hugging Face
- Next.js 16.2.1 - React framework with App Router
- React 19.2.4 - UI library
- TypeScript 5 - Type-safe JavaScript
- Tailwind CSS 4 - Utility-first CSS framework
- Shadcn/ui - Component library
- Framer Motion - Animation library
- React Query - Data fetching and state management
- Zustand - State management
- Next.js API Routes - Server-side API
- Prisma 7.5.0 - ORM for database operations
- PostgreSQL - Primary database
- Better Auth - Authentication solution
- Inngest - Background job processing
- AI SDK - Multi-provider AI integration
- Google Generative AI - AI model provider
- Groq - AI model provider
- Hugging Face Inference - AI model provider
- Pinecone - Vector database for embeddings
- ESLint - Code linting
- TypeScript - Type checking
- Prisma - Database schema management
- Bun - Package manager and runtime
ai-code-review/
├── app/ # Next.js App Router pages
│ ├── (auth)/ # Authentication pages
│ ├── api/ # API routes
│ │ ├── auth/ # Authentication endpoints
│ │ ├── inngest/ # Background job endpoints
│ │ ├── repositories/ # Repository management
│ │ └── webhooks/ # GitHub webhooks
│ ├── dashboard/ # Main dashboard pages
│ │ ├── repository/ # Repository management
│ │ ├── reviews/ # Review history
│ │ └── settings/ # User settings
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Landing page
├── components/ # Reusable React components
│ ├── landing/ # Landing page components
│ ├── providers/ # Context providers
│ └── ui/ # Base UI components
├── lib/ # Utility libraries
│ ├── auth.ts # Authentication configuration
│ ├── auth-client.ts # Client-side auth
│ ├── db.ts # Database connection
│ └── utils.ts # General utilities
├── modules/ # Feature modules
│ ├── ai/ # AI integration logic
│ ├── auth/ # Authentication features
│ ├── dashboard/ # Dashboard functionality
│ ├── github/ # GitHub API integration
│ ├── repository/ # Repository management
│ ├── review/ # Review processing
│ └── settings/ # Settings management
├── prisma/ # Database schema and migrations
│ └── schema.prisma # Prisma schema definition
├── public/ # Static assets
├── types/ # TypeScript type definitions
├── next.config.ts # Next.js configuration
├── tailwind.config.ts # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Dependencies and scripts
- Node.js 18+ or Bun runtime
- PostgreSQL database
- GitHub OAuth application
- API keys for AI providers (Google AI, Groq, Hugging Face)
- Pinecone vector database (optional)
- Clone the repository:
git clone https://github.com/kartikey2004-git/AI-Code-Review.git
cd ai-code-review- Install dependencies:
bun install
# or
npm install- Set up environment variables:
cp .env.example .envConfigure the following environment variables:
DATABASE_URL- PostgreSQL connection stringGITHUB_CLIENT_ID- GitHub OAuth client IDGITHUB_CLIENT_SECRET- GitHub OAuth client secretGOOGLE_GENERATIVE_AI_API_KEY- Google AI API keyGROQ_API_KEY- Groq API keyHUGGINGFACE_API_KEY- Hugging Face API keyPINECONE_API_KEY- Pinecone API key (optional)
- Set up the database:
bun run db:push
# or
npx prisma db push- Run the development server:
bun run dev
# or
npm run devOpen http://localhost:3000 to view the application.
- Sign In: Use GitHub OAuth to authenticate and connect your GitHub account
- Connect Repositories: Authorize access to your GitHub repositories
- Create Pull Requests: Open PRs as usual - the AI will automatically analyze them
- View Reviews: Check your dashboard for AI-generated reviews and suggestions
- Track Analytics: Monitor your review history and contribution patterns
bun run dev- Start development serverbun run build- Build for productionbun run start- Start production serverbun run lint- Run ESLint
The application uses PostgreSQL as the primary database. The schema includes:
- Users and authentication data
- GitHub repository information
- Pull request reviews and analysis
- User sessions and accounts
Database configuration is managed through Prisma. See prisma/schema.prisma for the complete schema definition.
The application supports multiple AI providers:
- Google Generative AI: For general code analysis and reviews
- Groq: For fast inference and suggestions
- Hugging Face: For specialized models and embeddings
Configure API keys in your environment variables to enable each provider.
GitHub OAuth is required for authentication and repository access. Create a GitHub OAuth application with:
- Authorization callback URL:
http://localhost:3000/api/auth/callback/github(development) - Scope:
repo(for repository access)
The project uses:
- TypeScript for type safety
- ESLint for code linting
- Tailwind CSS for styling
- Prisma for database operations
- Create feature branches from
main - Follow the existing code patterns and component structure
- Use TypeScript for all new code
- Test changes thoroughly before submitting PRs
- Ensure all linting passes before committing
- Place new features in the
modules/directory - Use
components/for reusable UI components - Store utility functions in
lib/ - Follow the existing naming conventions and file organization
For support:
- Create an issue in the GitHub repository
- Check existing documentation and FAQs
- Review the codebase for implementation details
The project is actively maintained. Updates and improvements are regularly released based on user feedback and technological advancements.
Built by Kartikey - AI-powered code review for modern development teams.