| title | Football Manager |
|---|---|
| emoji | ⚽ |
| colorFrom | indigo |
| colorTo | red |
| sdk | docker |
| app_port | 7860 |
| pinned | false |
| license | agpl-3.0 |
| short_description | Manage football teams, allocate players, track matches |
A web app for managing amateur football rosters, balancing teams, and tracking matches.
Live Demo: redevil10-football-manager.hf.space — click Try as Guest to explore
- Player Management — Add/edit players with 41 attributes across Technical, Mental, Physical, and Goalkeeper categories
- Team Allocation — Auto-balance players into teams based on overall scores
- Match Tracking — Create matches, import signups, record goals/assists/events
- Leagues & Clubs — Multi-club support with role-based access (viewer/manager/admin)
- Smart Import — AI-powered signup parsing via Gemini API (optional)
- Persistent Storage — Auto-backup to Hugging Face Datasets every 15 minutes
| Layer | Technology |
|---|---|
| Backend | FastHTML (Python 3.13+) |
| Database | SQLite + HF Datasets backup |
| Frontend | HTML + HTMX |
| Deployment | Docker on Hugging Face Spaces |
| Package Manager | uv |
# Install dependencies
uv sync --extra dev
# Run locally (http://localhost:8000)
uv run python main.py
# Run tests
uv run pytest
# Lint & format
uv run ruff check . --fix && uv run ruff format .| Variable | Required | Description |
|---|---|---|
HF_TOKEN |
On HF Spaces | Hugging Face backup token |
SECRET_KEY |
No | Session secret (auto-generated if unset) |
GEMINI_API_KEY |
No | Enables AI-powered Smart Import |
├── main.py # Entry point
├── core/ # Config, styles, auth utilities
├── db/ # Database operations (SQLite)
├── logic/ # Business logic (scoring, allocation, import)
├── render/ # HTML rendering functions
├── routes/ # HTTP route handlers
├── migrations/ # Database migrations
└── tests/ # pytest test suite
Players are sorted by overall score (10–200), then distributed to minimize the score gap between teams. Players beyond the team capacity become substitutes, split evenly.
AGPL-3.0 — see LICENSE for details.