A comprehensive padel court availability tracking and notification system. Search for available courts across multiple locations, create automated search orders, and get notified when courts become available.
- πΎ Multi-location Support: Track availability across multiple padel clubs
- π Time Range Search: Find courts available within flexible time windows
- π Search Orders: Set up automated searches with notifications
- π Indoor/Outdoor Filtering: Search by court type preferences
- π Secure API: JWT-based authentication with user management
- π Data Persistence: PostgreSQL database with migrations
- π REST API: Clean, RESTful API design
- π§ Email Notifications: Automated alerts when courts are found
- π³ Docker Ready: Production-ready Docker configuration
- π Production Ready: Complete deployment infrastructure
padelwatcher/
βββ backend/ # Backend API and services
β βββ app/ # Main application code
β β βββ api.py # Flask API endpoints
β β βββ models.py # Database models
β β βββ services.py # Business logic
β β βββ config.py # Configuration
β β βββ courtfinder/ # Court finding services
β βββ alembic/ # Database migrations
β βββ tests/ # Test files
β βββ scripts/ # Utility scripts
β βββ requirements.txt # Python dependencies
βββ data/ # Database files (gitignored)
βββ web/ # Frontend (to be implemented)
βββ .github/ # GitHub configuration
βββ README.md # This file
- Python 3.12+
- pip
- Virtual environment (recommended)
-
Clone the repository
git clone <repository-url> cd padelwatcher
-
Set up virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r backend/requirements.txt
-
Set up environment variables
cp backend/.env.example backend/.env # Edit backend/.env with your configuration -
Run database migrations
cd backend alembic upgrade head -
Start the API
cd backend python -m app.api
The API will be available at http://localhost:5000
Default demo account:
- Email:
demo@example.com - Password:
demo123
Login to get a JWT token:
curl -X POST http://localhost:5000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "demo@example.com", "password": "demo123"}'Search for available courts in a time range:
curl -X POST http://localhost:5000/api/search/available \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"date": "2025-11-16",
"start_time_range": "18:00",
"end_time_range": "21:00",
"duration": 60,
"indoor": true
}'Set up automated availability checking:
curl -X POST http://localhost:5000/api/search-orders \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"date": "2025-11-16",
"start_time_range": "18:00",
"end_time_range": "21:00",
"duration": 60
}'Add a new padel club by slug:
curl -X POST http://localhost:5000/api/locations \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"slug": "padel-mate-amstelveen"}'For complete API documentation, see the interactive API demo:
cd backend
python scripts/api_demo.py| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| POST | /api/auth/register |
Register new user |
| POST | /api/auth/login |
Login and get JWT token |
| GET | /api/locations |
Get all locations |
| POST | /api/locations |
Add new location |
| GET | /api/locations/{id}/courts |
Get courts for location |
| POST | /api/search/available |
Search available courts |
| POST | /api/search-orders |
Create search order |
| GET | /api/search-orders |
Get user's search orders |
| GET | /api/search-orders/{id} |
Get search order details |
| DELETE | /api/search-orders/{id} |
Cancel search order |
| POST | /api/search-orders/{id}/fetch |
Fetch availability |
| POST | /api/availability/fetch |
Fetch all availability |
cd backend
python tests/test_api.py
python tests/test_comprehensive_time_range.pyCreate a new migration:
cd backend
alembic revision -m "Description of changes"Apply migrations:
cd backend
alembic upgrade headRollback migration:
cd backend
alembic downgrade -1app/api.py: Flask application and REST endpointsapp/models.py: SQLAlchemy database modelsapp/services.py: Business logic and database operationsapp/courtfinder/: Court availability fetching servicesapp/config.py: Application configuration
pip install gunicorn
cd backend
gunicorn -w 4 -b 0.0.0.0:5000 app.api:appSet these in production:
export SECRET_KEY='your-super-secret-random-key'
export JWT_EXPIRATION_HOURS=24
export FLASK_DEBUG=FalseFROM python:3.12-slim
WORKDIR /app
COPY backend/requirements.txt .
RUN pip install -r requirements.txt
COPY backend/ ./backend/
COPY data/ ./data/
WORKDIR /app/backend
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app.api:app"]- Change the
SECRET_KEYto a strong random value - Use environment variables for sensitive data
- Enable HTTPS
The easiest way to deploy Padel Watcher is using Docker:
-
Clone and Configure
git clone https://github.com/thom-techlete/padelwatcher.git cd padelwatcher cp .env.example .env # Edit .env with your production values
-
Deploy
./scripts/deploy.sh
-
Create Admin User
docker-compose exec backend python scripts/create_admin.py
π Complete deployment guide: See DEPLOYMENT.md
β Deployment checklist: See PRODUCTION_CHECKLIST.md
β‘ Quick reference: See QUICK_REFERENCE.md
- β PostgreSQL database with automated backups
- β Production-optimized Flask backend with Gunicorn
- β React frontend with Nginx
- β Nginx reverse proxy with SSL/TLS support
- β Docker Compose orchestration
- β Health checks and monitoring
- β Security hardening
- β Automated deployment scripts
-
Clone the repository
git clone https://github.com/thom-techlete/padelwatcher.git cd padelwatcher -
Backend Setup
cd backend python -m venv .venv source .venv/bin/activate pip install -r requirements.txt alembic upgrade head python -m app.api
-
Frontend Setup
cd web npm install npm run dev
- Backend: Flask, SQLAlchemy, Alembic, Gunicorn
- Database: PostgreSQL
- Authentication: JWT (PyJWT)
- API: RESTful with CORS support
- Frontend: React, TypeScript, TanStack Router, TanStack Query
- Styling: Tailwind CSS
- Data Fetching: httpx, BeautifulSoup
- Scheduling: APScheduler (background tasks)
- Email: Gmail SMTP
- Deployment: Docker, Docker Compose, Nginx
This project implements security best practices:
- JWT authentication
- Password hashing (Werkzeug/PBKDF2)
- Rate limiting
- CORS protection
- SQL injection protection (SQLAlchemy ORM)
- Security headers
- Non-root container users
- Environment variable configuration
See SECURITY.md for details.
- DEPLOYMENT.md - Complete production deployment guide
- PRODUCTION_CHECKLIST.md - Pre-deployment checklist
- QUICK_REFERENCE.md - Common commands and operations
- SECURITY.md - Security policy and best practices
- backend/API_DOCUMENTATION.md - API reference
- DEVELOPMENT.md - Development guide
- CONTRIBUTING.md - Contribution guidelines
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE file for details
- Web frontend (React + TypeScript)
- Email notifications
- PostgreSQL support
- Rate limiting
- User management dashboard
- Docker deployment
- Production-ready infrastructure
- SMS notifications
- Multi-provider support (beyond PadelMate)
- Court booking integration
- Mobile app (React Native)
- Advanced filtering (price, court quality, etc.)
- User preferences and favorites
- Analytics dashboard
- Webhook support
- API versioning
- Issues: GitHub Issues
- Documentation: See documentation files listed above
- Security: See SECURITY.md for reporting vulnerabilities
MIT License - see LICENSE file for details