A web application for tracking volleyball tournaments, displaying live brackets, and managing scores.
- Public tournament bracket view for spectators
- Live score updates
- Secure admin interface for tournament managers
- Support for different tournament types (single elimination, etc.)
- Court assignment and scheduling
- DynamoDB integration for data persistence
The easiest way to get started is using Docker:
-
Clone the repository:
git clone https://github.com/thvl3/volleytracker.git cd volleytracker -
Set up environment variables (optional - default values will work for development):
- Create
.envfile in the project root with your configuration:DEBUG=True SECRET_KEY=your_secret_key_here ADMIN_PASSWORD=password JWT_SECRET_KEY=your_jwt_secret_here # For local DynamoDB DYNAMODB_ENDPOINT=http://localhost:8000 AWS_REGION=us-east-1
- Create
-
Build and run with Docker Compose:
docker-compose up --build
-
Access the application at http://localhost
You can use curl to test the API:
# Get all tournaments
curl http://localhost/api/tournaments/
# Login as admin
curl -X POST -H "Content-Type: application/json" -d '{"password": "password"}' http://localhost/api/auth/login
# Create a team (requires authentication)
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_TOKEN" \
-d '{"team_name": "Team Name", "tournament_id": "TOURNAMENT_ID", "players": ["Player 1", "Player 2", "Player 3"]}' \
http://localhost/api/teams/
# Create a tournament bracket (requires authentication)
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_TOKEN" \
-d '{"team_ids": ["TEAM_ID_1", "TEAM_ID_2", "TEAM_ID_3"]}' \
http://localhost/api/tournaments/TOURNAMENT_ID/bracketvolleytracker/
├── backend/ # Flask API
│ ├── controllers/ # API endpoint handlers
│ ├── models/ # Data models
│ ├── services/ # Business logic and services
│ ├── config.py # Configuration settings
│ └── requirements.txt # Python dependencies
├── frontend/ # React frontend
│ ├── public/
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── api/ # API client code
│ └── package.json
├── docker-compose.yml # Docker configuration
├── Dockerfile # Docker build instructions
└── nginx.conf # Nginx configuration
The application uses DynamoDB for data storage with the following tables:
VolleyDB_Teams: Stores team informationVolleyDB_Matches: Stores match informationVolleyDB_Tournaments: Stores tournament information
These tables are automatically created when the application starts. The tables use a PAY_PER_REQUEST billing mode with appropriate Global Secondary Indexes for efficient querying.
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
cd backend pip install -r requirements.txt -
Run the development server:
python app.py
-
Install dependencies:
cd frontend npm install -
Run the development server:
npm start
The recommended way to deploy the application is using Docker:
-
Build the Docker image:
docker build -t volleytracker . -
Run the container:
docker run -p 80:80 -e ADMIN_PASSWORD=your_secure_password -e SECRET_KEY=your_secret_key volleytracker
-
Launch an EC2 instance with a recent version of Ubuntu.
-
Install Docker and Docker Compose:
sudo apt update sudo apt install -y docker.io docker-compose sudo usermod -aG docker $USER -
Clone the repository:
git clone https://github.com/thvl3/volleytracker.git cd volleytracker -
Start the application:
docker-compose up -d
- For production use, always change the default passwords
- Set secure values for SECRET_KEY and JWT_SECRET_KEY
- Enable HTTPS when deploying to the internet
- Set up proper IAM roles for DynamoDB access in AWS
-
DynamoDB Connection Issues:
- For local development, ensure DynamoDB local is running
- For AWS, ensure proper IAM permissions are set
-
Docker Issues:
- If you encounter port conflicts, modify the port mapping in docker-compose.yml
-
Application Startup Issues:
- Check the logs using
docker logs volleytracker_app_1 - Ensure all environment variables are correctly set
- Check the logs using
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.