ReviewScope is an intelligent PR review platform that combines static analysis, semantic context, and AI reasoning to provide comprehensive, fast code reviews on GitHub.
ReviewScope analyzes pull requests end-to-end, evaluating code quality, security, performance, and maintainability. It runs directly on your own API keys, so you control costs and data.
Key Capabilities:
- π Static Analysis β AST-based rule detection (no LLM required, always free)
- π§ AI-Powered Reviews β Complexity-aware routing between fast (Gemini) and accurate (GPT-4) models
- π Semantic RAG β Retrieves relevant code context from your repository's history
- β‘ Smart Batching β Handles large PRs by intelligently chunking files
- π― Rule Validation β LLM classifies static findings (valid/false-positive/contextual)
- π° BYO API Keys β Transparent pricing, you pay only for what you use
Frontend & Dashboard:
- Next.js 16 (Turbopack)
- TailwindCSS + shadcn/ui
- NextAuth (GitHub OAuth)
Backend & Processing:
- Node.js Worker (background review jobs)
- Drizzle ORM + PostgreSQL
- Upstash Redis (caching & rate limiting)
AI & LLM:
- Gemini 2.5 (fast, low-cost reviews)
- GPT-4 (complex PRs, high accuracy)
- Context Engine (RAG + chunking)
Integration:
- GitHub Webhooks (real-time PR events)
- GitHub Marketplace (billing integration)
- GitHub API (PR data, code retrieval)
ReviewScope/
βββ apps/
β βββ api/ # REST API & webhooks
β βββ dashboard/ # Next.js web app (pricing, settings, auth)
β βββ worker/ # Node.js background job processor
βββ packages/
β βββ context-engine/ # RAG, chunking, layer assembly
β βββ llm-core/ # LLM routing, prompting, response parsing
β βββ rules-engine/ # Static analysis (JavaScript/TypeScript)
β βββ security/ # Encryption, masking utilities
βββ tsconfig.base.json # Shared TypeScript config
- Node.js 18+
- PostgreSQL 14+
- Upstash Redis URL (free tier available)
- GitHub App (for webhooks)
- LLM API keys (Gemini & OpenAI)
git clone <repo>
cd ReviewScope
npm installCreate .env.local files in each app:
apps/api/.env.local
DATABASE_URL=postgresql://user:pass@localhost/reviewscope
GITHUB_APP_ID=123456
GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY..."
GITHUB_WEBHOOK_SECRET=your_webhook_secret
apps/worker/.env.local
DATABASE_URL=postgresql://user:pass@localhost/reviewscope
REDIS_URL=https://default:password@redis-url.upstash.io
GEMINI_API_KEY=your_gemini_key
OPENAI_API_KEY=your_openai_key
apps/dashboard/.env.local
DATABASE_URL=postgresql://user:pass@localhost/reviewscope
NEXTAUTH_SECRET=generate_with_openssl_rand_base64_32
NEXTAUTH_URL=http://localhost:3000
GITHUB_ID=your_github_app_client_id
GITHUB_SECRET=your_github_app_secret
cd apps/api
npx drizzle-kit generate
npx drizzle-kit migrateTerminal 1 β API:
cd apps/api
npm run devTerminal 2 β Worker:
cd apps/worker
npm run devTerminal 3 β Dashboard:
cd apps/dashboard
npm run devDashboard available at http://localhost:3000
| Feature | Free | Pro | Team |
|---|---|---|---|
| Price | $0 | $15/mo | $50/mo |
| Repositories | Up to 3 | Up to 5 | Unlimited |
| Files per PR | 30 | 100 | Unlimited (Smart Batching) |
| RAG Context | 2 snippets | 5 snippets | 8 snippets |
| Custom Prompts | β | β | β |
| Org Controls | β | β | β |
| Support | Community | 24/7 Priority |
All tiers include:
- Static analysis (always free)
- AI reviews via your own API keys
- GitHub Marketplace seamless upgrades
GitHub PR Event
β
API Webhook Handler
β
Extract PR diff + fetch repo context
β
Queue Review Job (Redis/Bull)
β
Worker: Complexity Scorer
β
Run Static Rules (AST analysis)
β
RAG Retriever (semantic search)
β
Context Engine (assemble layers)
β
LLM Router (Gemini vs GPT-4)
β
Generate Review + Rule Validation
β
Post Comment to GitHub PR
Rules Engine (packages/rules-engine/)
- JavaScript/TypeScript AST parser
- Detects anti-patterns, security issues, code quality problems
- Zero LLM cost, always runs
Context Engine (packages/context-engine/)
- Semantic RAG using Upstash Redis
- Retrieves relevant code snippets from PR history
- Assembles system prompt with all context layers
LLM Core (packages/llm-core/)
- Routes by PR complexity (Gemini for simple, GPT-4 for complex)
- Injects rule violations into prompt
- Parses response including rule validation classifications
Worker (apps/worker/)
- Bull queue for async job processing
- Executes complexity scorer, rules, RAG, LLM calls
- Rate limiting per plan (Free=3/day, Pro=15/day, Team=unlimited)
Edit system prompt per repository:
Dashboard β Repositories β [Select] β Settings β Custom Prompt
Edit apps/worker/src/lib/plans.ts:
FREE: { dailyLimit: 3, reposLimit: 3, filesLimit: 30, ragSnippets: 2 },
PRO: { dailyLimit: 15, reposLimit: 5, filesLimit: 100, ragSnippets: 5 },
TEAM: { dailyLimit: Infinity, reposLimit: Infinity, filesLimit: Infinity, ragSnippets: 8 },Edit packages/llm-core/src/selectModel.ts:
// Complexity thresholds for model routing
if (complexity === "trivial" || complexity === "simple") {
return "gemini-2.5-flash"; // Fast, cheap
} else {
return "gpt-4o"; // Accurate, thorough
}cd apps/dashboard
vercel deploycd apps/api
# Deploy with DATABASE_URL env var
cd apps/worker
# Deploy with REDIS_URL, LLM API keysCreate .github/workflows/review.yml:
name: ReviewScope
on: [pull_request]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
- run: curl -X POST ${{ secrets.REVIEW_WEBHOOK }} \
-H "X-GitHub-Event: pull_request" \
-H "X-Hub-Signature-256: sha256=..." \
-d "${{ toJson(github.event) }}"cd apps/api
npm run studio # Drizzle Studio# Check Upstash console or use redis-cli
redis-cli GET review:pr:123# Monitor Bull dashboard
npm run queue:ui # localhost:3000/admin/queuesπ§ Email: parasverma7454@gmail.com
π GitHub Issues: ReviewScope Issues
π¬ Discussions: GitHub Discussions
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
All PRs are reviewed by ReviewScope! π€
ReviewScope is proprietary software. See LICENSE file for details.
Built with β€οΈ for developers who care about code quality.