A full-stack web application for creating and managing tournament brackets, perfect for beer pong tournaments or any other competitive games.
- 🏆 Automatic Bracket Generation: Just add player names and the app creates a perfect tournament bracket
- 🎯 Real-time Updates: Track match progress and automatically advance winners
- 💾 Persistent Storage: PostgreSQL database ensures no progress is lost on refresh
- 🐳 Docker Compose: Easy deployment with containerized services
- 📱 Responsive Design: Works great on desktop and mobile devices
- 🎮 Smart Pairing: Automatic random player pairing and bye handling for odd numbers
- Backend: FastAPI (Python)
- Frontend: React.js
- Database: PostgreSQL
- Deployment: Docker Compose
-
Clone the repository
git clone <repository-url> cd tournify
-
Run with Docker Compose
docker-compose up --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
-
Create a Tournament
- Click "Create New Tournament"
- Enter a tournament name
- Add player names (minimum 2 players)
- Click "Create Tournament"
-
Manage Matches
- Click on a player's name to declare them the winner
- The bracket automatically updates and advances winners
- Track progress through each round
-
View Results
- See the tournament champion when completed
- Browse past tournaments from the main list
POST /tournaments/
- Create a new tournamentGET /tournaments/
- List all tournamentsGET /tournaments/{id}
- Get tournament detailsPATCH /matches/{id}/winner
- Update match winner
cd backend
pip install -r requirements.txt
uvicorn main:app --reload
cd frontend
npm install
npm start
The application uses PostgreSQL. When running with Docker Compose, the database is automatically set up with the correct schema.
tournify/
├── docker-compose.yml
├── backend/
│ ├── main.py # FastAPI application
│ ├── models.py # Database models
│ ├── schemas.py # Pydantic schemas
│ ├── crud.py # Database operations
│ ├── database.py # Database configuration
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ └── services/ # API services
│ └── package.json
└── README.md
- Supports any number of players (minimum 2)
- Automatically creates bye players for perfect bracket structure
- Random player pairing for fair competition
- Automatic bracket generation based on tournament size
- Real-time match updates
- Progressive winner advancement
- Visual tournament bracket display
- All tournament data stored in PostgreSQL
- Survives application restarts
- Complete match history tracking
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is open source and available under the MIT License.