Skip to content

Git Football League - a revolutionary approach to Fantasy Football using git workflows, pull requests, to manage teams and CI/CD pipelines to enforce the rules.

License

Notifications You must be signed in to change notification settings

devops-games/gfl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Git Football League

Fantasy Football, Forked

A revolutionary approach to Fantasy Football using git workflows, pull requests, to manage teams and CI/CD pipelines to enforce the rules.

๐Ÿ“– How Does It Work?

Unlike traditional fantasy football platforms, GFL uses git as the game engine:

  1. Fork the League Repository โ†’ Your fork becomes your team's home
  2. Create Your Team โ†’ Use the CLI to select 15 players within ยฃ100m budget
  3. Submit a Pull Request โ†’ Your team joins the league when PR is merged
  4. Make Weekly Transfers โ†’ Edit your team JSON, create PR before deadline
  5. GitHub Actions Validate โ†’ Automated checks ensure all rules are followed
  6. PR Gets Merged โ†’ Your changes are accepted for the gameweek
  7. Points Calculated Automatically โ†’ GitHub Actions process match results
  8. League Table Updates โ†’ Rankings stored in git, visible to all

Every action creates a permanent record in git history. No black box algorithms, no hidden data - just transparent, auditable gameplay through version control.

โš ๏ธ Early Development Notice

This is an early experimental version - we're still figuring out how all the pieces fit together. Much of this is theoretical at this stage, and we're actively exploring the best ways to make git-based fantasy football a reality.

We welcome contributions, ideas, and collaboration! If you're interested in helping shape how this works, please:

  • Open issues for discussion
  • Submit PRs with improvements
  • Share your thoughts on the concept
  • Help us solve the technical challenges

Together we can create something truly unique for the developer community.

๐ŸŽฎ What Makes This Unique?

This isn't just another fantasy football app. It's a game played entirely through git:

  • Fork & PR Workflow: Each player forks the repo and submits PRs to make changes
  • Git as Database: Team and player data stored as JSON files, configuration as YAML, all in version control
  • GitHub Actions as Referee: Automated validation and scoring through CI/CD
  • Commits as Audit Trail: Complete history of every decision
  • DevOps as Gameplay: Learn professional development workflows while playing

๐Ÿš€ Quick Start

# 1. Fork the repository on GitHub

# 2. Clone your fork
git clone https://github.com/{your-username}/fantasy-football-league.git
cd fantasy-football-league

# 3. Add upstream remote
git remote add upstream https://github.com/devops-games/fantasy-football.git

# 4. Install dependencies
npm install

# 5. Install the CLI globally
npm link

# 6. Initialize and create your team (now with Ink-powered UI!)
gfl init
gfl create-team

# 7. Commit and push
git add teams/{your-github-username}/
git commit -m "feat: Register team for {your-username}"
git push origin main

# 8. Create a PR to join the league!

๐Ÿ“– How It Works

The Game Flow

  1. Team Registration: Fork the repo, create your team via CLI, submit a PR
  2. Weekly Management: Make transfers through PRs before each gameweek deadline
  3. Validation: GitHub Actions automatically validate all changes against FPL rules
  4. Scoring: Automated gameweek processing calculates points from real match data
  5. Competition: League standings updated automatically after each gameweek

Key Commands (Now with Ink React UI!)

The CLI now features a modern React-based interface using Ink:

the gfl command line utility

gfl create-team    # Interactive team creation
gfl transfer       # Make transfers for upcoming gameweek  
gfl status         # View your team and league position
gfl simulate       # Simulate points for upcoming gameweek
gfl deadline       # Show next transfer deadline
gfl validate       # Validate your team locally

Interactive Mode Features

  • ๐ŸŽจ React Components: Built with Ink for smooth, flicker-free updates
  • ๐ŸŒˆ Gradient Text: Beautiful rainbow gradients for titles
  • โšก Real-time Updates: UI updates without screen clearing
  • ๐ŸŽฎ Smooth Navigation: Responsive keyboard controls
  • ๐Ÿ“Š Dynamic Layouts: Flexible box layouts that adapt to content
  • ๐Ÿ”„ Loading Spinners: Smooth animations during async operations

๐Ÿ† Game Rules

Based on official Fantasy Premier League rules:

  • Budget: ยฃ100 million to pick 15 players
  • Squad: 2 goalkeepers, 5 defenders, 5 midfielders, 3 forwards
  • Team Limit: Maximum 3 players from any Premier League club
  • Transfers: 1 free transfer per week (can accumulate up to 5)
  • Extra Transfers: -4 points per additional transfer
  • Captain: Scores double points
  • Chips: Wildcard, Free Hit, Triple Captain, Bench Boost

๐Ÿ”ง Technical Architecture

Repository Structure

gfl/
โ”œโ”€โ”€ .github/workflows/     # GitHub Actions for validation & scoring
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ players/          # Player database and prices
โ”‚   โ”œโ”€โ”€ fixtures/         # Match schedules
โ”‚   โ””โ”€โ”€ rules/            # Game rules configuration
โ”œโ”€โ”€ teams/                # Each user's team in their subdirectory
โ”œโ”€โ”€ leagues/              # League standings and configurations
โ”œโ”€โ”€ scripts/              # Validation and scoring scripts
โ””โ”€โ”€ cli/                  # Command-line interface tool

Validation Pipeline

Every PR triggers automated validation:

  • โœ… Budget constraints
  • โœ… Squad composition rules
  • โœ… Transfer deadlines
  • โœ… Ownership verification
  • โœ… Points calculations

๐ŸŽฏ Why This Approach?

For Developers

  • Learn git workflows in a fun, practical way
  • Practice PR etiquette and code review
  • Understand CI/CD pipelines
  • Experience collaborative development

For the Game

  • Transparent: All teams and changes are public
  • Fair: Automated validation prevents cheating
  • Auditable: Complete history of all decisions
  • Decentralized: No central server required
  • Educational: Combines gaming with professional skills

๐Ÿ“š Documentation

๐Ÿค Community

  • League Chat: Discussions happen in PR comments
  • Issues: Report bugs or suggest features
  • Wiki: Community strategies and tips

๐Ÿ—๏ธ Project Status

This is a novel concept in active development. Current features:

  • Core architecture design
  • Validation system design
  • CLI tool implementation
  • GitHub Actions workflows
  • Points calculation engine
  • Web dashboard

New: Ink-Powered CLI

The CLI has been completely rebuilt using Ink (React for CLIs):

  • Modern component-based architecture
  • Smooth animations and transitions
  • Real-time UI updates
  • Beautiful gradient effects
  • Responsive keyboard navigation

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

The MIT License is a permissive license that allows you to:

  • Use the code commercially
  • Modify and distribute the code
  • Use the code privately
  • Sublicense the code

๐Ÿ™ Acknowledgments

  • Friday brown bag for inspiring this idea
  • The open source community for continuous inspiration

Ready to revolutionize fantasy football? Fork the repo and join the league!

About

Git Football League - a revolutionary approach to Fantasy Football using git workflows, pull requests, to manage teams and CI/CD pipelines to enforce the rules.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •