Skip to content

The missing intelligence layer for GitHub. Analyze, visualize, and understand your repositories like never before.

Notifications You must be signed in to change notification settings

lantos1618/github.gg

Repository files navigation

πŸš€ gh.gg

AI-Powered GitHub Repository Analysis & Developer Arena

Live Demo β€’ Documentation β€’ Report Bug β€’ Request Feature

License: MIT Next.js TypeScript PRs Welcome


🎯 What is gh.gg?

gh.gg is an open-source platform that transforms how developers analyze and understand GitHub repositories. Using AI-powered analysis, it provides deep insights into code quality, repository health, and developer contributions.

✨ Key Features

πŸ€– AI-Powered Analysis

  • Repository Scorecards: Comprehensive code quality metrics with AI-generated insights
  • PR Code Reviews: Automated code review with security, performance, and maintainability analysis
  • Issue Triage: Intelligent issue classification with "slop ranking" and priority suggestions
  • Commit Analysis: Deep dive into commit quality and best practices

πŸ“Š Developer Tools

  • Interactive Diagrams: Visualize repository structure, dependencies, and file relationships
  • Score History: Track repository and developer metrics over time
  • GitHub App Integration: Automated PR reviews and issue analysis via webhooks

πŸ† Dev Rank (Coming Soon)

  • ELO Rankings: Competitive developer rankings based on GitHub activity
  • Code Battles: Challenge other developers and showcase your skills
  • Tournaments: Participate in coding competitions
  • Achievements: Unlock badges and track your progress

πŸ” Enterprise Ready

  • Unified Authentication System: Single better-auth OAuth with GitHub provider
  • GitHub App Integration: Enhanced permissions for private repos and webhooks
  • Installation Linking: Seamlessly connect OAuth accounts with GitHub App installations
  • Bring Your Own API Key (BYOK) support
  • Stripe payment integration
  • PostgreSQL database with Drizzle ORM
  • Type-safe tRPC API

πŸš€ Quick Start

Prerequisites

  • Bun (recommended) or Node.js 18+
  • Docker (for local database)
  • GitHub OAuth App credentials

One-Command Setup

# Clone the repository
git clone https://github.com/lantos1618/github.gg.git
cd github.gg

# Run automated setup
bun run setup

This will:

  • βœ… Install all dependencies
  • βœ… Create .env.local configuration file
  • βœ… Start PostgreSQL database with Docker
  • βœ… Run database migrations

Configure GitHub OAuth

  1. Go to GitHub Developer Settings
  2. Click "New OAuth App"
  3. Fill in the details:
    • Application name: gh.gg-dev
    • Homepage URL: http://localhost:3000
    • Authorization callback URL: http://localhost:3000/api/auth/callback/github
  4. Copy the Client ID and Client Secret
  5. Update your .env.local file:
GITHUB_CLIENT_ID=your_client_id_here
GITHUB_CLIENT_SECRET=your_client_secret_here

Start Development

bun dev

Open http://localhost:3000 πŸŽ‰


πŸ“¦ Tech Stack

Layer Technology
Framework Next.js 15 (App Router)
Language TypeScript
Runtime Bun
Database PostgreSQL + Drizzle ORM
Authentication Better Auth (OAuth) + GitHub App
API tRPC
AI Google Gemini via Vercel AI SDK
GitHub Octokit
Styling Tailwind CSS + shadcn/ui
Payments Stripe
Email Resend
Deployment Vercel

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Next.js App Router                   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Server     β”‚  β”‚   Client     β”‚  β”‚   API        β”‚  β”‚
β”‚  β”‚  Components  β”‚  β”‚  Components  β”‚  β”‚   Routes     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚         β”‚                 β”‚                 β”‚           β”‚
β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”‚                           β”‚                             β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”                     β”‚
β”‚                    β”‚     tRPC      β”‚                     β”‚
β”‚                    β”‚   API Layer   β”‚                     β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜                     β”‚
β”‚                           β”‚                             β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚         β”‚                                   β”‚           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Database   β”‚                  β”‚   External     β”‚  β”‚
β”‚  β”‚  (Drizzle)   β”‚                  β”‚   Services     β”‚  β”‚
β”‚  β”‚              β”‚                  β”‚                β”‚  β”‚
β”‚  β”‚ β€’ PostgreSQL β”‚                  β”‚ β€’ GitHub API   β”‚  β”‚
β”‚  β”‚ β€’ Migrations β”‚                  β”‚ β€’ Gemini AI    β”‚  β”‚
β”‚  β”‚ β€’ Caching    β”‚                  β”‚ β€’ Stripe       β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”§ Development

