An AI-powered backend service built with FastAPI and Google Gemini that automatically analyzes and interprets resumes AND GitHub profiles. The system extracts key technical skills, experience, and technology categories from uploaded resumes (PDF, DOCX, or TXT) and analyzes GitHub repositories to provide scored, structured, and explainable outputs.
Build an intelligent API that:
- ✅ Accepts resume files in multiple formats
- 🔍 Extracts and preprocesses text content
- 🐙 Analyzes GitHub profiles and repositories
- 🤖 Uses Google Gemini's large language model for analysis
- 📊 Returns structured insights with confidence scores
- 🏆 Provides skill scoring (1-10 scale) for ranking and matching
- 🎯 Cross-validates skills between resume and GitHub activity
- Purpose: Accept resumes in different formats
- Supported Formats: PDF, DOCX, TXT
- Output: Raw text content
- Technologies: PyPDF2, python-docx
- Purpose: Clean and normalize text for AI analysis
- Operations:
- Remove extra whitespace
- Clean special characters
- Preserve structure (headings, bullets)
- Technologies: Python regex (re)
- Purpose: Leverage Google Gemini for intelligent extraction
- Capabilities:
- Identify skills and technologies
- Assess skill prominence and frequency
- Estimate experience duration
- Categorize technologies (Languages, Frameworks, Tools, Libraries)
- Output: Structured JSON with confidence scores
Gemini assigns scores from 1-10 for each skill:
- 9-10: Very prominent, deeply integrated
- 6-8: Moderate frequency, practical experience
- 3-5: Mentioned once or twice
- 1-2: Inferred or minimal mention
- Framework: FastAPI
- Primary Endpoint:
POST /analyze - Features:
- File upload handling
- Error handling and validation
- Structured JSON responses
- Interactive API documentation
Main endpoint for resume analysis
Request:
curl -X POST "http://localhost:8000/analyze" \
-H "Content-Type: multipart/form-data" \
-F "file=@resume.pdf"NEW: GitHub profile analysis endpoint
Request:
curl -X GET "http://localhost:8000/analyze/github/tulika-anand"Response:
{
"status": "success",
"username": "tulika-anand",
"github_url": "https://github.com/tulika-anand",
"user_info": {
"name": "Tulika Anand",
"bio": "Software Engineer | AI/ML Enthusiast",
"followers": 150,
"public_repos": 25
},
"stats": {
"languages_used": {"Python": 12, "JavaScript": 8, "Java": 5},
"total_stars_earned": 420,
"total_forks": 38
},
"analysis": {
"overall_experience_level": "Intermediate",
"experience_years_estimate": 2.5,
"skills_with_scores": {
"Python": 9,
"React": 8,
"FastAPI": 7,
"Machine Learning": 8
},
"dominant_tech_stack": {
"languages": ["Python", "JavaScript"],
"frameworks": ["React", "FastAPI", "Django"],
"domains": ["AI/ML", "Web Development"]
},
"project_analysis": {
"notable_projects": [
{
"name": "PharmLensAI",
"description": "AI-powered lab report analyzer",
"complexity_score": 9,
"impact_score": 8,
"technologies": ["Python", "TensorFlow", "FastAPI"],
"stars": 45
}
]
},
"strengths": ["Strong Python expertise", "Active in AI/ML domain"],
"areas_for_growth": ["Contribute to more open-source projects"]
}
}NEW: Combined resume + GitHub analysis
Request:
curl -X POST "http://localhost:8000/analyze/combined?github_username=tulika-anand" \
-H "Content-Type: multipart/form-data" \
-F "file=@resume.pdf"Use Cases:
- Complete candidate assessment
- Cross-validate resume claims with GitHub activity
- Comprehensive technical profile evaluation
Utility endpoint for text extraction only
Health check endpoint
API documentation
- Python 3.8+
- Google Gemini API Key
- Clone the repository:
cd c:\Users\acer\projects\GutHib- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
# Copy example env file
copy .env.example .env
# Edit .env and add your Google API key
# GOOGLE_API_KEY=your_actual_api_key_here- Get Google Gemini API Key:
- Go to Google AI Studio
- Create a new API key
- Add it to your
.envfile
Development mode:
python main.pyOr using uvicorn directly:
uvicorn main:app --reload --host 0.0.0.0 --port 8000The API will be available at:
- 🌐 API: http://localhost:8000
- 📚 Interactive Docs: http://localhost:8000/docs
- 📖 ReDoc: http://localhost:8000/redoc
GutHib/
├── main.py # FastAPI application & endpoints
├── config.py # Configuration management
├── models.py # Pydantic models for validation
├── extractors.py # Text extraction from files
├── preprocessor.py # Text cleaning & preprocessing
├── gemini_analyzer.py # Gemini AI integration
├── requirements.txt # Python dependencies
├── .env # Environment variables (create from .env.example)
├── .env.example # Example environment file
├── .gitignore # Git ignore rules
├── README.md # This file
└── uploads/ # Temporary file storage (auto-created)
# Analyze a PDF resume
curl -X POST "http://localhost:8000/analyze" \
-H "Content-Type: multipart/form-data" \
-F "file=@sample_resume.pdf"
# Analyze GitHub profile
curl http://localhost:8000/analyze/github/tulika-anand
# Combined analysis
curl -X POST "http://localhost:8000/analyze/combined?github_username=tulika-anand" \
-F "file=@resume.pdf"
# Health check
curl http://localhost:8000/healthimport requests
# Resume analysis
url = "http://localhost:8000/analyze"
files = {"file": open("resume.pdf", "rb")}
response = requests.post(url, files=files)
print(response.json())
# GitHub analysis
url = "http://localhost:8000/analyze/github/tulika-anand"
response = requests.get(url)
print(response.json())# Test resume analysis
python test_sample.py
# Test GitHub analysis
python test_github.pyNavigate to http://localhost:8000/docs and use the built-in interface to test all endpoints.
Edit config.py or .env file:
# Google Gemini
GOOGLE_API_KEY=your_key_here
# Server
HOST=0.0.0.0
PORT=8000
DEBUG=True
# File Upload
MAX_FILE_SIZE=10485760 # 10MB- Recruitment Automation: Automatically screen and rank candidates
- Skill Matching: Match candidates to job requirements
- Resume Optimization: Provide feedback to job seekers
- Talent Analytics: Generate insights on candidate pools
- ATS Integration: Enhance applicant tracking systems
- 🆕 GitHub Profile Verification: Validate resume claims with actual code
- 🆕 Developer Assessment: Evaluate coding activity and project complexity
- 🆕 Technical Screening: Automated technical candidate evaluation
- 🆕 Portfolio Analysis: Assess real-world project experience
- Add resume comparison feature
- Implement job description matching
- Add support for more file formats
- Create visualization dashboard
- Add database for storing analysis results
- Implement batch processing
- Add authentication/authorization
- Deploy as containerized service
- Files are temporarily stored and automatically deleted after processing
- Maximum file size: 10MB (configurable)
- Gemini API usage is subject to Google's quotas and pricing
- For production use, implement proper authentication and rate limiting
This project is for educational and demonstration purposes.
Contributions are welcome! Please feel free to submit issues or pull requests.
Built with ❤️ using FastAPI and Google Gemini