An AI-powered code review system that automatically analyzes GitHub pull requests and provides comprehensive feedback on code quality, security, and best practices.
- 🔐 GitHub OAuth Integration - Secure authentication with your GitHub account
- 🤖 AI-Powered Analysis - DeepSeek (via OpenRouter) powered code review with intelligent suggestions
- 🔒 Security Scanning - Automated detection of security vulnerabilities
- 📊 Code Quality Metrics - Complexity analysis and code smell detection
- 📈 Analytics Dashboard - Insights and trends from your code reviews
- 📄 Export Reports - Download analysis results in Markdown or JSON format
- 🎨 Modern UI - Clean, responsive interface built with Next.js and Tailwind CSS
- Frontend: Next.js 14, TypeScript, Tailwind CSS, shadcn/ui
- Backend: Next.js API Routes, PostgreSQL, Prisma ORM
- Authentication: NextAuth.js with GitHub OAuth
- AI: DeepSeek Chat Model via OpenRouter API
- GitHub Integration: Octokit REST API
- Charts: Recharts
- Deployment: Vercel + Railway/Neon Database
- Node.js 18+ and npm
- PostgreSQL database
- GitHub OAuth App
- OpenRouter API key (for DeepSeek model access)
git clone https://github.com/yourusername/github-pr-reviewer.git
cd github-pr-reviewernpm installCreate a .env.local file in the root directory:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/pr_reviewer"
# NextAuth.js
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key"
# GitHub OAuth
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"
# OpenRouter API
OPENROUTER_API_KEY="your-openrouter-api-key"# Generate Prisma client
npx prisma generate
# Push the database schema
npx prisma db push
# (Optional) Seed the database
npx prisma db seednpm run devOpen http://localhost:3000 with your browser to see the result.
- Push your code to GitHub
- Connect your repository to Vercel
- Set the environment variables in Vercel dashboard
- Deploy - Vercel will automatically run
prisma generateduring build
Make sure to set all the required environment variables in your Vercel dashboard:
DATABASE_URLNEXTAUTH_URLNEXTAUTH_SECRETGITHUB_CLIENT_IDGITHUB_CLIENT_SECRETOPENROUTER_API_KEY