Project Structure

github.gg/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/              # Next.js App Router pages
β”‚   β”œβ”€β”€ components/       # React components
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ ai/          # AI analysis modules
β”‚   β”‚   β”œβ”€β”€ auth/        # Unified auth system (better-auth)
β”‚   β”‚   β”œβ”€β”€ github/      # GitHub API & App integration
β”‚   β”‚   └── trpc/        # tRPC routes and procedures
β”‚   β”œβ”€β”€ db/              # Database schema and migrations
β”‚   └── styles/          # Global styles
β”œβ”€β”€ tests/               # Test files
β”œβ”€β”€ docs/                # Documentation
└── drizzle/            # Database migrations

Available Scripts

See package.json for all available scripts. Common commands:

bun dev                  # Start development server
bun run db:start        # Start PostgreSQL with Docker
bun run db:studio       # Open Drizzle Studio
bun test                # Run tests

Environment Variables

See .env.example for all configuration options. The setup script automatically creates .env.local with development defaults.


🀝 Contributing

We love contributions! Whether it's bug fixes, feature additions, or documentation improvements.

How to Contribute

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/AmazingFeature
  3. Make your changes
    • Write tests for new features
    • Follow the existing code style
    • Update documentation as needed
  4. Commit your changes
    git commit -m 'feat: Add some amazing feature'
  5. Push to your fork
    git push origin feature/AmazingFeature
  6. Open a Pull Request

Development Guidelines

  • Code Style: Follow the existing TypeScript and React patterns
  • Testing: Write tests for new features (bun test)
  • Type Safety: Maintain 100% TypeScript coverage
  • Documentation: Update docs for API changes
  • Commits: Use Conventional Commits

Areas We Need Help

  • 🎨 UI/UX improvements
  • πŸ“ Documentation and tutorials
  • πŸ› Bug fixes and testing
  • 🌍 Internationalization (i18n)
  • ⚑ Performance optimizations
  • πŸ”Œ New integrations and features

πŸ“š Documentation


πŸš€ Deployment

Deploy to Vercel (Recommended)

Deploy with Vercel

  1. Click the button above
  2. Set up environment variables in Vercel dashboard
  3. Connect your PostgreSQL database (Vercel Postgres, Supabase, etc.)
  4. Deploy!

Manual Deployment

# Build the application
bun run build

# Start production server
bun start

Important: Run database migrations before deploying:

bun run db:push

πŸ—ΊοΈ Roadmap

  • Repository analysis with AI
  • PR code reviews
  • Issue triage and analysis
  • Commit analysis
  • Interactive diagrams
  • Score history tracking
  • GitHub App integration
  • Webhook support for automated reviews
  • Dev Rank ELO rankings
  • Code battles and tournaments
  • Team analytics
  • VS Code extension
  • Browser extension
  • API for third-party integrations
  • Self-hosted enterprise version

See the open issues for a full list of proposed features and known issues.


πŸ“Š Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests


πŸ™ Acknowledgments

  • Thanks to all contributors who have helped build gh.gg
  • Built with amazing open-source projects: Next.js, Bun, Drizzle, tRPC, and more
  • Inspired by the GitHub community and the need for better code analysis tools

πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.


πŸ”— Links


⭐ Star us on GitHub if you find this project useful! ⭐

Made with ❀️ by the gh.gg community

Note: gh.gg is not affiliated with, endorsed by, or sponsored by GitHub, Inc. GitHub is a registered trademark of GitHub, Inc.

About

The missing intelligence layer for GitHub. Analyze, visualize, and understand your repositories like never before.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages