GitHub Profile Analyzer
Comprehensive GitHub profile analysis tool with AI-powered scoring, real-time metrics, and exportable reports.
GitHub: 0xarchit/github-profile-analyzer
Live Demo: https://github.0xarchit.is-a.dev
Tip
Comprehensive GitHub profile analysis tool with AI-powered scoring, real-time metrics, and exportable reports.
Features
Profile Analysis
- AI-Driven Evaluation: Detailed scoring and developer type classification
- Language Detection: Proficiency analysis across your repositories
- Repository Analysis: Contribution metrics and project insights
Authentication & Security
- GitHub OAuth 2.0: Secure authentication flow
- JWT Sessions: Token-based session management with jose
- AES-256-GCM Encryption: Protects sensitive data at rest
- Rate Limiting: Upstash Rate Limit for abuse prevention
- Security: SQL injection and XSS protection
Data & Export
- Contribution Calendar: Real-time parsing and streak calculation
- PDF Reports: Generate exportable reports with profile snapshots
- Encrypted Storage: Secure analysis history and snapshots
Performance
- Redis Caching: Upstash Redis for response caching
- Optimized Queries: Efficient Neon PostgreSQL operations
- Concurrent Handling: Built for high-throughput with Bun runtime
User Experience
- Star Verification: Access control through repository stars
- Guest Sessions: Limited access without authentication
- User Settings: Personalized preferences
- Responsive UI: Tailwind CSS with dark mode support
System Architecture
graph TD
A[User Browser] -->|OAuth Login| B[Next.js App]
B -->|Authenticate| C[GitHub OAuth]
C -->|Callback| B
B -->|Analyze Profile| D[API Routes]
D -->|Fetch Data| E[GitHub API]
D -->|Cache| F[Upstash Redis]
D -->|Store| G[Neon PostgreSQL]
D -->|AI Analysis| H[AI Model]
D -->|Generate| I[PDF Report]
B -->|Display| J[Dashboard]
J -->|Settings| K[User Preferences]
J -->|History| L[Analysis Snapshots]Tech Stack
Getting Started
Prerequisites
- Bun runtime
- GitHub OAuth application credentials
- Neon PostgreSQL database
- Upstash Redis instance
Installation
git clone https://github.com/0xarchit/github-profile-analyzer.git
cd github-profile-analyzer
bun install
Environment Variables
Create a .env.local file:
GITHUB_TOKENS=
NEXT_PUBLIC_APP_URL=
GITHUB_PAT_TOKENS=
GITHUB_MODEL=
DATABASE_WRITE=
DATABASE_READ=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
JWT_SECRET=
UPSTASH_TOKEN=
UPSTASH_URL=
ENCRYPTION_SECRET=
Development
bun run dev
Server runs on http://localhost:3000
Production Build
bun run build
bun run start
API Routes
Project Structure
src/
├── app/ # Next.js app router
│ ├── api/ # API route handlers
│ ├── auth/ # Authentication pages
│ └── dashboard/ # User dashboard
├── components/ # React components
│ ├── ui/ # Reusable UI elements
│ └── features/ # Feature-specific components
├── lib/ # Utilities and helpers
│ ├── auth.ts # Authentication utilities
│ ├── db.ts # Database connection
│ └── cache.ts # Redis caching
└── types/ # TypeScript type definitions
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Security
The project implements:
- AES-256-GCM encryption for sensitive data
- Rate limiting and abuse prevention
- SQL injection and XSS protection
- JWT-based session management