π AI_PR_REVIEWER
AI-powered GitHub code review platform that automatically reviews pull requests, provides actionable feedback, tracks repository activity, and helps developers maintain code quality.
- Automatic pull request analysis
- AI-generated review comments
- Review history tracking
- PR quality insights
- Connect GitHub repositories
- Search and manage repositories
- Repository activity tracking
- GitHub integration
- Contribution heatmap
- Commit statistics
- Pull request metrics
- Monthly activity reports
- Secure GitHub authentication
- Session management
- Protected routes
- Free and Pro plans
- Usage limits
- Subscription management
- Billing integration
- Automated repository indexing
- Asynchronous review generation
- Webhook handling
- Event-driven workflows
- Next.js 16
- React 19
- TypeScript
- Tailwind CSS v4
- shadcn/ui
- TanStack Query
- Recharts
- Next.js Server Actions
- Prisma ORM
- PostgreSQL
- Better Auth
- Google AI SDK
- OpenAI Compatible SDK
- GitHub API
- Pinecone Vector Database
- Inngest
- Polar Payments
- GitHub Webhooks
Repository
βββai_pr_reviewer/
βββ README.md
βββ components.json
βββ css.d.ts
βββ eslint.config.mjs
βββ next.config.ts
βββ package.json
βββ postcss.config.mjs
βββ prisma.config.ts
βββ tsconfig.json
βββ app/
β βββ globals.css
β βββ layout.tsx
β βββ page.tsx
β βββ (auth)/
β β βββ login/
β β βββ page.tsx
β βββ api/
β β βββ auth/
β β β βββ [...all]/
β β β βββ route.ts
β β βββ inngest/
β β β βββ route.ts
β β βββ webhooks/
β β βββ github/
β β βββ route.ts
β βββ dashboard/
β βββ layout.tsx
β βββ page.tsx
β βββ repository/
β β βββ page.tsx
β βββ reviews/
β β βββ page.tsx
β βββ settings/
β β βββ page.tsx
β βββ subscriptions/
β βββ page.tsx
βββ components/
β βββ app-sidebar.tsx
β βββ providers/
β β βββ query-provider.tsx
β β βββ theme-provider.tsx
β β βββ toaster-provider.tsx
β βββ ui/
βββ hooks/
β βββ use-mobile.ts
βββ inngest/
β βββ client.ts
β βββ functions/
β βββ index.ts
β βββ review.ts
βββ lib/
β βββ auth-client.ts
β βββ auth.ts
β βββ db.ts
β βββ pinecone.ts
β βββ utils.ts
β βββ generated/
β βββ prisma/
β βββ browser.ts
β βββ client.ts
β βββ commonInputTypes.ts
β βββ enums.ts
β βββ models.ts
β βββ internal/
β β βββ class.ts
β β βββ prismaNamespace.ts
β β βββ prismaNamespaceBrowser.ts
β βββ models/
β βββ UserUsage.ts
β βββ Verification.ts
βββ module/
β βββ ai/
β β βββ actions/
β β β βββ index.ts
β β βββ lib/
β β βββ rag.ts
β βββ auth/
β β βββ components/
β β β βββ login-ui.tsx
β β β βββ logout.tsx
β β βββ utils/
β β βββ auth-utils.ts
β βββ dashboard/
β β βββ actions/
β β β βββ index.ts
β β βββ components/
β β βββ contribution-graph.tsx
β βββ github/
β β βββ lib/
β β βββ github.ts
β βββ payment/
β β βββ actions/
β β β βββ index.ts
β β βββ config/
β β β βββ polar.ts
β β βββ lib/
β β βββ subscription.ts
β βββ repository/
β β βββ actions/
β β β βββ index.ts
β β βββ components/
β β β βββ repository-skeleton.tsx
β β βββ hooks/
β β βββ use-connect-repository.ts
β β βββ use-repositories.ts
β βββ review/
β β βββ actions/
β β βββ index.ts
β βββ settings/
β βββ actions/
β β βββ index.ts
β βββ components/
β βββ profile-form.tsx
β βββ repository-list.tsx
βββ prisma/
β βββ schema.prisma
β βββ migrations/
β βββ migration_lock.toml
β βββ 20260329133431_test/
β β βββ migration.sql
β βββ 20260329135849_authentication/
β β βββ migration.sql
β βββ 20260402162416_repository_model_added/
β β βββ migration.sql
β βββ 20260413093751_added_review_and_userusage/
β β βββ migration.sql
β βββ 20260417153032_update/
β β βββ migration.sql
β βββ 20260426154209_added_polar_ids/
β βββ migration.sql
βββ .github/
βββ ISSUE_TEMPLATE/
β βββ bug_report.md
β βββ documentation.md
β βββ feature_request.md
βββ PULL_REQUEST_TEMPLATE/
βββ PULL_REQUEST_TEMPLATE.
- Node.js 20+
- PostgreSQL
- GitHub OAuth App
- Pinecone Account
- AI Provider API Key
git clone https://github.com/your-username/AI_PR_REVIEWER.gitcd AI_PR_REVIEWERnpm install
Create a .env file:
DATABASE_URL=
NEXT_PUBLIC_APP_URL=
NEXT_PUBLIC_APP_BASE_URL=
# GitHub Auth & API
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# AI Review Engine (OpenAI Compatible)
OPENAI_COMPATIBLE_API_KEY=
OPENAI_COMPATIBLE_BASE_URL=
OPENAI_COMPATIBLE_MODEL=
# Vector Database
PINECONE_DB_API_KEY=
# Authentication (Better-Auth)
BETTER_AUTH_SECRET=
BETTER_AUTH_URL=
# Payments (Polar.sh)
POLAR_ACCESS_TOKEN=
POLAR_WEBHOOK_SECRET=
POLAR_SUCCESS_URL=npm run devOpen:
http://localhost:3000
-
Sign in with GitHub.
-
Connect repositories.
-
Configure GitHub webhook.
-
Open or update a Pull Request.
-
CodeHorse automatically:
- Receives webhook events
- Fetches PR changes
- Generates AI review
- Stores review results
-
View reviews from the dashboard.
- Inline review comments
- Multi-model AI support
- Team workspaces
- Review quality scoring
- Slack integration
- GitLab support
- Bitbucket support
Contributions are welcome.
fork β branch β commit β pull requestPlease open an issue before submitting major changes.
If you find this project useful:
- Star the repository
- Report bugs
- Suggest features
- Share feedback
Built with β€οΈ using Next.js, Prisma, GitHub APIs, and AI.

