Leaderboard Fantasy is a fantasy golf platform with an origin story that captures the essence of modern software development: it started as a color-coded Excel spreadsheet with nested VLOOKUPs, and evolved into a cloud-native SaaS platform serving hundreds of golf fans.
More importantly, it's a case study in agentic software development—vibe coded initially through the use of AI agents and evolving into full AI Agent workflow orchestration, demonstrating what's possible when human vision meets AI execution at scale.
Like many great products, Leaderboard Fantasy began with a personal pain point. Managing a fantasy golf pool for friends meant:
The spreadsheet grew unwieldy. Friends of friends wanted in. Other groups heard about it and asked to use it too. That's when the realization hit: this wasn't just a personal problem—fantasy golf fans everywhere were either struggling with spreadsheets or settling for platforms that didn't understand the sport.
Leaderboard Fantasy is built as a distributed system across multiple GCP services, with infrastructure managed entirely through Terraform.
┌───────────────────────────────────────────────────────────────┐
│ Google Cloud Platform │
├───────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌─────────────────┐ │
│ │ App Engine │ │ Cloud Run │ │ Cloud Storage │ │
│ │ (Web UI) │◄──►│ (Data API) │◄──►│ (Assets) │ │
│ └──────────────┘ └──────────────┘ └─────────────────┘ │
│ │ │ │
│ │ ┌──────┴──────┐ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────┐ ┌──────────┐ │
│ │ Redis │ │ Secret │ │ MongoDB │ │
│ │ (Sessions) │ │ Manager │ │ Atlas │ │
│ └─────────────┘ └─────────┘ └──────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Terraform-Managed Infrastructure │ │
│ │ • VPC Networks & Connectors • NAT Gateways │ │
│ │ • Static IPs • Firewall Rules │ │
│ │ • Service Accounts • Cloud Scheduler │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
└───────────────────────────────────────────────────────────────┘
The user-facing application runs on Google App Engine, providing:
The backend API runs on Google Cloud Run, offering:
All GCP infrastructure is managed through Terraform:
main automatically deploys to the self-hosted test environmentrel_*) deploy to GCP App Engine and Cloud RunThe platform integrates with PGA Tour data feeds to provide:
Inspired by the original friend group that started it all:
Every group can customize their experience:
Built with Spring AI and Google Vertex AI Gemini:
Multi-channel communication via Mailjet integration:
The lfs-data API leverages Cloud Run's serverless container platform:
# Deployment configuration highlights
- Auto-scaling from 0 to N instances based on traffic
- VPC connector for secure internal communication
- NAT gateway for static outbound IP (required for some APIs)
- Secrets mounted as environment variables
- Health checks via Spring Actuator endpoints
Why Cloud Run?
The platform uses MongoDB Atlas for its document database:
All infrastructure changes go through code review:
# Example: VPC Connector for Cloud Run
resource "google_vpc_access_connector" "leaderboard_vpc_connector" {
name = "leaderboard-vpc-connector"
region = var.region
ip_cidr_range = "X.X.X.X/28"
network = google_compute_network.default.name
}
Benefits of infrastructure-as-code:
Leaderboard Fantasy represents an evolution in how software gets built. The platform was developed initially using vibe coding chat interactions, but is now primarily through agentic AI orchestration—the same methodology documented in the companion blog post.
What would traditionally require:
Actual development: Nights and weekends over 3 months, with AI agents handling the mechanical implementation while human judgment guided architecture and user experience.
The project supports multiple development modes:
# Run locally with Maven
./mvnw spring-boot:run -Dspring.profiles.active=dev
# Run with Docker
docker-compose up
# Deploy to home server for staging
git push origin develop # Triggers GitLab CI
# Profiles: local, dev, test, gcp
# Each profile configures:
# - MongoDB connection (local, Atlas dev, Atlas prod)
# - Redis session store
# - API key authentication
# - Feature flags
One of the most valuable development infrastructure decisions was setting up a self-hosted Docker-based test environment. Every commit to main automatically deploys to a home server, providing a production-like staging environment at zero cloud cost.
The test environment runs a complete application stack via Docker Compose:
┌──────────────────────────────────────────────────────────┐
│ Home Server Stack │
├──────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌─────────────┐ ┌──────────────────┐ │
│ │ Nginx │───►│ Spring App │───►│ Redis (Sessions)│ │
│ │ (SSL) │ │ Container │ └──────────────────┘ │
│ └─────────┘ └─────────────┘ │ │
│ │ │ │ │
│ │ ▼ ▼ │
│ │ ┌─────────────────────────────┐ │
│ │ │ MongoDB (Local Instance) │ │
│ │ └─────────────────────────────┘ │
│ │ │
│ │ ┌─────────────────────────────┐ │
│ └────────►│ Prometheus + Grafana │ │
│ │ (Monitoring) │ │
│ └─────────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────┘
The docker-compose.dev.yml orchestrates six core services:
services:
app: # Spring Boot application (Dockerfile.dev)
redis: # Session storage (redis:7.0-alpine)
mongodb: # Local database (mongo:7.0)
nginx: # Reverse proxy with SSL termination
prometheus: # Metrics collection (optional)
grafana: # Metrics visualization (optional)
Each service includes health checks, proper restart policies, and named volumes for data persistence.
GitLab CI automatically deploys every commit to main:
deploy-home-server:
stage: deploy-home
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: on_success
The deployment process:
--no-cacheThe deploy.sh script handles the full deployment lifecycle:
./scripts/deploy.sh deploy # Full deployment
./scripts/deploy.sh rollback # Restore previous version
./scripts/deploy.sh health # Check service health
./scripts/deploy.sh backup # Manual backup
Key features:
Cost Savings: Running on existing hardware eliminates ~$100-170/month in cloud staging costs.
Faster Iterations: No cloud deployment delays—changes are live within minutes of merge.
Production Parity: Same Docker containers, same nginx configuration, same health checks as production.
Learning Opportunity: Hands-on experience with Docker orchestration, SSL certificates, reverse proxies, and deployment automation.
Safe Experimentation: Test risky changes without impacting production or incurring cloud costs.
The self-hosted environment mirrors production configuration:
| Component | Home Server | Production (GCP) | |-----------|-------------|------------------| | Web Server | Nginx container | App Engine | | API | Spring Boot container | Cloud Run | | Database | MongoDB container | MongoDB Atlas | | Sessions | Redis container | Redis (Memorystore) | | SSL | Let's Encrypt | Managed certificates | | Monitoring | Prometheus/Grafana | Cloud Monitoring |
This parity catches environment-specific issues before they reach production.
Leaderboard Fantasy proves something important: the barrier to building production software has fundamentally changed.
A solo developer with:
...can now build what previously required teams and months.
The spreadsheet is still saved in Google Drive—a reminder not just of where this started, but of how far we've come. Those friends are still playing, by the way. Now with custom trophies, years of history tracked automatically, and rivalries that have outlasted the original Excel file by years.
Want to play? Join at leaderboardfantasy.com
Curious about the development process? Read the full AI-assisted development story