Analyze GitHub profiles and get comprehensive developer metrics based on repositories, contributions, code quality, and impact.
- 🚀 Fast Analysis - Complete profile scoring in under 10 seconds
- 📊 Comprehensive Scoring - Based on repositories, activity, contributions, impact, consistency, and code quality
- 🔒 Private Repository Support - Include private repos for enhanced accuracy (optional)
- 🎨 Beautiful UI - Dark theme with smooth animations
- 📱 Responsive - Works on desktop and mobile
- ⚡ Serverless - Deployed on Vercel with database support
- 🔐 Secure Authentication - OAuth-based consent for private data access
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Animations: Framer Motion
- Charts: Recharts
- Authentication: NextAuth.js v5
- Database: Vercel Postgres (Drizzle ORM)
- API: GitHub REST API (Octokit)
- Node.js 18+
- npm or yarn
- GitHub OAuth App (for private repo access)
- Vercel Postgres database (for data storage)
- Clone the repository:
git clone https://github.com/yourusername/devmetric.git
cd devmetric- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env.local
# Edit .env.local with your configuration- Run the development server:
npm run dev# NextAuth.js Configuration
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret_here
# GitHub OAuth App Credentials
GITHUB_CLIENT_ID=your_github_client_id_here
GITHUB_CLIENT_SECRET=your_github_client_secret_here
# Vercel Postgres Database URL
DATABASE_URL=your_database_url_here# GitHub Personal Access Token for higher rate limits
GITHUB_TOKEN=your_github_token_here- Go to GitHub Developer Settings
- Click "New OAuth App"
- Fill in the details:
- Application name: DevMetric
- Homepage URL:
http://localhost:3000(or your production URL) - Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Copy the Client ID and Client Secret to your
.env.local
- Go to Vercel Dashboard
- Create a new Postgres database
- Copy the
DATABASE_URLto your.env.local - Run database migrations (if needed):
npx drizzle-kit push- 60 requests/hour (IP-based)
- Suitable for basic usage
- May hit limits with heavy usage
- 5,000 requests/hour (user-based)
- Higher reliability for frequent analysis
- Get token at: https://github.com/settings/tokens
DevMetric now supports including private repositories in analysis for enhanced accuracy:
- Consent Flow: Users click "Include Private Repos" to open a consent modal
- OAuth Authentication: GitHub OAuth flow grants access to private repositories
- Data Collection: Minimal private repo data is collected and stored securely
- Enhanced Analysis: Private repos are included in scoring calculations
- Privacy Controls: Users can revoke consent anytime
- Only repository metadata is stored (name, description, language, stars, etc.)
- No source code or sensitive files are accessed
- Data is encrypted and stored securely in Vercel Postgres
- Users maintain full control with consent revocation
- Data is automatically deleted when consent is revoked
- Push code to GitHub
- Import project in Vercel
- Add all environment variables
- Deploy!
npm run build
npm startsrc/
├── app/
│ ├── api/
│ │ ├── analyze/stream/ # SSE analysis endpoint
│ │ ├── auth/[...nextauth]/ # NextAuth configuration
│ │ └── private-repos/ # Private repo management
│ │ ├── check-consent/ # Check consent status
│ │ ├── collect/ # Collect private data
│ │ └── revoke/ # Revoke consent
│ ├── analyze/[username]/ # Results page
│ ├── layout.tsx # Root layout
│ └── page.tsx # Landing page
├── components/
│ ├── PrivateRepoConsentModal.tsx # Consent modal
│ └── ... # Other UI components
├── lib/
│ ├── auth.ts # NextAuth configuration
│ ├── db/ # Database setup
│ │ ├── schema.ts # Drizzle schema
│ │ └── index.ts # Database connection
│ ├── github.ts # GitHub API client
│ ├── scoring.ts # Scoring algorithm
│ └── quality.ts # Code quality checks
└── types/ # TypeScript definitions
The score (0-100) is calculated from:
- Repositories (20%) - Count and language diversity (including private repos)
- Activity (25%) - Commit frequency and streak
- Contributions (25%) - PRs, issues, merge ratio
- Impact (15%) - Stars, forks, followers
- Consistency (10%) - Account age and activity
- Code Quality (5%) - Repository quality metrics
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details