A Ruby on Rails application for managing tournament brackets and pools.
- Ruby 3.4.2
- SQLite 3.8.0+
- Node.js/Bun for asset compilation
- Docker for production deployment
- Clone the repository:
git clone https://github.com/bracket-lab/bracket-lab.git
cd bracket-lab- Run the setup script:
bin/setupThis will:
- Install Ruby dependencies via Bundler
- Install JavaScript dependencies via Bun
- Set up the development database
- Start the development server
- Configure environment variables:
cp .env.template .envEdit .env and set the following required variables:
RAILS_MASTER_KEY: Rails master key for decrypting credentialsPOOL_NAME: Name of your tournament poolMADNESS_HOST: Host domain for your applicationSMTP_*: SMTP settings for email deliveryDEV_PASSWORD: Password for dev scenario users
Run the test suite:
bin/rails testReset the database to different tournament states for development and testing:
# List available scenarios
bin/rails dev:scenarios
# Reset to a specific state
bin/rails dev:scenarios[pre_tipoff]Available scenarios:
| Scenario | Description |
|---|---|
pre_selection |
No tournament exists |
pre_tipoff |
Tournament created, brackets editable |
tipoff |
Brackets locked, no game results |
some_games |
~10 Round 1 games completed |
first_weekend |
48 games (Rounds 1 & 2 complete) |
mid_tournament |
50 games with Sweet 16 gaps |
final_four |
60 games (3 games remaining) |
completed |
All 63 games finished |
The application includes a production-ready Dockerfile with:
- Multi-stage builds for smaller images
- Jemalloc for improved memory usage
- Proper security settings
- Automatic database migrations
- Asset precompilation
The production environment uses:
- SQLite databases with persistent storage
- Solid Queue for background job processing
- Solid Cache for caching
- Solid Cable for Action Cable
- Thruster for HTTP asset optimization
- Pundit for authorization
This software is licensed under the GNU Affero General Public License v3 (AGPL-3.0). See the LICENSE file for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please follow the Conventional Commits specification for commit messages.