Skip to content

GitGauge is a asynchronous web API built with FastAPI designed to automate and enhance technical candidate screening.

Notifications You must be signed in to change notification settings

MrLionByte/GitGauge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitGauge 🎯

AI-Powered GitHub Candidate Screening Platform

GitGauge is a comprehensive technical recruitment tool that analyzes GitHub profiles to provide detailed candidate assessments using AI. It combines GitHub API data with advanced AI analysis to generate professional hiring recommendations.

πŸš€ Features

Core Capabilities

  • GitHub Integration: Fetches and analyzes user repositories
  • AI-Powered Analysis: Uses Groq/Gemini for intelligent candidate assessment
  • Skills Matching: Evaluates technical skills with evidence-based scoring
  • Code Quality Assessment: Analyzes code style, documentation, and practices
  • Interview Questions: Generates relevant technical interview questions
  • Risk Assessment: Identifies potential red flags and concerns
  • Hiring Recommendations: Provides data-driven hiring decisions

Technical Features

  • RESTful API: FastAPI-based with comprehensive documentation
  • Background Processing: Asynchronous job processing with Redis
  • Database Persistence: PostgreSQL with SQLAlchemy ORM
  • Comprehensive Logging: Detailed logging and error handling
  • Rate Limiting: GitHub API rate limit management
  • CORS Support: Cross-origin resource sharing enabled

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   FastAPI App   β”‚    β”‚  GitHub Client  β”‚    β”‚   AI Client     β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚                 β”‚
β”‚ β€’ Job Creation  │───▢│ β€’ Repo Fetching │───▢│ β€’ Groq/Gemini   β”‚
β”‚ β€’ Status Check  β”‚    β”‚ β€’ Skills Filter β”‚    β”‚ β€’ Analysis      β”‚
β”‚ β€’ Results API   β”‚    β”‚ β€’ Rate Limiting β”‚    β”‚ β€’ Report Gen    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚                       β”‚
         β–Ό                       β–Ό                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   PostgreSQL    β”‚    β”‚     Redis       β”‚    β”‚  Background     β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚  Workers        β”‚
β”‚ β€’ Job Storage   β”‚    β”‚ β€’ Job Queue     β”‚    β”‚                 β”‚
β”‚ β€’ Artifacts     β”‚    β”‚ β€’ Status Cache  β”‚    β”‚ β€’ Job Processingβ”‚
β”‚ β€’ Reports       β”‚    β”‚ β€’ Rate Limiting β”‚    β”‚ β€’ Error Handlingβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‹ Prerequisites

  • Python 3.8+
  • PostgreSQL 12+
  • Redis 6+
  • GitHub API Token (optional, for higher rate limits)
  • Groq API Key (for AI analysis)

πŸ› οΈ Installation

  1. Clone the repository

    git clone <repository-url>
    cd GitGauge
  2. Create virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Configure environment

    cp env.example .env
    # Edit .env with your configuration
  5. Set up database

    # Ensure PostgreSQL is running
    # The app will create tables automatically on startup
  6. Start Redis

    redis-server
  7. Run the application

    python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

πŸ”§ Configuration

Environment Variables

# Database
DATABASE_URL=postgresql://user:password@localhost/gitgauge

# GitHub API
GITHUB_TOKEN=your_github_token_here  # Optional but recommended

# AI Configuration
AI_API_KEY=your_groq_api_key_here

# Redis
REDIS_URL=redis://localhost:6379/0

# Application
APP_NAME=GitGauge
DEBUG=True
HOST=0.0.0.0
PORT=8000

API Keys Setup

  1. GitHub Token (Optional)

  2. Groq API Key (Required for AI features)

    • Sign up at Groq Console
    • Generate an API key
    • Add to .env file

πŸ“š API Usage

Create Analysis Job

curl -X POST "http://localhost:8000/api/jobs/" \
  -H "Content-Type: application/json" \
  -d '{
    "github_username": "torvalds",
    "skills": ["C", "Linux", "kernel"],
    "repo_limit": 10,
    "max_files_per_repo": 5,
    "languages": ["C", "Python"],
    "notes_for_ai": "Looking for kernel development expertise"
  }'

Response:

{
  "job_id": "uuid-here",
  "status": "queued",
  "estimated_wait_seconds": 300
}

Check Job Status

curl "http://localhost:8000/api/jobs/{job_id}"

Response:

