Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

GORD - Guess The Word Backend

A multiplayer word-guessing party game API built with ASP.NET Core 9 and SignalR for real-time communication.

🎮 Game Overview

Guess The Word is a team-based party game where players compete across 3 rounds with increasing difficulty:

Round Type Rule
1 Free Description Use any words to describe (except the word itself)
2 One Sentence Limited to one sentence only
3 One Word Only a single word hint allowed

🏗️ Architecture

The project follows Clean Architecture principles:

├── Domain/          # Core entities, models, exceptions
├── Application/     # DTOs, interfaces, mappers, business logic
├── Infrastructure/  # Service implementations
├── Api/             # Controllers, SignalR hubs, middleware
└── Tests/           # Unit and integration tests

🚀 Getting Started

Prerequisites

Running the API

cd Api
dotnet run

The API runs on http://localhost:5000 with Swagger UI available at the root URL.

Running Tests

dotnet test

📡 API Endpoints

Endpoint Method Description
/api/games POST Create a new game
/api/games/{gameId} GET Get game status
/api/games/code/{code} GET Get game by 4-character code
/api/games/{gameId}/state GET Get full game state
/api/games/{gameId}/teams POST Create a team
/api/games/{gameId}/join POST Join a game
/api/games/{gameId}/change-team POST Change team
/api/games/{gameId}/words POST Add words to pool
/api/games/{gameId}/start POST Start the game
/api/games/{gameId}/turns/start POST Start a turn
/api/games/{gameId}/turns/current-word GET Get current word (clue giver only)
/api/games/{gameId}/turns/guess POST Submit a guess
/api/games/{gameId}/turns/skip POST Skip current word
/api/games/{gameId}/turns/end POST End current turn
/api/games/{gameId}/rounds/current GET Get current round info

🔌 SignalR Hub

Hub URL: /gamehub

Events (Server → Client)

Event Description
TeamCreated New team created
PlayerJoined Player joined a team
PlayerChangedTeam Player switched teams
GameStarted Game has begun
RoundStarted New round started
TurnStarted Turn has begun
WordGuessed Word correctly guessed
WordSkipped Word was skipped
TurnEnded Turn ended
RoundEnded Round completed
GameEnded Game finished

Client Methods

Method Description
JoinGameRoom Join game's notification group
LeaveGameRoom Leave game's notification group

⚙️ Configuration

Rate Limiting

Policy Limit Scope
Global 200 req/min All endpoints
Fixed 100 req/min General operations
Create Game 10 req/min Game creation
Gameplay 60 req/min Turn-related actions

🛠️ Technology Stack

  • Framework: ASP.NET Core 9
  • Real-time: SignalR
  • API Documentation: Swagger/OpenAPI
  • Architecture: Clean Architecture

📄 License

This project is for educational/personal use.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages