"X-ray every pull request before it becomes review debt."
MergeRay is a full-stack Next.js application that analyzes GitHub pull requests in real time, surfaces risks, and helps teams ship cleaner code faster. Designed with a futuristic Iron Man / J.A.R.V.I.S. interface, it blends powerful backend intelligence with a premium developer experience.
Code reviews slow down when PRs get large, complex, or unclear. MergeRay solves this by:
- 🔍 Automatically analyzing PR structure and complexity
⚠️ Highlighting risky changes before reviewers even start- 🧠 Recommending the best reviewers based on contribution history
- ✂️ Suggesting smarter PR splits for faster reviews
# 1. Install dependencies
npm install
# 2. Configure environment
cp .env.local.example .env.local
# Fill in required values (see below)
# 3. Start development server
npm run dev
# 4. Open in browser
http://localhost:3000Update your .env.local file:
DATABASE_URL=file:./data/mergeray.db
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=<generate using: openssl rand -base64 32>
GITHUB_CLIENT_ID=<GitHub OAuth App Client ID>
GITHUB_CLIENT_SECRET=<GitHub OAuth App Secret>
GITHUB_TOKEN=<optional: personal access token>-
Click New OAuth App
-
Set:
- Homepage URL →
http://localhost:3000 - Callback URL →
http://localhost:3000/api/auth/callback/github
- Homepage URL →
-
Copy credentials into
.env.local
💡 Tip: OAuth is optional — public repository scanning works without login.
| Feature | What it does |
|---|---|
| 🔎 Real PR Scanning | Paste any GitHub PR URL and get instant analysis |
| 📊 Risk Scoring Engine | Detects complexity, large diffs, and risky patterns |
| 👨💻 Reviewer Intelligence | Suggests best reviewers using contribution data |
| ✂️ PR Split Suggestions | Break large PRs into logical, reviewable chunks |
| 🔄 Before/After Simulation | Shows impact of applying suggested improvements |
| 🤖 J.A.R.V.I.S. Briefing | Human-readable summary of risks and actions |
| 🕘 Scan History | Persistent scan logs via SQLite |
| 🔐 GitHub Authentication | Save and manage scans per user |
| 🎭 Demo Mode | Explore features without API usage (/dashboard/demo) |
| Route | Description |
|---|---|
/ |
Landing page with PR input |
/dashboard/demo |
Demo experience with mock data |
/dashboard/[scanId] |
Detailed scan results |
/history |
View all previous scans |
/api/scan |
Run PR analysis (POST) |
/api/pr/[id] |
Fetch scan details (GET) |
/api/scans |
List scan history |
| Layer | Technology |
|---|---|
| Framework | Next.js 14 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS |
| Animations | Framer Motion |
| Authentication | NextAuth.js (GitHub OAuth) |
| Database | SQLite (Node.js native) |
| API | GitHub REST API (Octokit) |
| Validation | Zod |
| Fonts | Orbitron · Rajdhani · JetBrains Mono |
tar -czf mergeray.tar.gz mergeray/ \
--exclude='mergeray/node_modules' \
--exclude='mergeray/.next' \
--exclude='mergeray/data'cd mergeray
npm install
cp .env.local.example .env.local
# Configure environment variables
npm run dev- Modular API design for scalable PR analysis
- Lightweight SQLite for zero-config persistence
- Server-first architecture using Next.js App Router
- Secure auth flows with NextAuth
- Extensible scoring system for future ML enhancements
- 🔮 AI-powered code smell detection (LLM integration)
- 📈 Team analytics dashboard
- 🧩 GitHub App version (org-wide integration)
- 🧪 Test coverage & CI insights
- 🧵 Inline PR commenting bot
Contributions are welcome! Feel free to:
- Open issues for bugs or feature requests
- Submit pull requests
- Suggest improvements to scoring logic or UX
MIT License — feel free to use and modify.
Hackathons · Developer Productivity · Code Review Automation
Stark Industries AI Division "Sometimes you gotta run before you can walk." ⚡