{
  "job_id": "uuid-here",
  "status": "completed",
  "created_at": "2025-10-12T18:02:09.666813+05:30",
  "updated_at": "2025-10-12T18:02:26.006046+05:30",
  "report": {
    "candidate": {
      "github_username": "torvalds",
      "summary_of_work": "Active developer with 5 relevant repositories...",
      "notable_repos": ["torvalds/linux", "torvalds/subsurface-for-dirk"]
    },
    "skills_match": [
      {
        "skill": "C",
        "strength": 5,
        "evidence_snippets": ["Found C code in linux", "..."],
        "repos_referenced": ["torvalds/linux", "..."]
      }
    ],
    "code_quality": {
      "style": "Excellent",
      "readability": "Excellent",
      "testing": "Good",
      "documentation": "Good",
      "security": "Good"
    },
    "commit_habits": {
      "frequency": "Frequent",
      "message_quality": "Excellent",
      "collaboration_signals": "Very Active"
    },
    "interview_questions": [
      {
        "question": "Can you explain the Linux kernel's memory management subsystem?",
        "rationale": "Assesses understanding of kernel-level memory management",
        "difficulty": "advanced"
      }
    ],
    "risk_flags": [
      {
        "flag": "Lack of diversity in project types",
        "description": "Most projects are related to Linux kernel development...",
        "severity": "medium"
      }
    ],
    "overall_assessment": {
      "decision_hint": "strong_yes",
      "justification": "Linus Torvalds' GitHub profile showcases exceptional expertise..."
    }
  },
  "generated_at": "2025-10-12T18:02:26.055519+05:30"
}

List Recent Jobs

curl "http://localhost:8000/api/jobs/?limit=10"

🎯 Analysis Components

Skills Assessment

  • Strength Rating: 1-5 scale based on evidence
  • Evidence Snippets: Specific examples from repositories
  • Repository References: Links to relevant projects

Code Quality Analysis

  • Style: Code organization and consistency
  • Readability: Code clarity and documentation
  • Testing: Test coverage and quality indicators
  • Documentation: README and code documentation
  • Security: Security best practices

Interview Questions

  • Technical Depth: Questions based on actual projects
  • Difficulty Levels: Beginner, intermediate, advanced
  • Rationale: Why each question is relevant

Risk Assessment

  • Red Flags: Potential concerns identified
  • Severity Levels: Low, medium, high
  • Descriptions: Detailed explanations

πŸ” Development

Project Structure

GitGauge/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ routers/
β”‚   β”‚   β”‚   └── jobs.py          # Job API endpoints
β”‚   β”‚   └── schemas/
β”‚   β”‚       └── jobs.py          # Pydantic models
β”‚   β”œβ”€β”€ db/
β”‚   β”‚   β”œβ”€β”€ base.py              # Database configuration
β”‚   β”‚   β”œβ”€β”€ models.py            # SQLAlchemy models
β”‚   β”‚   └── repositories.py      # Data access layer
β”‚   β”œβ”€β”€ integrations/
β”‚   β”‚   β”œβ”€β”€ github_client.py     # GitHub API client
β”‚   β”‚   └── ai_client.py         # AI analysis client
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   └── analysis_service.py  # Business logic
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ logging.py           # Logging utilities
β”‚   β”‚   └── id_gen.py            # ID generation
β”‚   β”œβ”€β”€ workers/
β”‚   β”‚   β”œβ”€β”€ tasks.py             # Background job processing
β”‚   β”‚   β”œβ”€β”€ queue.py             # Job queue management
β”‚   β”‚   └── redis_manager.py     # Redis operations
β”‚   β”œβ”€β”€ static/                  # Static files
β”‚   β”œβ”€β”€ templates/               # HTML templates
β”‚   β”œβ”€β”€ config.py                # Configuration
β”‚   └── main.py                  # FastAPI application
β”œβ”€β”€ requirements.txt             # Python dependencies
β”œβ”€β”€ env.example                  # Environment template
└── README.md                    # This file

Running Tests

# Run the application
python -m uvicorn app.main:app --reload

# Test API endpoints
curl -X POST "http://localhost:8000/api/jobs/" \
  -H "Content-Type: application/json" \
  -d '{"github_username": "torvalds", "skills": ["C", "Linux"]}'

Logging

The application includes comprehensive logging:

  • Request Logging: All HTTP requests and responses
  • Job Progress: Detailed job processing steps
  • Error Handling: Contextual error logging
  • Performance: Timing and resource usage

Logs are output to console with color coding and can be configured for file output.

πŸš€ Deployment

Production Considerations

  1. Environment Variables: Set all required environment variables
  2. Database: Use production PostgreSQL instance
  3. Redis: Use production Redis instance
  4. API Keys: Ensure all API keys are properly configured
  5. Logging: Configure file-based logging for production
  6. Monitoring: Set up application monitoring
  7. Rate Limiting: Configure appropriate rate limits

Docker Deployment

FROM python:3.9-slim

WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt

COPY . .
EXPOSE 8000

CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

For support and questions:

  • Create an issue in the repository
  • Check the API documentation at /docs when running the application
  • Review the logs for debugging information

πŸŽ‰ Acknowledgments

  • FastAPI for the excellent web framework
  • Groq for AI model access
  • GitHub for the comprehensive API
  • PostgreSQL and Redis for data storage
  • The open-source community for inspiration and tools

About

GitGauge is a asynchronous web API built with FastAPI designed to automate and enhance technical candidate screening.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published