Skip to content

poulpe/padel-tracker

Repository files navigation

Padel Tracker

Small app to keep track of Padel matches

Overview

Padel Tracker is a small app to keep track of Padel matches and allow analysis of the progresses of a group of friends over time.
It provides player rankings using an Elo-based system and maintains a history of matches, teams and individual performances.

The application is hosted on Streamlit Community Cloud and can be used on web browser or mobile
https://poulpe-padel-tracker.streamlit.app

Features

  • Player and Team Management: Add, update, and check player and team statistics.
  • Match History: Record match results (date, teams, scores)
  • Elo Ranking System: Calculate player rankings dynamically based on match results with a bonus system vs won games difference. Every single point counts !
  • League Management: Ability to group players within a league, to follow/compare only your mates (player can also belong to several leagues)
  • Data Persistence: Uses a PostgreSQL database hosted on Supabase. Can also be used in local mode to avoid any need of hosting database online.
  • Interactive UI: Built with Streamlit, providing an intuitive and responsive interface in a web browser.
  • Visualization: Charts and tables for ranking history and match statistics.
  • Multilingual Support: English, French and Español
  • User management: User authentification using OIDC provider

Technologies used

  • Backend: SQLModel (SQLAlchemy + Pydantic)
  • Frontend: Streamlit with modular pages and navigation
  • Database: PostgreSQL (Hosted on Supabase)
  • Database migrations: Managed with Alembic
  • Logging: Logs are stored in Supabase for tracking application events
  • User authentification: Through the OpenID Connect (OIDC) provider Auth0, supporting email/password and Google account. OIDC is supported by Streamlit from v1.42.

Roadmap / Ideas

  • Loggings
    • Overall stuff
  • UI
    • Basic Streamlit tuto
    • General layout
    • Graphs
    • Export data as .csv ?
  • Users
    • Manage users (authentification, access...)
    • User auth / login/logout in UI
  • Database
    • Deletes
    • Migrations
    • Get 'data' online
  • Analytics
    • Best teammate
    • Best rival
    • nb_games per Match
    • Other stats (V/D ratio)
      • Like select player, it shows these analytics
  • Leagues
    • Allow several league
    • League description ?
    • Manage league ? (i.e: league admin to add/remove players, rename league)
  • Tests
    • Not the funniest part, but, eh...
  • Feedback
    • "Report bug" form

Gallery


Some specifities

Database

Migrations

Database migration = models changed, how to reflect it on current database "automatically"
Migrations has been configured with Alembic

Use cases

  1. Init
alembic revision --autogenerate -m "first revision"
alembic upgrade head
  1. Anything has been changed to models
alembic revision --autogenerate -m "added new_field to Player"
alembic upgrade head

Run locally and reproduce this app

.env

To run the application locally, you need to set up environment variables in a .env file for secret management. Below is the required structure:

# Run parameters
log_level_console=INFO
db_mode=local # "local" or "cloud"
run_mode=test # "test" or "prod"

# Cloud database related (not needed if you just run locally)
user=my_database_user 
password=my_database_password 
host=my_database_host 
port=my_database_port 
dbname=my_dbname
supabase_api_url=my_api_url
supabase_api_key=my_api_key

If you set db_mode to local, it will just create/read/update a local database in data/ folder, so you don't need to have a database if you want to only do locally.

Note: secret management for the streamlit hosted app is done via the dedicated streamlit secret management method.
The app is looking in priority if any .streamlit/secrets.toml file is defined, otherwise it falls back to checking if an .env file is there.

Run locally

  1. Clone the repository
  2. Make sure uv is installed on your setup
  3. In a terminal, go to folder and run the project via typing this command:
    (it will install project automatically if not already installed)
uv run padel-tracker

Note: this actually runs the following command inside a venv:
streamlit run src/padel-tracker/ui/streamlit_app.py


© 2025 Padel Tracker