AI-powered code review SaaS that analyzes your GitHub repositories using Google Gemini AI
Features • Tech Stack • Getting Started • Project Structure • API Reference
- 🤖 AI-Powered Reviews - Leverage Google Gemini AI for intelligent code analysis
- 🔗 GitHub Integration - Connect repositories and select branches for review
- 📊 Dashboard - View stats, recent reviews, and quick actions
- 📜 Custom Guidelines - Define your team's coding standards with RAG support
- 📝 Review History - Track all past reviews with detailed issue breakdowns
- ⚡ Background Processing - Async review processing with Inngest
- 🔐 Secure Auth - GitHub OAuth with Better Auth
- 🌙 Dark Mode - Beautiful dark theme by default
| Category | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 |
| Styling | Tailwind CSS v4 + Shadcn UI |
| Database | SQLite (via Prisma + libsql) |
| Authentication | Better Auth + GitHub OAuth |
| AI | Google Gemini (via AI SDK) |
| Vector DB | Pinecone (RAG for guidelines) |
| Background Jobs | Inngest |
| State Management | TanStack React Query |
- Node.js 18+
- npm or yarn
- GitHub OAuth App credentials
- Google Gemini API key
# Clone the repository
git clone <your-repo-url>
cd project-2
# Install dependencies
npm install
# Generate Prisma client
npx prisma generate
# Push database schema
npx prisma db pushCreate a .env file in the root directory:
# Database
DATABASE_URL="file:./prisma/dev.db"
# Authentication (Required)
BETTER_AUTH_SECRET="generate-with-openssl-rand-base64-32"
BETTER_AUTH_URL="http://localhost:3000"
# GitHub OAuth (Required - create at GitHub Developer Settings)
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"
# Google Gemini AI (Required for reviews)
GOOGLE_GEMINI_API_KEY="your-gemini-api-key"
# Pinecone - Optional (for RAG)
PINECONE_API_KEY="your-pinecone-api-key"
# Inngest - Optional (for background jobs)
INNGEST_EVENT_KEY="your-inngest-event-key"
# App URL
NEXT_PUBLIC_APP_URL="http://localhost:3000"- Go to GitHub Developer Settings
- Create a new OAuth App
- Set Authorization callback URL to:
http://localhost:3000/api/auth/callback/github - Copy Client ID and Client Secret to
.env
npm run devOpen http://localhost:3000 to view the app.
src/
├── app/ # Next.js App Router
│ ├── (auth)/ # Auth routes (login)
│ ├── (dashboard)/ # Protected dashboard routes
│ │ ├── dashboard/ # Overview page
│ │ ├── review/ # Start new review
│ │ ├── history/ # Review history
│ │ │ └── [id]/ # Review details
│ │ ├── guidelines/ # Custom guidelines
│ │ └── settings/ # User settings
│ ├── api/ # API routes
│ │ ├── auth/[...all]/ # Better Auth handler
│ │ ├── reviews/ # Review CRUD
│ │ ├── guidelines/ # Guidelines CRUD
│ │ ├── github/ # GitHub API proxy
│ │ └── inngest/ # Inngest handler
│ └── page.tsx # Landing page
├── components/
│ ├── dashboard/ # Dashboard components
│ ├── landing/ # Landing page components
│ └── ui/ # Shadcn UI components
├── inngest/
│ ├── client.ts # Inngest client
│ └── functions.ts # Background job functions
└── lib/
├── auth.ts # Better Auth config
├── auth-client.ts # Client-side auth
├── gemini.ts # Gemini AI service
├── github.ts # GitHub API client
├── pinecone.ts # Pinecone RAG service
├── prisma.ts # Prisma client
└── utils.ts # Utility functions
prisma/
├── schema.prisma # Database schema
└── dev.db # SQLite database
| Model | Description |
|---|---|
| User | User profiles with GitHub connection |
| Session | Auth sessions |
| Account | OAuth provider accounts |
| Review | Code review jobs |
| ReviewResult | Individual issues found |
| Guideline | Custom coding standards |
| Endpoint | Method | Description |
|---|---|---|
/api/reviews |
GET | List user's reviews |
/api/reviews |
POST | Create new review |
/api/reviews/[id] |
GET | Get review details |
| Endpoint | Method | Description |
|---|---|---|
/api/guidelines |
GET | List guidelines |
/api/guidelines |
POST | Create guideline |
/api/guidelines?id= |
DELETE | Delete guideline |
| Endpoint | Method | Description |
|---|---|---|
/api/github/repos |
GET | List user's repos |
/api/github/branches?repo= |
GET | List repo branches |
Built with Shadcn UI:
- Button, Card, Input, Label, Select
- Table, Badge, Dialog, Sheet
- Avatar, Dropdown Menu, Separator
- Tooltip, Skeleton, Switch, Textarea
Reviews are processed asynchronously using Inngest:
- review/requested - Triggered when user starts a review
- processReview - Fetches files, runs AI analysis, stores results
- review/completed - Fired when review is done
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open a Pull Request
MIT License - feel free to use this project for your own purposes.
Built with ❤️ using Next.js, Gemini AI, and Tailwind CSS