Chess Tournament Director
A comprehensive chess tournament management system with React frontend and Node.js backend, featuring Swiss-system pairings, player management, and tournament analytics.
🏆 Features
- Tournament Management: Create and manage chess tournaments with multiple sections
- Swiss System Pairings: Automated pairing algorithm with USCF compliance
- Player Management: Add, edit, and search players with rating lookup
- Real-time Standings: Live tournament standings with tiebreakers
- Export Capabilities: PDF reports, CSV exports, and DBF file generation
- Responsive Design: Modern React UI with Tailwind CSS
- Authentication: Secure user authentication and authorization
🚀 Quick Start
Prerequisites
- Node.js (v16 or higher)
- npm or yarn
- Git
Installation
-
Clone the repository
git clone <repository-url> cd ratings
-
Install dependencies
npm run install-all
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration
-
Start the development server
npm run dev
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
📦 Project Structure
ratings/
├── client/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Application pages
│ │ ├── services/ # API services
│ │ └── contexts/ # React contexts
├── server/ # Node.js backend
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ ├── middleware/ # Express middleware
│ └── database.js # Database configuration
├── uploads/ # File uploads
└── docs/ # Documentation
🛠️ Available Scripts
npm run dev- Start development server (both frontend and backend)npm run client- Start React development servernpm run server- Start Node.js backend servernpm run build- Build React app for productionnpm start- Start production servernpm run setup- Create admin user
🌐 Deployment
Heroku Deployment
This application is configured for easy Heroku deployment:
-
Quick Deploy
./deploy.sh
-
Manual Deploy
- See
HEROKU_DEPLOYMENT.mdfor detailed instructions - Or follow
QUICK_DEPLOY.mdfor quick reference
- See
Environment Variables
| Variable | Description | Default |
|---|---|---|
NODE_ENV |
Environment mode | development |
PORT |
Server port | 5000 |
JWT_SECRET |
JWT token secret | Required |
CORS_ORIGIN |
CORS allowed origins | http://localhost:3000 |
🎯 Core Features
Tournament Management
- Create tournaments with custom settings
- Manage multiple tournament sections
- Set time controls and prize structures
- Export tournament data in multiple formats
Pairing System
- Swiss-system pairings with USCF compliance
- Automatic bye assignment
- Pairing history tracking
- Conflict resolution
Player Management
- Add players manually or import via CSV
- USCF rating lookup integration
- Player search and filtering
- Rating history tracking
Analytics & Reporting
- Real-time tournament standings
- Comprehensive tiebreaker calculations
- PDF report generation
- Tournament statistics
🔧 Technology Stack
Frontend
- React 18 - Modern React with hooks
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Axios - HTTP client for API calls
Backend
- Node.js - JavaScript runtime
- Express.js - Web application framework
- SQLite - Lightweight database
- JWT - Authentication tokens
Additional Tools
- Helmet - Security middleware
- CORS - Cross-origin resource sharing
- Rate Limiting - API protection
- Multer - File upload handling
📚 Documentation
- Heroku Deployment Guide
- Quick Deploy Instructions
- Authentication Setup
- CSV Import Guide
- Player Search Documentation
Python SDK: Online Tournaments
The official Paircraft SDK (paircraft>=1.1.0) includes helper functions for online tournaments:
pip install --upgrade paircraft
from paircraft import ChessTournamentClient
client = ChessTournamentClient(api_key="your-api-key", base_url="https://www.paircraft.tech")
tournament = client.create_online_tournament(
name="Online Blitz Night",
platform="lichess", # or "chesscom"
rounds=3,
section="Open"
)
player_ids = client.import_players(tournament.id, [
{"name": "Test White", "section": "Open", "lichess": "white_handle"},
{"name": "Test Black", "section": "Open", "lichess": "black_handle"},
])
pairings = client.pair_round(tournament.id, round=1, section="Open")
games = client.create_online_games(tournament.id, round=1, platform="lichess", section="Open")
client.start_clocks(tournament.id, round=1, section="Open")
pairings = client.poll_results(tournament.id, round=1)
if pairings:
game = client.game_status(tournament.id, pairings[0].id, include_pgn=True)
Online helper methods include create_online_tournament, import_players, pair_round, oauth_link, create_online_games, start_clocks, poll_results, game_status, set_result, paste_pairings, and validate_usernames.
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the PolyForm Noncommercial License - see the LICENSE file for details.
Commercial use requires a commercial license. For licensing inquiries, contact support@paircraft.io.
🙏 Acknowledgments
- USCF (United States Chess Federation) for pairing rules
- Chess.com for inspiration
- The open-source community for excellent tools and libraries
📞 Support
For support and questions:
- Create an issue in this repository
- Check the documentation files in the root directory
- Review the code comments for implementation details
Built with ❤️ for the chess community
Metadata
Release files for chessdirector 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chessdirector-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for chessdirector-2.1.0-py3-none-any.whl |
Release files / chessdirector-2.1.0-py3-none-any.whl
| Download URL | chessdirector-2.1.0-py3-none-any.whl |
|---|---|
| Size | 240.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05f8a7bb6c21813b4be08b044e9c3d8e8ffbdb73505a5c011d5903758c60c867
|
|
BLAKE2b-256 checksum How to use checksums |
e311f55f8e0f904ae82981a67e7328a34f99e625d9036bb4379bb55eb5a201e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for chessdirector 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.