Tournament Browser is a modern web application for creating, managing, and participating in tournaments. It combines tournament management features, invitation system, and social networking, allowing users to organize their own tournaments and join tournaments with friends.
When using the application in development version, the first access may require Supabase configuration. The application can run in development mode without a database, but some features will be limited.
I recommend first configuring Supabase or running the application in development mode, then familiarizing yourself with the application's feature documentation and Tournament Browser capabilities.
- Framework: Jinja2 Templates
- Styling: Custom CSS (Bootstrap-style)
- Interactivity: Server-side rendering with forms
- Framework: FastAPI (Python 3.8+)
- Deployment: Local development
- API: RESTful endpoints + HTML rendering
- Engine: PostgreSQL
- Storage: Supabase Storage
- Authorization: Supabase Auth
- Real-time: Real-time change handling
Tournament Browser uses the following permission system:
Guests (not logged in):
- No access to application features
- Ability to register or log in
Logged-in users:
- Creating own tournaments
- Managing own tournaments
- Joining public tournaments
- Accepting tournament invitations
- Inviting friends to tournaments
- Browsing own tournaments
- Searching users
- Sending friend invitations
Tournament creator:
- Editing and deleting tournament
- Managing participants
- Inviting players
- Setting tournament as public/private
Tournament participants:
- Viewing tournament details
- Viewing participant list
- Browsing matches
Other users:
- No access to private tournaments
- Ability to join public tournaments
- Sending and accepting friend invitations
- Ability to remove friends
- Inviting friends to tournaments
- Invitation notification system
- Tournament Management - Creating, editing, deleting tournaments
- Invitation System - Inviting players and friends to tournaments
- Joining Tournaments - Browsing and joining public tournaments
- User Dashboard - Overview of all user tournaments
- Tournament Details - Complete tournament information, participants, and matches
- Friends System - Adding friends and managing relationships
- Responsive Interface - Works on all devices
- REST API - Complete API for frontend integration
- Python 3.8+
- pip (Python Package Manager)
- Supabase account (optional for development mode)
Backend
Create Python virtual environment:
cd backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtConfigure .env file in backend/ directory (optional):
SUPABASE_URL=Your_Supabase_URL
SUPABASE_KEY=Your_Supabase_anon_key
ENV=developmentRun server:
uvicorn main:app --reloadDevelopment Mode (without Supabase)
cd backend
uvicorn main:app --reloadThe application will be available at: http://localhost:8000
- Run
uvicorn main:app --reloadin backend directory - Application available at
http://localhost:8000
- Create project in Supabase
- Configure tables according to database schema
- Add SUPABASE_URL and SUPABASE_KEY environment variables
- Run application with full functionality
tournament_browser/
├── README.md
└── backend/
├── main.py # Main FastAPI application file
├── requirements.txt # Python dependencies
├── config/
│ ├── __init__.py
│ └── config.py # Application configuration and settings
├── db/
│ ├── __init__.py
│ └── supabase.py # Database connections
├── endpoints/
│ ├── __init__.py
│ ├── menu.py # Main menu endpoints
│ ├── tournament.py # Tournament management endpoints
│ ├── tournament_list.py # Tournament listing endpoints
│ └── user_auth.py # Authentication endpoints
├── entities/
│ ├── __init__.py
│ └── users.py # User data models
├── repositories/
│ ├── __init__.py
│ ├── friend_repository.py # Friend data operations
│ ├── tournament_repository.py # Tournament data operations
│ └── user_repository.py # User data operations
├── schemas/
│ ├── __init__.py
│ ├── friend.py # Friend Pydantic schemas
│ ├── login_form.py # Authentication schemas
│ ├── tournaments.py # Tournament schemas
│ └── user.py # User schemas
├── services/
│ ├── __init__.py
│ ├── friend_service.py # Friend business logic
│ ├── tournament.py # Tournament business logic
│ └── user_service.py # User business logic
├── templates/
│ ├── edit_tourn.html # Tournament editing template
│ ├── edit.html # General editing template
│ ├── error.html # Error template
│ ├── login.html # Login template
│ ├── menu.html # Main menu template
│ ├── my_tournaments.html # My tournaments template
│ ├── register.html # Registration template
│ ├── tournament_details.html # Tournament details template
│ ├── tournament_join.html # Tournament joining template
│ └── your_tourn.html # Created tournaments template
├── styles/
│ ├── auth.css # Authentication styles
│ ├── main.css # Main application styles
│ ├── menu.css # Menu styles
│ └── tournament.css # Tournament styles
└── utils/
├── __init__.py
└── auth.py # Authentication utility functions
GET /- API homepageGET /tournament_list/- Tournament joining pageGET /tournament_list/my-tournaments- My tournamentsGET /tournament/{id}/details- Tournament details
GET /tournament_list/api/available- Available tournaments and invitationsPOST /tournament_list/api/{id}/join- Join tournamentPOST /tournament_list/api/{id}/respond- Respond to invitationGET /tournament_list/api/my-tournaments- My tournaments (API)GET /tournament/api/{id}/details- Tournament details (API)
Dariusz Marecik
- Email: marecik.dariusz@gmail.com