A comprehensive web application for analyzing Git repository contributions, engineering metrics, and developer engagement across GitHub and GitLab organizations.
- Developer Contribution Dashboard - Analyze commits, lines of code, and contributor statistics
- Engineering Matrix - Track DORA-like metrics (Cycle Time, Pickup Time, Review Time, etc.)
- Developer Engagement - Monitor individual contributor activity and performance
- Java 17 or higher
- Gradle (wrapper included)
- GitHub/GitLab Personal Access Token with appropriate permissions
# Clone the repository
git clone <repository-url>
cd GitDeveloperContribution
# Run the application
./gradlew bootRunThe application will start at http://localhost:8081
# Compile the project
./gradlew compileKotlin
# Build the JAR file
./gradlew build
# Clean build artifacts
./gradlew clean
# Clean and rebuild
./gradlew clean buildEdit src/main/resources/application.properties:
server.port=8082./gradlew bootRun --args='--server.port=8082'SERVER_PORT=8082 ./gradlew bootRunIf you see the error:
Web server failed to start. Port 8081 was already in use.
macOS/Linux:
# Find the process using port 8081
lsof -i :8081
# Kill the process by PID
kill -9 <PID>
# Or kill directly in one command
lsof -ti:8081 | xargs kill -9Windows:
# Find the process using port 8081
netstat -ano | findstr :8081
# Kill the process by PID
taskkill /PID <PID> /F./gradlew bootRun --args='--server.port=8082'This is normal behavior - the application is running. The Gradle task doesn't complete because bootRun keeps the server alive. Access the app at http://localhost:8081.
If changes aren't reflected:
Chrome:
- Press
Cmd+Shift+R(macOS) orCtrl+Shift+R(Windows/Linux) for hard refresh - Or open DevTools (F12) β Right-click refresh button β "Empty Cache and Hard Reload"
Safari:
- Press
Cmd+Option+Eto empty cache, thenCmd+Rto reload
./gradlew clean
rm -rf ~/.gradle/caches/
./gradlew build# Kill all Java processes (use with caution)
pkill -f 'java.*GitDeveloperContribution'
# Or kill by port
lsof -ti:8081 | xargs kill -9 2>/dev/null
lsof -ti:8080 | xargs kill -9 2>/dev/nullWhen creating a GitHub Personal Access Token, ensure these permissions:
repo- Full control of private repositoriesread:org- Read organization membershipread:user- Read user profile data
- Go to GitHub β Settings β Developer settings β Personal access tokens β Tokens (classic)
- Click "Generate new token (classic)"
- Select the required scopes
- Copy and save the token securely
- Enter your GitHub/GitLab token
- Select repositories to analyze
- Choose date range and aggregation period (daily/weekly/monthly)
- View commit statistics, lines changed, and contributor charts
- Analyze DORA metrics:
- Coding Time - Time from first commit to PR creation
- Pickup Time - Time for PR to get first review
- Approve Time - Time from first review to approval
- Merge Time - Time from approval to merge
- Review Time - Total time from PR creation to merge
- Cycle Time - Total time from first commit to merge
- Merge Frequency - PRs merged per developer per week
- PR Size - Average lines changed per PR
- Track individual contributor metrics
- Monitor commits, PRs reviewed, and lines changed
- View trends over time
GitDeveloperContribution/
βββ src/
β βββ main/
β β βββ kotlin/org/git/developer/contribution/
β β β βββ controller/ # REST API endpoints
β β β βββ model/ # Data models
β β β βββ service/ # Business logic
β β βββ resources/
β β βββ static/ # HTML, CSS, JS files
β β βββ application.properties
β βββ test/
βββ build.gradle.kts
βββ settings.gradle.kts
βββ README.md
- Backend: Kotlin, Spring Boot 4.0.1
- Frontend: HTML5, CSS3, JavaScript, Chart.js
- Build Tool: Gradle (Kotlin DSL)
- APIs: GitHub REST API, GitHub GraphQL API
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/git/repositories |
Fetch repositories from Git provider |
| POST | /api/git/analyze |
Analyze contribution data |
| POST | /api/metrics/analyze |
Calculate engineering metrics |
| POST | /api/engagement/contributors |
Fetch contributors list |
| POST | /api/engagement/analyze |
Analyze developer engagement |
- Large organizations - Fetching 500+ repos may take time
- Rate limiting - GitHub API has rate limits; use GraphQL where possible
- Merge commits - Enable "Exclude merge commits" for accurate stats
- AWS Account
- EC2 Instance (t2.micro for free tier, t2.small/medium for production)
- Security Group with ports 22 (SSH), 80 (HTTP), 443 (HTTPS), 8081 (App)
- Elastic IP (optional, for static public IP)
1. Launch EC2 Instance
# AWS Console β EC2 β Launch Instance
# - Choose: Amazon Linux 2023 or Ubuntu 22.04
# - Instance type: t2.small (2GB RAM recommended)
# - Create/select key pair for SSH
# - Configure Security Group (see below)2. Configure Security Group
Inbound Rules:
- SSH (22) β Your IP or 0.0.0.0/0
- HTTP (80) β 0.0.0.0/0
- HTTPS (443) β 0.0.0.0/0
- Custom TCP (8081) β 0.0.0.0/0
3. Connect to EC2
# Download your .pem key file and connect
chmod 400 your-key.pem
ssh -i your-key.pem ec2-user@<your-ec2-public-ip>
# For Ubuntu: ssh -i your-key.pem ubuntu@<your-ec2-public-ip>4. Install Java 17
# Amazon Linux 2023
sudo yum install java-17-amazon-corretto -y
# Ubuntu
sudo apt update
sudo apt install openjdk-17-jdk -y
# Verify installation
java -version5. Install Git and Clone Project
sudo yum install git -y # Amazon Linux
# OR
sudo apt install git -y # Ubuntu
git clone https://github.com/SpaceBank/Space-Developer-Contribution.git
cd Space-Developer-Contribution6. Build and Run
# Make gradlew executable
chmod +x gradlew
# Build the JAR
./gradlew build -x test
# Run on port 80 (requires sudo) or 8081
sudo ./gradlew bootRun --args='--server.port=80'
# OR
./gradlew bootRun --args='--server.port=8081'7. Run as Background Service
# Create a systemd service file
sudo nano /etc/systemd/system/gitcontribution.serviceAdd this content:
[Unit]
Description=Git Developer Contribution Dashboard
After=network.target
[Service]
Type=simple
User=ec2-user
WorkingDirectory=/home/ec2-user/Space-Developer-Contribution
ExecStart=/home/ec2-user/Space-Developer-Contribution/gradlew bootRun --args='--server.port=8081'
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.targetEnable and start:
sudo systemctl daemon-reload
sudo systemctl enable gitcontribution
sudo systemctl start gitcontribution
sudo systemctl status gitcontribution8. Access Your App
http://<your-ec2-public-ip>:8081
1. Build JAR file
./gradlew build -x test
# JAR will be in: build/libs/GitDeveloperContribution-0.0.1-SNAPSHOT.jar2. Run JAR directly
# Run in background
nohup java -jar build/libs/GitDeveloperContribution-0.0.1-SNAPSHOT.jar --server.port=8081 > app.log 2>&1 &
# Check if running
ps aux | grep java3. Install and Configure Nginx
# Amazon Linux
sudo yum install nginx -y
# Ubuntu
sudo apt install nginx -y
# Start Nginx
sudo systemctl start nginx
sudo systemctl enable nginx4. Configure Nginx as Reverse Proxy
sudo nano /etc/nginx/conf.d/gitcontribution.confAdd:
server {
listen 80;
server_name your-domain.com; # or use _ for any
location / {
proxy_pass http://localhost:8081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_bypass $http_upgrade;
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
}
}sudo nginx -t
sudo systemctl reload nginxNow access via: http://<your-ec2-public-ip> (port 80)
1. Install EB CLI
pip install awsebcli2. Build JAR
./gradlew build -x test3. Initialize and Deploy
eb init -p java-17 git-contribution-app
eb create git-contribution-env
eb deploy4. Open App
eb open1. Create Dockerfile
FROM openjdk:17-jdk-slim
WORKDIR /app
COPY build/libs/*.jar app.jar
EXPOSE 8081
ENTRYPOINT ["java", "-jar", "app.jar", "--server.port=8081"]2. Build and Push to ECR
# Build JAR first
./gradlew build -x test
# Build Docker image
docker build -t git-contribution .
# Create ECR repository (AWS Console or CLI)
aws ecr create-repository --repository-name git-contribution
# Login to ECR
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <account-id>.dkr.ecr.us-east-1.amazonaws.com
# Tag and push
docker tag git-contribution:latest <account-id>.dkr.ecr.us-east-1.amazonaws.com/git-contribution:latest
docker push <account-id>.dkr.ecr.us-east-1.amazonaws.com/git-contribution:latest3. Deploy to ECS
- Create ECS Cluster
- Create Task Definition with your ECR image
- Create Service with desired count
Option A: AWS Certificate Manager + Load Balancer
- Request free SSL certificate in ACM
- Create Application Load Balancer
- Add HTTPS listener with ACM certificate
- Point to your EC2 instance
Option B: Let's Encrypt with Certbot
# Install Certbot
sudo yum install certbot python3-certbot-nginx -y # Amazon Linux
# OR
sudo apt install certbot python3-certbot-nginx -y # Ubuntu
# Get certificate (requires domain pointing to your server)
sudo certbot --nginx -d your-domain.com| Service | Free Tier | Production |
|---|---|---|
| EC2 t2.micro | 750 hrs/month free (1 year) | ~$8/month |
| EC2 t2.small | - | ~$17/month |
| Elastic IP | Free if attached | $3.6/month if unused |
| Data Transfer | 100GB free | $0.09/GB after |
| Route 53 (DNS) | - | $0.50/zone/month |
Create deploy.sh on your EC2:
#!/bin/bash
cd /home/ec2-user/Space-Developer-Contribution
git pull origin main
./gradlew build -x test
sudo systemctl restart gitcontribution
echo "Deployment complete!"Make executable and run:
chmod +x deploy.sh
./deploy.sh- AWS Account created
- EC2 instance launched
- Security Group configured (ports 22, 80, 443, 8081)
- Java 17 installed
- Git installed and repo cloned
- Application built and running
- Systemd service configured (for auto-restart)
- Nginx configured (optional, for port 80)
- Domain configured (optional)
- SSL certificate installed (optional)
MIT License
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request