A modern web application that analyzes GitHub Pull Requests to determine minimum required approvals based on CODEOWNERS files. Now featuring AI-powered approval predictions that learn from your team's historical patterns.
🚀 Live Demo • 📖 Documentation • 👨💻 Portfolio • 🐛 Report Bug • 💡 Request Feature
- 🔍 Smart CODEOWNERS Analysis - Parses CODEOWNERS files with advanced glob pattern matching
- 📊 Minimum Approval Calculation - Determines exact number of approvals needed
- 📁 File-by-File Breakdown - Shows which files require which approvers
- ⚡ Real-time PR Status - Displays current approval status and progress
- 👥 Team Integration - GitHub team support with member visualization
- 🤖 Genuine ML: Uses Random Forest classifier with proper feature engineering
- 📊 Real Training Data: Learns from actual GitHub PR and approval history
- 🔍 Smart Features: Analyzes file patterns, developer expertise, and temporal data
- ✅ Proper Validation: Cross-validation, train/test splits, and AUC scoring
- 📈 Continuous Learning: Model can be retrained with new data
- 🚀 Production Ready: Model saving/loading, API integration, and fallback support
- 🎭 8 Beautiful Themes - Light, Dark, Ocean, Forest, Sunset, Midnight, Arctic, Cherry
- 📱 Fully Responsive - Perfect experience on desktop, tablet, and mobile
- 💫 Smooth Animations - Skeleton loaders, slide effects, and micro-interactions
- 🌟 Modern Design - Clean UI with backdrop blur and smooth transitions
- 🎯 Accessibility First - WCAG 2.1 compliant with keyboard navigation
- 📈 Progress Visualization - Animated SVG progress rings with completion stats
- 📚 PR History - Local storage of recent PRs with quick access
- 🔀 Basic/Advanced Views - Toggle between simplified and detailed analysis
- 👥 Team Management - GitHub team integration with member visualization
- 💬 Feedback System - Built-in feedback form for user suggestions
- 🛡️ Privacy First - No server storage, all data kept locally
- 🔐 Optional GitHub Tokens - Works with public repos, supports private with tokens
- 🚫 No Tracking - No analytics, cookies, or personal data collection
- 🔒 Secure Communication - HTTPS only with direct GitHub API calls
- ⚙️ Rate Limit Handling - Smart retry logic with rate limit visualization
Our application follows a simple yet powerful workflow to analyze your Pull Requests:
Here's how we intelligently group files and determine required approvals:
Node.js >= 18.0.0
npm >= 8.0.0# Clone the repository
git clone https://github.com/Aswin-coder/pr-review-checker.git
cd pr-review-checker
# Install dependencies
npm install
# Start development server
npm run dev🌐 Open your browser: http://localhost:3000
📦 Using Docker
# Build and run with Docker
docker-compose up --build
# Or run individual services
docker run -p 3000:3000 pr-approval-finder🔧 Manual Setup
# Install dependencies for each service
npm install
cd client && npm install
cd ../server && npm install
# Start services separately
npm run server # Terminal 1
npm run client # Terminal 2-
📝 Enter GitHub PR URL
https://github.com/owner/repo/pull/123 -
🔑 Add GitHub Token (Optional)
- For private repositories
- Higher rate limits (5000 vs 60 requests/hour)
- Team member visibility
-
🔍 Analyze & Review
- View minimum required approvals
- See detailed file-by-file breakdown
- Track approval progress in real-time
-
Train the REAL ML Model (NEW!)
# Install Python dependencies python3 -m venv ml-env source ml-env/bin/activate pip install scikit-learn pandas numpy requests joblib # Train the model on your repository python ml-implementation-starter.py
-
See Intelligent Predictions
- Real ML confidence scores (not fake percentages)
- Based on actual feature engineering and cross-validation
- Learns from file types, developer expertise, and historical patterns
- Provides proper confidence intervals
-
Model Management
# Test the integration node test_real_ml.js # Check model status GET /api/ml/stats # Make predictions POST /api/ml/predict
For detailed ML setup, see docs/ML_CODEOWNERS.md
🎨 Theme Customization
Choose from 8 professionally designed themes:
- ☀️ Light - Clean and bright (default)
- 🌙 Dark - Easy on the eyes
- 🌊 Ocean - Deep blue vibes
- 🌲 Forest - Natural green tones
- 🌅 Sunset - Warm orange hues
- 🌌 Midnight - Deep purple night
- ❄️ Arctic - Cool blue-white
- 🌸 Cherry - Soft pink accents
🔒 Privacy & Security
Our application prioritizes your privacy and security with comprehensive protection:
Click the 🔒 Privacy and 🛡️ Cloudflare buttons in the app footer to view detailed information about:
- No Server Storage - All data stays in your browser
- Local Storage Only - Tokens and history stored locally
- No Tracking - Zero analytics or data collection
- Cloudflare Protection - Enterprise-grade security and performance
- Open Source - Full code transparency
⚙️ Configuration Options
Create .env files for customization:
# Server configuration
GITHUB_TOKEN=your_github_token_here
PORT=3001
NODE_ENV=production
# Client configuration
REACT_APP_API_URL=http://localhost:3001Frontend
- ⚛️ React 18 with Hooks
- 🎨 CSS3 with Custom Properties (CSS Variables)
- 📱 Responsive Design with CSS Grid/Flexbox
- 🌐 Axios for API requests
- 🎭 8-theme system with persistence
Backend
- 🚀 Node.js + Express
- 🔗 GitHub REST API v3
- 🔍 Minimatch for glob patterns
- 🛡️ CORS enabled
- 📧 Nodemailer for feedback system
- 🧠 ML Training system with enhanced PR fetching
DevOps
- 🚀 VPS server for production deployment
- 📦 npm for package management
- 🧪 Jest for testing
- 📝 ESLint + Prettier
- 🐳 Docker support
├── 🎨 Theme System # CSS variables with persistent storage
├── 💀 Skeleton Loaders # Beautiful loading animations
├── 📊 Progress Visualization # SVG-based progress rings
├── 📱 Responsive Grid # CSS Grid for adaptive layouts
├── 🔍 Pattern Matching # Advanced glob pattern support
├── 🔒 Privacy Modal # Comprehensive privacy information
├── 💬 Feedback System # User feedback collection
├── 🧠 ML Training System # Enhanced PR fetching and duplicate handling
└── 🚀 Performance Optimized # Lazy loading and memoization
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests in watch mode
npm run test:watch
# Run specific test suite
npm run test:client
npm run test:server- ✅ Component testing with React Testing Library
- ✅ API endpoint testing with Supertest
- ✅ Integration testing for core workflows
- ✅ GitHub API mocking for reliable tests
# Build production image
docker build -t pr-approval-finder .
# Run production container
docker run -p 3000:3000 pr-approval-finder
# Or use docker-compose
docker-compose up --build# Build for production
npm run build
# Start production server
npm start
# Or use PM2 for process management
pm2 start server/index.js --name pr-approval-finderNote: Vercel is used exclusively for PR branch previews and development testing, not for production deployment.
# Deploy PR preview to Vercel
vercel
# Preview branch deployment
vercel --prodWe love contributions! Please see our Contributing Guide for details.
- 🍴 Fork the repository
- 🌿 Create your feature branch (
git checkout -b feature/amazing-feature) - 🔧 Make your changes
- ✅ Run tests (
npm test) - 📝 Commit your changes (
git commit -m 'Add amazing feature') - 🚀 Push to the branch (
git push origin feature/amazing-feature) - 🎯 Open a Pull Request
We use Prettier and ESLint to maintain consistent code style:
# Format code
npm run format
# Lint code
npm run lint
# Fix linting issues
npm run lint:fix- ⚡ Optimized Bundle - Tree shaking and code splitting
- 🚀 Fast Loading - Skeleton loaders for perceived performance
- 📱 Mobile Optimized - Touch-friendly interface
- 🔄 Efficient Caching - Smart API response caching
- 📈 Lightweight - Minimal dependencies
POST /api/pr-approvers
{
"prUrl": "https://github.com/owner/repo/pull/123",
"githubToken": "optional_token"
}
POST /api/ml/train
{
"owner": "repo-owner",
"repo": "repo-name",
"token": "github-token",
"prCount": 1000
}
POST /api/ml/predict
{
"files": ["src/file.js"],
"confidence": 0.3
}
GET /api/ml/status
GET /api/ml/stats
POST /api/ml/clear
POST /api/ml/remove-duplicates{
"prInfo": {
"title": "PR Title",
"number": 123,
"author": "username",
"state": "open",
"url": "https://github.com/owner/repo/pull/123"
},
"minRequiredApprovals": [
{
"files": ["src/component.js"],
"ownerDetails": [...],
"needsApproval": true,
"approvedBy": null
}
],
"totalGroupsNeedingApproval": 2,
"approvals": ["reviewer1"],
"requestedReviewers": ["reviewer2"],
"mlPredictions": {
"predictions": [
{
"approver": "developer1",
"confidence": 0.85
}
]
},
"rateLimitInfo": {
"limit": 5000,
"remaining": 4999,
"resetTime": "2025-01-01T12:00:00Z"
}
}- 🐛 Issues: GitHub Issues
- 💡 Feature Requests: GitHub Issues
- 💬 Feedback: Use the feedback button in the app
- 📖 Documentation: Full Documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- 💝 Built with ❤️ using React and Node.js
- 🔗 GitHub API for PR and CODEOWNERS data
- 🎨 Modern CSS techniques for beautiful UI
- 🔍 Minimatch library for glob pattern matching
- 🚀 VPS server for production hosting
- 🔧 Vercel for PR branch previews
- 🤖 Cursor AI for development assistance
- 📥 Input Processing - Validates GitHub PR URL format
- 🔗 API Integration - Fetches PR data and CODEOWNERS from GitHub
- 🧮 Pattern Matching - Uses minimatch to match files against CODEOWNERS patterns
- 👥 Team Resolution - Resolves GitHub teams to individual members
- 📊 Analysis - Calculates minimum required approvals based on file changes
- 🧠 ML Predictions - Uses trained models to predict approval likelihood
- 🎨 Visualization - Presents results with interactive progress indicators