AI-Powered Code Reviews for GitHub Pull Requests
Features β’ Tech Stack β’ Getting Started β’ Environment β’ Contributing
- π€ AI-Powered Reviews - Automatically generate intelligent code reviews for your pull requests using Google's Gemini AI
- π GitHub Integration - Seamlessly connect your repositories with one-click OAuth authentication
- π Dashboard Analytics - Track your coding activity, commits, PRs, and AI reviews with beautiful visualizations
- π― RAG-Enhanced Context - Retrieval-Augmented Generation using Pinecone for codebase-aware reviews
- β‘ Real-time Processing - Background job processing with Inngest for non-blocking review generation
- π Contribution Graphs - Visualize your coding frequency over time
- π Modern UI - Beautiful, responsive interface built with Shadcn/UI and TailwindCSS
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| Styling | TailwindCSS 4 + Shadcn/UI |
| Database | PostgreSQL + Prisma ORM |
| Authentication | Better Auth (GitHub OAuth) |
| AI | Google Gemini via AI SDK |
| Vector Store | Pinecone |
| Background Jobs | Inngest |
| Data Fetching | TanStack Query |
| Package Manager | Bun |
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- Bun (recommended) or npm/yarn/pnpm
- PostgreSQL database
- Git
You'll also need accounts for:
- GitHub (for OAuth app)
- Google AI Studio (for Gemini API key)
- Pinecone (for vector storage)
- Inngest (for background jobs)
git clone https://github.com/yourusername/codebunny.git
cd codebunnybun install
# or
npm installCopy the example environment file and fill in your values:
cp .env.example .envSee Environment Variables for detailed configuration.
# Generate Prisma client
bun prisma generate
# Run migrations
bun prisma migrate devbun run devnpx inngest-cli@latest devFor GitHub webhooks during development, use ngrok:
ngrok http 3000Open http://localhost:3000 to see the application.
Create a .env file in the root directory with the following variables:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/codebunny"
# Better Auth
BETTER_AUTH_SECRET="your-secret-key-here"
BETTER_AUTH_URL="http://localhost:3000"
# GitHub OAuth
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"
# Application URL (use ngrok URL for webhooks during development)
NEXT_PUBLIC_APP_BASE_URL="http://localhost:3000"
# Google AI (Gemini)
GOOGLE_GENERATIVE_AI_API_KEY="your-gemini-api-key"
# Pinecone (Vector Store)
PINECONE_DB="your-pinecone-db-name"
PINECONE_DB_API_KEY="your-pinecone-api-key"| Service | How to Get |
|---|---|
| GitHub OAuth | Create OAuth App β Set callback URL to http://localhost:3000/api/auth/callback/github |
| Google Gemini | Google AI Studio β Create API key |
| Pinecone | Pinecone Console β Create account β Get API key and database name |
codebunny/
βββ app/ # Next.js App Router pages
β βββ (auth)/ # Authentication routes
β βββ api/ # API routes & webhooks
β βββ dashboard/ # Dashboard pages
βββ components/ # Reusable UI components
β βββ ui/ # Shadcn/UI components
βββ hooks/ # Custom React hooks
βββ inngest/ # Inngest background functions
β βββ function/ # Review generation logic
βββ lib/ # Utility functions & configs
βββ module/ # Feature modules
β βββ ai/ # AI review logic
β βββ auth/ # Authentication utilities
β βββ dashboard/ # Dashboard actions
β βββ github/ # GitHub API integration
β βββ repository/ # Repository management
β βββ review/ # Review management
β βββ settings/ # User settings
βββ prisma/ # Database schema & migrations
βββ public/ # Static assets
- Connect Repository - User authenticates with GitHub and connects their repositories
- Webhook Setup - CodeBunny registers a webhook on the connected repository
- PR Event - When a pull request is opened or updated, GitHub sends a webhook
- AI Processing - Inngest picks up the event and:
- Fetches the PR diff from GitHub
- Retrieves relevant context from Pinecone (RAG)
- Generates a comprehensive review using Gemini AI
- Post Review - The AI review is posted as a comment on the PR
- Dashboard - User can view all reviews and analytics in the dashboard
Contributions are welcome! Please read our Contributing Guide and Code of Conduct before submitting a pull request.
For security concerns, please review our Security Policy.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by Paras Patankar
