Skip to content

Latest commit

 

History

History
86 lines (66 loc) · 2.6 KB

File metadata and controls

86 lines (66 loc) · 2.6 KB

HattrickPlanner

Simple Hattrick Team Management for Game Enthusiasts

A hobby project built by Hattrick fans for analyzing player development, match statistics, and team management. Built for managers who love diving deep into virtual football team data and statistics.

Quick Start

Requirements: Docker, UV package manager, Hattrick CHPP credentials

# Install UV
brew install uv  # macOS
# or pip install uv

# Setup project
git clone <repo-url> && cd htstatus-2.0
cp environments/.env.development.example .env
# Edit .env with your CHPP credentials

# Start development
make setup  # Install dependencies + start services
make dev    # Run Flask development server

Make Commands

make help          # Show all commands
make dev           # Start development server
make test-all      # Run comprehensive tests
make db-migrate    # Create database migration
make db-upgrade    # Apply migrations
make clean         # Clean temporary files

Configuration

Environment Variables (.env):

CONSUMER_KEY=your-chpp-key                # Get at https://chpp.hattrick.org/
CONSUMER_SECRETS=your-chpp-secret
CALLBACK_URL=http://localhost:5000/auth
DATABASE_URL=postgresql://user:pass@host:port/db  # Auto-configured for dev

Quick Config:

cp config.py.template config.py  # Full config with documentation
# or use environment variables only

Architecture

  • Backend: Flask 2.x + SQLAlchemy + PostgreSQL
  • Frontend: Server-rendered Jinja2 templates + Chart.js
  • Authentication: Hattrick OAuth via CHPP API

Development

Key Features:

  • Player statistics and development tracking
  • Team management with custom grouping
  • Match result analysis
  • Training progress monitoring
  • Interactive tutorials and onboarding

Database Protection (INFRA-033):

make db-backup                    # Create full database backup
make db-restore BACKUP_FILE=...   # Restore from backup
make db-backup-auto              # Automated backup to kloker.local

Documentation


Project Philosophy: Simple, reliable hobby project focused on database integrity and Hattrick game enhancement. Built for spare-time maintenance with comprehensive CHPP API integration.