Skip to content

timoknapp/tennis-tournament-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎾 Tennis Tournament Finder

A simple Map showing all recent tennis tournaments for passionate tennis players in Germany.

Build Backend Build Frontend

Getting Started

Try it out!

Features

Soon

Backend Development

Running the Backend Server

The backend is written in Go and provides the API for fetching tournament data from various tennis federations.

cd backend
go run ./cmd/main.go

Log Level Configuration

The backend supports configurable log levels via the TTF_LOG_LEVEL environment variable:

Available Log Levels:

  • DEBUG - Detailed debugging information (shows all logs)
  • INFO - General information messages (default, recommended for production)
  • WARN - Warning messages only
  • ERROR - Error messages only

Usage Examples:

# Debug mode (shows everything)
TTF_LOG_LEVEL=DEBUG go run ./cmd/main.go

# Production mode (default)
TTF_LOG_LEVEL=INFO go run ./cmd/main.go

# Minimal logging (errors only)
TTF_LOG_LEVEL=ERROR go run ./cmd/main.go

# Set persistently in your shell
export TTF_LOG_LEVEL=DEBUG
go run ./cmd/main.go

Log Output Format:

[2025-08-06T14:23:45.123Z] INFO: Starting Tennis Tournament Finder backend server...
[2025-08-06T14:23:45.124Z] DEBUG: Cache HIT (location): location_key for tournament 12345
[2025-08-06T14:23:45.125Z] INFO: Get Tournaments from: 03.08.2025 to: 10.08.2025

All timestamps are in UTC for consistency across time zones.

Scheduler

Enable the in-process scheduler purely via env vars (no admin endpoint required):

export TTF_SCHEDULER_ENABLED=true
export TTF_SCHEDULER_CRON="0 2 * * *"         # default: 02:00 daily
export TTF_SCHEDULER_COMP_TYPE=""              # optional
export TTF_SCHEDULER_FEDERATIONS=""            # optional

For more details, see docs/scheduler.md.

FAQ

1. Tournament is not shown with the correct location on the map

This is a known issue. The location of the tournament is not always correct. This is due to the fact that OSM is not always capable of performing the geocoding right. There are two potential outcomes:

  1. Tournament location falls back to the default address of the corresponding tennis federation. There will then be a list of tournaments associated to the default address.
  2. Tournament location is showing a completely different location. In this case please click on the link next to "Adresse". This will then lead you to the address on Google Maps and this location is mostly correct.

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •