AI-Powered GitHub Issue Management Platform with Real-time Sync
Snorlax helps open-source maintainers intelligently manage, categorize, and respond to GitHub issues using AI and semantic search. Reduce triage time by 80% with automated analysis and one-click responses.
- π€ AI-Powered Issue Triage - Claude Sonnet 4.5 analyzes issues with 200K context window
- π Semantic Code Search - Index and query codebases using vector embeddings (pgvector)
- π― Smart Categorization - Auto-detect duplicates, implemented features, and related issues
- β‘ Real-time GitHub Sync - Webhooks for instant issue/PR updates
- π¬ One-Click Responses - Post AI-generated responses directly to GitHub
- π Batch Processing - Background triage of all uncategorized issues with progress tracking
- π¨ Modern Dashboard - Clean UI with dark mode support
- β Webhook Support - Real-time GitHub event processing with HMAC signature verification
- β Action Execution - Post comments directly to GitHub from the UI
- β Batch Status Tracking - Monitor progress of background triage operations
- β Environment Configuration - Production-ready CORS and secrets management
- β Cost Optimization - Manual analyze button + caching = 90% API cost reduction
- Primary category (critical, bug, feature_request, question, low_priority)
- Confidence score (0-100%)
- Reasoning explanation
- Duplicate detection with similarity scores
- Related PRs and issues
- Related code files with line numbers
- 3 suggested responses (copy or post to GitHub)
- Docker Desktop (must be running)
- Python 3.9+
- Node.js 18+
- Anthropic API Key (get from console.anthropic.com)
- GitHub Token (optional, for higher rate limits - get from github.com/settings/tokens)
# 1. Clone repository
git clone <your-repo-url>
cd snorlax
# 2. One-command setup (sets up DB + dependencies)
make setup
# 3. Start development servers
make dev- Access the Dashboard: http://localhost:3000
- Configure API Keys: Click βοΈ Settings
- Add your Anthropic API Key (required for AI analysis)
- Add GitHub Token (optional, increases rate limit from 60 to 5,000/hour)
- Index a Repository: Click "+" button β Enter GitHub URL
- Import Issues: Select repo β Click "Import Issues"
- Start Triaging: Click "Enter Triage Mode" and start analyzing!
Access Points:
- π¨ Frontend: http://localhost:3000
- π Backend API: http://localhost:8000/docs
- π Database:
postgresql://snorlax:snorlax_password@localhost:5432/snorlax
# System Validation
make validate # Check if system is ready (Docker, Python, Node.js)
# Setup & Startup
make setup # Complete initial setup (run once)
make dev # Start backend + frontend + database
make dev-bg # Start all in background
# Database Management
make db-up # Start PostgreSQL with pgvector
make db-down # Stop database
make db-migrate # Run database migrations
make db-reset # Reset database (β οΈ deletes all data)
# Development
make backend # Start backend only (port 8000)
make frontend # Start frontend only (port 3000)
# Cleanup
make clean # Stop all services and clean up
make help # Show all commandsBackend (backend/.env):
# Required
APP_DATABASE_URL=postgresql://snorlax:snorlax_password@localhost:5432/snorlax
# Production Security
ALLOWED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
GITHUB_WEBHOOK_SECRET=<generate with: openssl rand -hex 32>
WEBHOOK_URL=https://api.yourdomain.com/api/webhooks/github
# Optional
DATA_DIR=./dataFrontend (frontend/.env.local):
NEXT_PUBLIC_API_URL=http://localhost:8000 # Production: https://api.yourdomain.com- Go to your repository β Settings β Webhooks β Add webhook
- Payload URL: Copy from Settings modal in dashboard
- Content type:
application/json - Secret: Set
GITHUB_WEBHOOK_SECRETin backend.env(match exactly) - Events: Select "Issues" and "Pull requests"
- Active: β Check
- Click "Add webhook"
Test webhook: GitHub will send a "ping" event immediately. Check delivery in webhook settings.
| Layer | Technology |
|---|---|
| Frontend | Next.js 15, React 19, TypeScript, Tailwind CSS |
| Backend | FastAPI (Python), Pydantic, Uvicorn |
| Database | PostgreSQL 15 with pgvector extension |
| AI | Claude Sonnet 4.5 (Anthropic) - 200K context |
| Code Search | CocoIndex with vector embeddings |
| GitHub API | PyGithub with webhook support |
| Deployment | Docker, Docker Compose |
snorlax/
βββ frontend/ # Next.js 15 Application
β βββ app/
β β βββ dashboard/ # Main dashboard page
β βββ components/ # React components
β β βββ TriageModeModal.tsx # Full-screen triage UI (rewritten)
β β βββ SettingsModal.tsx # API keys + webhook setup
β β βββ IssuesPRsPanel.tsx # Issues/PRs list
β β βββ CategorizedIssuesPanel.tsx # Categorized view
β β βββ ...
β βββ lib/
β βββ config.ts # Centralized API endpoints
β
βββ backend/ # FastAPI Backend
β βββ main.py # App entry + CORS config
β βββ api/ # API Routes
β β βββ repositories.py # Repo indexing
β β βββ github.py # GitHub integration + comment posting
β β βββ triage.py # Issue triage + batch status
β β βββ webhooks.py # GitHub webhook receiver (NEW)
β β βββ categorization.py # Issue categorization
β β βββ settings.py # API key management
β βββ services/
β β βββ ai/
β β β βββ categorization.py # Claude AI integration
β β βββ github/
β β βββ api.py # GitHub API wrapper
β βββ utils/
β β βββ database.py # DB helpers + context managers
β βββ database/
β βββ migrations/ # SQL migration scripts
β
βββ infra/ # Infrastructure
β βββ docker-compose.yml # PostgreSQL + pgvector
β
βββ docs/ # Documentation
β βββ README.md # Full documentation
β βββ SETUP_GUIDE.md # Detailed setup
β βββ TRACKING.md # Development roadmap
β
βββ data/ # Cloned repositories (gitignored)
βββ Makefile # Development commands
βββ README.md # This file
- Webhook Signature Verification - HMAC SHA-256 validation for GitHub webhooks
- Encrypted API Keys - Keys stored encrypted in database, never exposed to frontend
- CORS Protection - Environment-based allowed origins
- Request Size Limits - 1MB max webhook payload
- Database Connection Pooling - Prevents connection exhaustion
- Context Managers - Automatic resource cleanup
- Auto-analyze on every navigation
- 50 issues Γ 2 navigations = 100 API calls
- Cost: $2-5 per session
- Manual "Analyze" button with caching
- 50 issues, analyze only 10 = 10 API calls
- Cost: $0.20-0.50 per session
- Savings: 90%
lsof -ti:8000 | xargs kill -9 # Backend
lsof -ti:3000 | xargs kill -9 # Frontend
make db-down # Databasemake db-reset # β οΈ Deletes all datamake db-down && make db-upcd backend
rm -rf venv
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt- Check
GITHUB_WEBHOOK_SECRETis set inbackend/.env - Verify secret matches GitHub webhook configuration
- Check webhook delivery logs in GitHub repo settings
- Ensure backend is publicly accessible (use ngrok for local testing)
# Check if PostgreSQL is running
docker ps | grep postgres
# View logs
docker logs snorlax-postgres-1
# Restart database
make db-down && make db-upRepository Management
POST /api/index- Index new repositoryGET /api/repositories- List all repositoriesDELETE /api/repositories/{project_id}- Delete repository
GitHub Integration
POST /api/github/import-issues/{project_id}- Import issuesPOST /api/github/import-prs/{project_id}- Import PRsPOST /api/github/post-comment/{project_id}/{issue_num}- Post comment
Issue Triage
POST /api/triage/analyze/{project_id}/{issue_num}- Analyze single issuePOST /api/triage/batch-triage/{project_id}- Start batch triageGET /api/triage/batch-status/{project_id}- Check batch progress
Webhooks
POST /api/webhooks/github- GitHub webhook receiverGET /api/webhooks/setup-instructions- Webhook setup guide
Settings
POST /api/settings- Save API keys (encrypted)GET /api/settings- Check API key status
Interactive API Docs: http://localhost:8000/docs
- β
Set strong
GITHUB_WEBHOOK_SECRET:openssl rand -hex 32 - β
Configure
ALLOWED_ORIGINSwith your domain(s) - β
Set
WEBHOOK_URLto your public API endpoint - β
Use production database with SSL (
sslmode=require) - β
Set
NEXT_PUBLIC_API_URLin frontend to production backend - β Configure API keys via Settings UI after deployment
- β Set up GitHub webhook in repository settings
- β Test webhook delivery in GitHub settings
- β Enable monitoring and logging
- β Set up database backups
Backend:
APP_DATABASE_URL=postgresql://user:pass@host:5432/db?sslmode=require
ALLOWED_ORIGINS=https://app.com,https://www.app.com
GITHUB_WEBHOOK_SECRET=<strong-random-secret>
WEBHOOK_URL=https://api.yourdomain.com/api/webhooks/githubFrontend:
NEXT_PUBLIC_API_URL=https://api.yourdomain.comFrom recent development session:
- Total Lines Changed: 6,395 added, 968 removed
- Files Modified: 17
- API Endpoints Added: 5
- Cost Reduction: 90% on triage operations
- Critical Bugs Fixed: 5
- Security Issues Resolved: 3
This is a personal/educational project. Feel free to fork and modify for your own use!
Found a bug? Please check:
- Is it already in the Issues page?
- Can you reproduce it consistently?
- What error messages do you see?
File an issue with:
- Steps to reproduce
- Expected vs actual behavior
- Environment (OS, Python version, Node version)
- Logs from console/terminal
MIT License - See LICENSE file for details
- Anthropic - Claude AI for intelligent issue analysis
- PostgreSQL + pgvector - Vector similarity search
- FastAPI - Modern Python web framework
- Next.js - React framework with great DX
- CocoIndex - Code indexing and semantic search
- π Documentation:
docs/folder - π¬ Discussions: Open an issue for questions
- π Bug Reports: Use GitHub Issues
- π Security: Email [email protected] (if applicable)
Built with β€οΈ for open-source maintainers