Challenger is a comprehensive web application designed to manage game tournaments and user profiles. It features a robust Team vs. Team bracket system for organized competitive play.
- Tournament Management: Create and organize tournaments with customizable categories.
- Team vs. Team Brackets: specialized support for team-based competitive brackets.
- User Profiles: Manage user accounts and statistics.
- Real-time Updates: Live scoring and updates powered by WebSockets.
- Interactive Interface: A responsive React-based frontend with PWA support.
- Frontend: React, Redux, TypeScript, Progressive Web App (PWA).
- Backend: ASP.NET Core, C#.
- Database: SQL Server, Entity Framework Core.
- API: GraphQL (Queries & Mutations), REST (Controllers), WebSockets.
- Containerization: Docker support for consistency across environments.
To run the application using the provided script:
./run.shIf you prefer to run the services manually using Docker, follow these steps:
-
Pull and Run SQL Server:
docker pull mcr.microsoft.com/mssql/server docker run -d --name challenger-db -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Password123' -p 1433:1433 mcr.microsoft.com/mssql/server:latest
-
Configure App Settings: Retrieve the container IP and update
appsettings.json:SERVER_URL_OR_NAME=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' challenger-db) sed -i'.original' -e "s/SERVER_URL_OR_NAME/$SERVER_URL_OR_NAME/g" ./Models/appsettings.json
-
Build and Run the Service:
docker build -t challenger-service . docker run -d -it -p 8000:80 -p 8001:443 \ -e ASPNETCORE_URLS="https://+;http://+" \ -e ASPNETCORE_HTTPS_PORT=8001 \ -e ASPNETCORE_Kestrel__Certificates__Default__Password="password" \ -e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx \ -v ${HOME}/.aspnet/https:/https/ \ --name challenger-service challenger-service
-
Cleanup: Restore the original configuration file:
mv Models/appsettings.json.original Models/appsettings.json
Manage your database schema with the following commands:
# Drop the existing database
dotnet ef database drop
# Remove the last migration
dotnet ef migrations remove
# Add a new migration (e.g., InitialCreate)
dotnet ef migrations add InitialCreate
# Apply migrations to the database
dotnet ef database updateA high-level overview of the project's organization:
API/: The main ASP.NET Core web application.ClientApp/: The React frontend application.Controllers/: API controllers.
Models/: Domain entities and database models.Repository/: Data access logic and repository implementations.Schema/: GraphQL schema definitions, including Types, Queries, and Mutations.Hub/: WebSocket connection handling logic.
The application follows a modern, layered architecture designed for scalability and maintainability.
- Client Layer: A Single Page Application (SPA) built with React and TypeScript. It utilizes Redux for state management and communicates with the backend via GraphQL and WebSockets.
- Service Layer: An ASP.NET Core Web API that serves the frontend and handles business logic. It exposes a GraphQL API for flexible data retrieval.
- Data Access Layer: Implements the Repository pattern using Entity Framework Core to abstract database interactions.
- Database: SQL Server acts as the persistent storage.
The core business logic and domain relationships are modeled in C#.
This project is licensed under the MIT License - see the LICENSE.md file for details


