⚠️ Work in Progress - This project is under active development. APIs may change, features are incomplete, and dragons may exist. Contributions and feedback welcome!
Self-hosted pool/billiards match tracking for tournaments, leagues, and friendly games
An open-source backend for pool players and communities who want to run their own match tracking platform. Host tournaments, organize leagues, track stats, and settle debates about who really won that game.
Built with FastAPI, PostgreSQL, and a love for the game.
- Match Recording - Log matches with opponent approval (no more disputed results)
- Multi-Game Support - 8-ball, 9-ball, and 10-ball tracking
- Statistics - Track performance across game types and opponents
- Self-Hosted - Run your own instance for your pool hall, league, or friend group
- API-First - Clean REST API for building your own clients
Corner-Pocket is designed as a platform with multiple client applications:
| Client | Status | Repository |
|---|---|---|
| Mobile App (React Native) | 🚧 In Progress | Coming soon |
| Web App | 📋 Planned | Coming soon |
The backend provides a complete REST API, so you can also build your own clients!
This is an active work-in-progress. Here's what's done and what's coming:
| Feature | Status |
|---|---|
| JWT Authentication | ✅ Complete |
| User Registration/Login | ✅ Complete |
| Database Models | ✅ Complete |
| Match Creation | 🚧 In Progress |
| Match Approval Flow | 📋 Planned |
| Statistics API | 📋 Planned |
| Tournament Support | 📋 Planned |
| League Management | 📋 Planned |
- FastAPI - Modern, fast Python web framework
- PostgreSQL - Production-ready database
- SQLAlchemy + Alembic - ORM and migrations
- JWT Authentication - Secure token-based auth
- Docker - Easy deployment
- Poetry - Dependency management
# Clone the repo
git clone https://github.com/Mattsface/corner-pocket-backend.git
cd corner-pocket-backend
# Copy environment config
cp .env.example .env
# Start the database
docker compose up -d db
# Install dependencies
poetry install
# Run migrations
poetry run alembic upgrade head
# Start the server
poetry run uvicorn corner_pocket_backend.main:corner_pocket_backend --reloadVerify it's running:
curl http://localhost:8000/health
# {"ok": true}- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
docker compose uppoetry run pytestContributions are welcome! This project is in early stages, so there's plenty to do:
- Bug fixes and improvements
- Documentation
- New features
- Testing
- Fork the repo and create a branch (
feat/your-feature) - Make your changes
- Run linting and tests:
poetry run ruff check . && poetry run pytest - Submit a PR with a clear description
feat/- New featuresfix/- Bug fixesdocs/- Documentationrefactor/- Code improvementstest/- Tests
| Variable | Description | Default |
|---|---|---|
DB_HOST |
Database host | localhost |
DB_PORT |
Database port | 5432 |
DB_NAME |
Database name | cornerpocket |
DB_USER |
Database user | cp |
DB_PASSWORD |
Database password | changeme |
JWT_SECRET |
Token signing key | change_this_secret |
CORS_ORIGINS |
Allowed origins | http://localhost:19006 |
DB_PASSWORD and JWT_SECRET in production!
MIT License - See LICENSE for details.
- Issues: GitHub Issues
- Author: Matthew Spah
Built with ❤️ for the pool community