Skip to content

Repository files navigation

🚀 MergeRay — Stark Industries Code Intelligence

"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.


⚡ Why MergeRay?

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

🏁 Quick Start

# 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:3000

🔐 Configuration

Update 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>

🔑 GitHub OAuth Setup

  1. Go to https://github.com/settings/developers

  2. Click New OAuth App

  3. Set:

    • Homepage URL → http://localhost:3000
    • Callback URL → http://localhost:3000/api/auth/callback/github
  4. Copy credentials into .env.local

💡 Tip: OAuth is optional — public repository scanning works without login.


✨ Core Features

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)

🧭 Application Routes

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

🏗️ Tech Stack

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

📦 Packaging & Deployment

Create Archive

tar -czf mergeray.tar.gz mergeray/ \
  --exclude='mergeray/node_modules' \
  --exclude='mergeray/.next' \
  --exclude='mergeray/data'

Setup on Another Machine

cd mergeray
npm install
cp .env.local.example .env.local
# Configure environment variables
npm run dev

🧠 Architecture Highlights

  • 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

🎯 Roadmap (Future 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

🤝 Contributing

Contributions are welcome! Feel free to:

  • Open issues for bugs or feature requests
  • Submit pull requests
  • Suggest improvements to scoring logic or UX

🛡️ License

MIT License — feel free to use and modify.


⚙️ Built For

Hackathons · Developer Productivity · Code Review Automation


Stark Industries AI Division "Sometimes you gotta run before you can walk."

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages