CodeNakama is an AI-powered GitHub pull request reviewer that analyzes code changes using repository-wide context and posts structured feedback directly on PRs.
Built to demonstrate real-world backend engineering with event-driven systems, RAG pipelines, repo-wide indexing strategies, GitHub OAuth and external integrations using webhooks and APIs.
🔗 Live Demo: CodeNakama
-
Secure authentication using Better Auth with GitHub OAuth (supports both public and private repositories)
-
Seamless GitHub integration using Octokit and GraphQL APIs to fetch repositories, PRs, commits, and contribution data
-
Event-driven Automated PR review triggered by GitHub webhooks (handles both PR opened and synchronize events)
-
Context-aware AI reviews powered by RAG over the entire codebase
-
Repository-wide indexing using Pinecone vector database with background workers via Inngest
-
Multi-step background workflows (Inngest) for indexing and PR review pipelines
-
AI-generated reviews posted directly on GitHub pull requests and saved in Database to view from app
-
Supports multiple repos per user with independent indexing and review pipelines
User connects repository
↓
Repository indexing
↓
GitHub sends webhook on PR
↓
Webhook (Next.js API)
↓
Inngest (Background Job)
↓
Fetch PR Diff
↓
Retrieve Context
↓
Generate AI Review
↓
Post on GitHub
↓
Store Review in DBgit clone https://github.com/Baisayan/codenakama.git
cd codenakama
npm install-
Copy
.env.exampleto.env.localand fill in all required variables. -
Create a Neon PostgreSQL database and add the connection string to your .env file.
-
Create a GitHub OAuth App and set callback URL to:
http://localhost:3000/api/auth/callback/github. -
Create an index with:
Dimensions: 768and add API key to env -
Expose your local server using
ngrok http 3000and set the HTTPS URL as your GitHub webhook URL -
Run all services in separate terminals:
npm run dev
npx inngest-cli@latest dev
ngrok http 3000- Open http://localhost:3000 in your browser.
- Deployed on Vercel
- Inngest configured with production event keys
- GitHub webhooks updated to production URL