An enhanced GitHub profile viewer that displays developer statistics, contribution data, and a calculated developer rank. Built with Go backend and SvelteKit + Material Design 3 frontend.
This application fetches and visualizes GitHub profile data through the GitHub GraphQL API, calculating a comprehensive developer rank based on contributions, pull requests, code reviews, stars earned, and followers. Users authenticate with their local account and configure GitHub credentials to view their enhanced profile.
Built with Go 1.24+, using Chi router, GORM ORM, and PostgreSQL. Key components:
internal/github/client.go): GraphQL API integration with oauth2 authenticationinternal/github/rank.go): Weighted scoring algorithm with 7 tier thresholdsGitHub API Integration:
githubv4 library for GraphQL queriesBuilt with SvelteKit, TypeScript, and Material Web Components 3. Key features:
/profile/github): Main dashboard with stats, rank card, contribution calendar, pinned repos/profile): Local account management and name editinglib/api.ts, lib/github.ts): Type-safe API communication with error handling# Start with Docker Compose
docker compose up --build
# Or in detached mode
docker compose up --build -d
# View logs
docker compose logs -f api
The API will be available at http://localhost:8080
GET /api/healthCheck service status and uptime.
Response:
{
"success": true,
"data": {
"status": "ok",
"uptime": "5m 23s"
}
}
POST /api/registerRegister a new user account.
Request Body:
{
"name": "John Doe",
"email": "[email protected]",
"password": "password123"
}
Success Response (200):
{
"success": true,
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": 1,
"name": "John Doe",
"email": "[email protected]",
"created_at": "2025-11-01T17:51:14Z",
"updated_at": "2025-11-01T17:51:14Z"
}
}
}
### Database Schema
The `User` model is auto-migrated on startup:
```go
type User struct {
ID uint // Primary key
Name string // User's full name
Email string // Unique email address
PasswordHash string // bcrypt hashed password
Avatar string // Profile avatar URL (optional, not used)
GithubUsername string // GitHub username
GithubToken string // GitHub personal access token
CreatedAt time.Time // Account creation timestamp
UpdatedAt time.Time // Last update timestamp
DeletedAt *gorm.DeletedAt // Soft delete timestamp
}
To use the GitHub integration, users need:
read:user - Read user profile datarepo - Access repository informationGenerate a token at: https://github.com/settings/tokens/new
# Build and start
docker compose up --build
# Stop services
docker compose down
# View logs
docker compose logs -f api
# Restart API only
docker compose restart api
# Remove volumes (caution: deletes database data)
docker compose down -v
# Check what's using port 8080
sudo lsof -i :8080
# Or change the port in .env
PORT=8081