https://mls-fantasy-data.fly.dev
A Flask web application for viewing and analyzing MLS Fantasy player statistics.
- Interactive data table with advanced sorting and filtering
- Column visibility toggles to customize your view
- Dark mode support
- Export to CSV functionality
- Filter players by position, stats, and price range
- Responsive design for mobile and desktop viewing
The application uses a centralized initialization script (init.js
) that:
- Initializes the DataTable
- Sets up filtering functionality
- Manages column visibility
- Handles dark mode preferences
- Provides CSV export functionality
app/
├── static/
│ ├── css/
│ │ ├── main.css # Main stylesheet
│ │ └── dark-mode.css # Dark mode styles
│ ├── js/
│ │ ├── table.js # DataTable initialization and functionality
│ │ ├── filters.js # Filter functionality
│ │ └── dark-mode.js # Dark mode toggle
│ └── images/ # For any images you might add later
├── templates/
│ ├── base.html # Base template with common elements
│ ├── index.html # Main content template (extends base.html)
│ └── partials/ # For reusable template parts
│ ├── filters.html # Filter section
│ └── table.html # Table section
├── app.py # Flask application
├── data_service.py # Service for handling data operations
├── player_stats.csv # CSV data file
├── Dockerfile # Docker configuration
├── fly.toml # Fly.io configuration
└── nginx.conf # Nginx configuration
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
- Access the application at http://localhost:80
Build and run with Docker:
docker build -t mls-fantasy-data .
docker run -p 80:80 mls-fantasy-data