A full-stack tournament management platform with automated single-elimination bracket generation, built as a collaborative academic project to replicate real-world software development practices.
TourneyProject is a comprehensive tournament management system that allows users to create and manage competitive tournaments with automatic bracket generation. The platform features user authentication, team management, match tracking, and real-time tournament progression through single-elimination brackets.
This project was developed as a realistic study project simulating professional software development workflows, including project management, task delegation, and cross-functional team collaboration.
-
User Management
- JWT-based authentication with refresh tokens
- Role-based access control (Admin/User)
- Secure password hashing with ASP.NET Core Identity
-
Tournament Management
- Create and manage tournaments with customizable settings
- Automatic single-elimination bracket generation
- Tournament status tracking (NotStarted, InProgress, Finished, Cancelled)
- Resource-based authorization (only tournament creators and admins can modify)
-
Team Management
- Create teams with multiple members
- Team registration for tournaments
- Track team statistics and tournament history
-
Match System
- Automated match creation based on bracket structure
- Match result recording
- Progress tracking through tournament stages
- Automatic winner advancement
-
Security & Authorization
- JWT Bearer token authentication
- Resource-based authorization policies
- Role-based permissions (Admin, User)
- Secure API endpoints with Swagger documentation
- Framework: ASP.NET Core 9.0 Web API
- Database: PostgreSQL
- ORM: Entity Framework Core
- Authentication: JWT Bearer Tokens with ASP.NET Core Identity
- Documentation: Swagger/OpenAPI
- Testing: xUnit
- Framework: React 18
- Language: TypeScript
- Build Tool: Vite
- Routing: React Router 7
- State Management: Zustand
- HTTP Client: Axios
- Code Quality: ESLint, Prettier
- Containerization: Docker & Docker Compose
- Database: PostgreSQL (containerized)
- Reverse Proxy/Static Hosting: ASP.NET Core serves React build
- Docker
- Docker Compose
- Clone the repository:
git clone <repository-url>
cd tourneyProject- Create
.envfile in the root directory with the following parameters:
Tip: Copy
.env.exampleand fill in your values:cp .env.example .env
ENVIRONMENT=Production
DB_PASSWORD=your_database_password
JWT_SECRET_KEY=your_secret_key_at_least_32_chars_long
JWT_ISSUER=TourneyAPI
JWT_AUDIENCE=TourneyClient
JWT_TOKEN_EXPIRY_MINUTES=60
JWT_REFRESH_EXPIRY_DAYS=7
VITE_BASE_URL=http://localhost:5188/api- Build and run the application:
docker-compose up --build- Access the application:
- Client: http://localhost:5188
- API: http://localhost:5188/api
- Swagger (Development only): http://localhost:5188/swagger
Email: admin@admin.com
Password: Admin123!
SECURITY WARNING:
- Change the default admin credentials immediately in production environments
- Use strong, unique passwords
- Never commit
.envfiles or files containing real credentials to version control- Generate secure JWT secret keys using:
openssl rand -base64 32
-
Install prerequisites:
- .NET 9.0 SDK
- PostgreSQL
-
Navigate to API directory:
cd api/src/TourneyAPI- Install EF Core tools:
dotnet tool install --global dotnet-ef- Set up database:
# Create PostgreSQL database
sudo -u postgres psql
postgres=# CREATE DATABASE tourneydb;
postgres=# CREATE USER your_username WITH ENCRYPTED PASSWORD 'your_password';
postgres=# GRANT ALL PRIVILEGES ON DATABASE tourneydb TO your_username;
# Apply migrations
dotnet ef database update- Run the API:
dotnet run- Navigate to UI directory:
cd ui- Install dependencies:
npm install- Start development server:
npm run dev- Build for production:
npm run buildRun unit tests:
cd api/tests/TourneyAPI.Tests
dotnet testtourneyProject/
├── api/ # Backend API
│ ├── src/TourneyAPI/
│ │ ├── Authorization/ # Custom authorization handlers
│ │ ├── Data/ # EF Core DbContext and configurations
│ │ ├── Endpoints/ # Minimal API endpoints
│ │ ├── Models/ # Domain models and DTOs
│ │ ├── Services/ # Business logic services
│ │ │ └── BracketGenerators/ # Tournament bracket algorithms
│ │ └── Migrations/ # EF Core migrations
│ └── tests/ # Unit tests
├── ui/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ └── utils/ # Utility functions
├── docs/ # Project documentation
├── layout/ # Initial HTML/CSS prototypes
├── docker-compose.yml # Docker orchestration
└── Dockerfile # Multi-stage build
- Minimal APIs: Endpoint definitions using ASP.NET Core Minimal API pattern
- Service Layer: Business logic abstracted into service interfaces
- Repository Pattern: Entity Framework Core as abstraction over PostgreSQL
- Authorization: Custom resource-based authorization handlers for fine-grained permissions
- Dependency Injection: Built-in ASP.NET Core DI container
- Component-Based: Modular React components
- State Management: Zustand for global state
- Type Safety: Full TypeScript coverage
- Routing: React Router for SPA navigation
This project was developed by a collaborative student team:
| Name | Role | Responsibilities |
|---|---|---|
| Egor | Project Lead & Backend Developer | Project management, task coordination, API architecture, backend infrastructure, database design, authentication system, authorization policies, service layer implementation, Docker configuration |
| Sergey | Frontend Developer (Layout) | HTML/CSS markup, responsive design, UI implementation |
| Nikita | Frontend Developer (Logic) | React components, state management, API integration, frontend business logic |
| Alexander | Server Deployment | Server configuration for the demo deployment |
| Svyatoslav | UI/UX Designer | Interface design, user experience, Figma prototypes |
API documentation is available through Swagger UI when running in Development mode:
- Local: http://localhost:5188/swagger
- Swagger JSON:
api/src/TourneyAPI/docs/swagger.json
POST /api/users/register- User registrationPOST /api/users/login- User authenticationGET /api/tournaments- List all tournamentsPOST /api/tournaments- Create tournament (authenticated)POST /api/teams- Create teamPUT /api/matches/{id}- Update match results
- Password hashing with ASP.NET Core Identity
- JWT token-based authentication
- Refresh token rotation
- Role-based authorization (Admin, User)
- Resource-based authorization for tournaments, teams, and matches
- CORS configuration for cross-origin requests
- Data protection keys persisted in Docker volumes
- Port: 5188
- Auto-migration on startup
- Serves both API and static React build
- Data protection keys volume
- PostgreSQL latest
- Health checks configured
- Persistent data volume
- Automatic initialization
Stop containers:
docker-compose downRemove all data (including database):
docker-compose down -vThis is an academic project developed for educational purposes.
This project was created as a realistic study project to simulate professional software development practices. It demonstrates:
- Full-stack development with modern technologies
- RESTful API design principles
- Authentication and authorization patterns
- Database design and ORM usage
- Docker containerization
- Team collaboration and project management
- Git workflow and version control
- Testing methodologies
The project was led by the backend developer who managed the team, coordinated tasks, and was responsible for the complete backend architecture and infrastructure setup.