A modern chess tournament management platform for the DACH region (Germany, Austria, Switzerland).
- Tournament Management: Swiss, Round Robin, Knockout, Team Swiss, Arena formats
- Pairing Engines: JaVaFo (FIDE-endorsed) and bbpPairings integration
- Federation Support: FIDE, DSB (Germany), ÖSB (Austria), SSB (Switzerland)
- Real-time Chess: Play games directly in the browser via WebSocket
- Standings & Tiebreaks: 90+ tiebreak options including Buchholz, SB, Direct Encounter
- Multi-language: German (primary) and English
- Export: TRF, PGN file generation for federation reporting
- Go 1.22 with Gin web framework
- PostgreSQL 16 for persistence
- Redis 7 for caching, sessions, pub/sub
- WebSocket for real-time game play
- Next.js 14 with App Router
- React 18 with TypeScript
- TanStack Query for data fetching
- Zustand for state management
- Radix UI + Tailwind CSS for styling
tools/javafo.jar- JaVaFo Swiss pairing enginetools/bbpPairings.exe- bbpPairings Swiss pairing engine
- Go 1.22+
- Node.js 20+
- Docker & Docker Compose
- Make
# Clone the repository
git clone https://github.com/tranmh/openpairing.git
cd openpairing
# Copy environment file
cp .env.example .env
# Start infrastructure (PostgreSQL, Redis, MinIO)
make docker-up
# Run database migrations
make migrate-up
# Seed demo data (optional)
make seed
# Start development servers
make devThe application will be available at:
- Frontend: http://localhost:3000
- API: http://localhost:8080
- Chess WebSocket: ws://localhost:8081
After seeding:
- Email:
admin@openpairing.org - Password:
admin123
openpairing/
├── backend/
│ ├── cmd/
│ │ ├── api/ # REST API server
│ │ ├── chess/ # WebSocket server
│ │ ├── worker/ # Background jobs
│ │ └── seed/ # Database seeding
│ ├── internal/
│ │ ├── auth/ # JWT authentication
│ │ ├── chess/ # Game logic & WebSocket
│ │ ├── federation/ # FIDE, DSB, ÖSB, SSB APIs
│ │ ├── pairing/ # Pairing engine integration
│ │ ├── tournament/ # Tournament management
│ │ ├── player/ # Player profiles
│ │ ├── standings/ # Standings calculations
│ │ └── export/ # TRF/PGN exports
│ ├── migrations/ # Database migrations
│ └── pkg/ # Shared utilities
├── frontend/
│ └── src/
│ ├── app/ # Next.js App Router
│ ├── components/ # React components
│ ├── lib/ # API client, utilities
│ ├── store/ # Zustand stores
│ └── i18n/ # Translations
├── tools/ # Pairing engines
├── scripts/ # Deployment scripts
└── deploy/ # Systemd services
make dev # Start all development servers
make docker-up # Start Docker services
make docker-down # Stop Docker servicesmake build # Build all services
make build-backend # Build Go binaries
make build-frontend # Build Next.js appmake test # Run all tests
make test-backend # Go tests with coverage
make test-frontend # Vitest with coveragemake migrate-up # Apply migrations
make migrate-down # Rollback one migration
make migrate-create # Create new migration
make seed # Seed demo data
make seed-force # Clear and reseedmake lint # Run all linters
make fmt # Format codeKey environment variables (see .env.example):
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | - |
REDIS_URL |
Redis connection string | - |
JWT_SECRET |
JWT signing key | - |
API_PORT |
API server port | 8080 |
CHESS_PORT |
WebSocket server port | 8081 |
FRONTEND_PORT |
Next.js port | 3000 |
JAVAFO_PATH |
Path to javafo.jar | tools/javafo.jar |
BBP_PATH |
Path to bbpPairings | tools/bbpPairings.exe |
# Standard deployment (idempotent)
sudo ./scripts/deploy.sh
# Force clean deployment (deletes all data)
sudo ./scripts/deploy.sh --forceThe deployment script:
- Installs system dependencies (Docker, Go, Node.js)
- Sets up PostgreSQL and Redis containers
- Runs database migrations
- Seeds demo data
- Builds and deploys all services
- Configures systemd services
After deployment, services are managed via systemd:
systemctl status openpairing-api
systemctl status openpairing-chess
systemctl status openpairing-worker
systemctl status openpairing-frontendThe API follows REST conventions:
POST /api/v1/auth/login- AuthenticateGET /api/v1/tournaments- List tournamentsPOST /api/v1/tournaments- Create tournamentGET /api/v1/tournaments/:id/standings- Get standingsPOST /api/v1/tournaments/:id/rounds/:round/pair- Generate pairings
Full API documentation available at /api/docs when running in development.
| Format | Description |
|---|---|
| Swiss | Standard Swiss system with Dutch pairing |
| Round Robin | All-play-all format |
| Knockout | Single/double elimination |
| Team Swiss | Team-based Swiss pairing |
| Arena | Continuous pairing (Lichess-style) |
OpenPairing integrates with chess federations for:
- Player data import (ratings, titles, FIDE IDs)
- Tournament registration via federation APIs
- Rating report generation (TRF format)
Supported federations:
- FIDE - International Chess Federation
- DSB - German Chess Federation
- ÖSB - Austrian Chess Federation
- SSB - Swiss Chess Federation
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes using conventional commits (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
We use Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesrefactor:- Code refactoringtest:- Test additions/changeschore:- Maintenance tasks
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See agpl-3.0.txt for details.
For issues and feature requests, please use the GitHub Issues page.