Coral-powered repository intelligence for open-source maintainers.
PRMate turns GitHub repository activity into actionable maintainer insights using Gemini, Coral SQL, and the GitHub API.
- Repository Health Score — combines open issues and merged PRs into a fast 0–100 signal
- AI Weekly Summary — summarizes themes, risks, priorities, and suggested actions
- Weekly Maintainer Report — generates a markdown report with health, wins, risks, contributors to watch, and recommended actions
- AI Issue Prioritization — ranks top issues by impact, severity, and urgency
- Duplicate Issue Detection — finds duplicate or near-duplicate issue reports
- AI Release Notes — generates grouped release notes from merged PRs
- Ask Repository — asks questions against the fetched GitHub activity snapshot
- Coral Repository Explorer — runs SQL through Coral against GitHub-backed data
- Demo Repository Presets — one-click analysis for Next.js, React, Vite, and TypeScript
PRMate implements several security best practices to ensure safe production use:
- Environment Variable Validation — All required API keys are validated at startup
- Rate Limiting — API endpoints are rate-limited to prevent abuse
- Input Validation & Sanitization — All user inputs are validated and sanitized
- CORS Configuration — Proper CORS headers for secure cross-origin requests
- Security Headers — Implements X-Frame-Options, X-Content-Type-Options, and other security headers
- Request Timeouts — All external API calls have appropriate timeout handling
- SQL Injection Prevention — Coral queries are validated to only allow SELECT statements
- Error Logging — Comprehensive error logging for debugging and monitoring
- Health Check Endpoint — Monitor service status and dependencies
- Next.js 16 — React framework with app router
- React 19 — UI library
- TypeScript — Type-safe development
- Gemini AI — AI-powered insights
- Coral SQL — SQL interface over GitHub data
- GitHub API — Repository data source
- Tailwind CSS — Styling
- Octokit — GitHub API client
Open-source maintainers spend significant time:
- triaging issues
- reviewing pull requests
- detecting duplicate reports
- generating release notes
- identifying project risks
- understanding recent repository activity
That work is valuable, but it is repetitive and often slows down maintainers who should be focused on decisions.
PRMate analyzes repository activity and generates a maintainer-ready dashboard:
- health score
- weekly maintainer report
- AI issue prioritization
- duplicate issue detection
- AI release notes
- repository Q&A
- Coral SQL repository explorer
The goal is simple: turn noisy repository data into clear next actions.
- Repository Health Score — combines open issues and merged PRs into a fast 0–100 signal.
- AI Weekly Summary — summarizes themes, risks, priorities, and suggested actions.
- Weekly Maintainer Report — generates a markdown report with health, wins, risks, contributors to watch, and recommended actions.
- AI Issue Prioritization — ranks top issues by impact, severity, and urgency.
- Duplicate Issue Detection — finds duplicate or near-duplicate issue reports.
- AI Release Notes — generates grouped release notes from merged PRs.
- Ask Repository — asks questions against the fetched GitHub activity snapshot.
- Coral Repository Explorer — runs SQL through Coral against GitHub-backed data.
- Demo Repository Presets — one-click analysis for Next.js, React, Vite, and TypeScript.
- Next.js
- React
- Gemini
- Coral
- GitHub API
- Tailwind CSS
GitHub API
↓
Repository Activity Snapshot
↓
Gemini
↓
Insights Dashboard
Coral SQL
↓
Repository Explorer
↓
Demo Query Results
- Open the dashboard.
- Click the Next.js preset.
- Show the repository health score, issues, PRs, contributors, and commits.
- Generate the AI weekly summary.
- Generate top priority issues.
- Generate release notes.
- Generate the weekly maintainer report.
- Open the Coral Repository Explorer.
- Run:
SELECT *
FROM github.repositories
LIMIT 5- Explain: Coral provides a unified SQL interface over repository data.
Open-source maintainers spend hours understanding repository activity: issues, pull requests, release planning, and risk.
Analyze https://github.com/vercel/next.js with the preset button.
Show:
- health score
- repository stats
- AI weekly summary
- priority issues
Generate release notes and the weekly maintainer report.
Show:
- grouped release notes
- report health
- wins
- risks
- recommended actions
Open the Coral Repository Explorer.
Run:
SELECT *
FROM github.repositories
LIMIT 5Explain:
Coral provides a unified SQL interface over GitHub data. PRMate combines Coral + Gemini + GitHub to turn repository activity into actionable maintainer insights.
Install dependencies:
npm installCreate .env.local:
GITHUB_TOKEN=your_github_token
GEMINI_API_KEY=your_gemini_api_keyIf Coral is not available from your Node environment, set CORAL_PATH to the Coral executable:
CORAL_PATH=C:\path\to\coral.exeRun the development server:
npm run devOpen:
- dashboard:
http://localhost:3000 - Coral Repository Explorer:
http://localhost:3000/coral - Health check:
http://localhost:3000/api/health
- Never commit
.env.localor any files containing real API keys - Use different API keys for development and production
- Rotate API keys regularly
- Use environment-specific API keys with minimal required permissions
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Generate a new token with
public_reposcope (for public repositories) - Store the token securely in your environment variables
- Go to Google AI Studio → API Keys
- Create a new API key
- Store the key securely in your environment variables
For production deployment, configure environment variables in your deployment platform:
- Go to your Vercel project dashboard
- Navigate to Settings → Environment Variables
- Add the following variables:
Required:
-
GITHUB_TOKEN: Your GitHub personal access token- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Generate a new token with
public_reposcope - Copy and paste the token
-
GEMINI_API_KEY: Your Gemini API key- Go to Google AI Studio → API Keys
- Create a new API key
- Copy and paste the key
Optional:
CORAL_PATH: Full path to Coral executable (if using Coral)NODE_ENV: Set toproduction
- Select the environments (Production, Preview, Development) where each variable should be available
- Redeploy your project to apply the changes
- Use environment-specific configuration
- Enable additional security headers
- Set up monitoring and alerting
- Use HTTPS only
- Implement proper authentication if needed
- Regular security audits
- Keep dependencies updated
The application implements the following rate limits:
/api/analyze: 30 requests per minute per IP/api/ai: 50 requests per minute per IP/api/coral: 20 requests per minute per IP
Monitor the application health using the /api/health endpoint:
curl http://localhost:3000/api/healthResponse includes:
- Service status
- Configuration status
- Environment information
The application uses structured logging for:
- API requests
- Errors
- Rate limit violations
- Performance metrics
# Lint code
npm run lint
# Format code
npm run format
# Check code formatting
npm run format:check
# Build for production
npm run buildNote: Test infrastructure is available but not included in dependencies due to React 19 compatibility. To enable testing, install compatible testing libraries manually or use React 18 compatible versions.
- Push your code to GitHub
- Import the project in Vercel
- Add environment variables in Vercel dashboard (Settings → Environment Variables):
GITHUB_TOKEN- Your GitHub API tokenGEMINI_API_KEY- Your Gemini API keyCORAL_PATH- (optional) Path to Coral executableNODE_ENV- Set toproduction
- Deploy
Create a Dockerfile:
FROM node:20-alpine AS base
# Install dependencies only when needed
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package*.json ./
RUN npm ci
# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
# Production image
FROM base AS runner
WORKDIR /app
ENV NODE_ENV production
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
EXPOSE 3000
CMD ["node", "server.js"]Build and run:
docker build -t prmate .
docker run -p 3000:3000 --env-file .env.local prmateGITHUB_TOKEN=your_production_github_token
GEMINI_API_KEY=your_production_gemini_key
NODE_ENV=production
CORAL_PATH=/usr/local/bin/coral # if using CoralWe welcome contributions! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Next.js
- Powered by Gemini AI
- SQL interface by Coral
- Repository data from GitHub API