Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPSSL - Rock Paper Scissors Spock Lizard

A full-stack implementation of the classic Rock Paper Scissors Spock Lizard game.

The project consists of:

  • Frontend: React + Vite + Material UI
  • Backend: ASP.NET Core 10 Web API
  • Docker & Docker Compose for containerized execution

Architecture

- frontend/
- backend/
  - RpsslGameApi.Application/
  - RpsslGameApi.Contracts/
  - RpsslGameApi.Domain/
  - RpsslGameApi.Infrastructure/
- docker-compose.yml

Tech Stack

Frontend

  • React 19
  • Vite
  • Material UI (MUI)
  • Vitest
  • React Testing Library

Backend

  • ASP.NET Core 10
  • Clean Architecture
  • Swagger

DevOps

  • Docker
  • Docker Compose
  • Nginx

Prerequisites

To run the project locally without Docker:

  • Node.js 20+
  • npm
  • .NET 10 SDK

To run with containers:

  • Docker
  • Docker Compose

Running the Application with Docker

From the project root:

docker compose up --build

This command will:

  1. Build the frontend image
  2. Build the backend image
  3. Start both containers
  4. Connect them through Docker networking

Available Services

Service URL
Frontend http://localhost:3000
Backend API http://localhost:8080
Swagger http://localhost:8080/swagger/index.html

To stop the containers:

docker compose down

Running Locally

Backend

cd backend

dotnet restore RpsslGameApi.sln

dotnet run --project RpsslGameApi.Application/RpsslGameApi.Application.csproj

API available at:

http://localhost:8080

Swagger:

http://localhost:8080/swagger/index.html

Frontend

Open a second terminal:

cd frontend

npm install

npm run dev

Application available at:

http://localhost:3000

Running Tests

Frontend

cd frontend

npm run test

Frontend Watch Mode

npx vitest

Frontend Test UI

npx vitest --ui

API Endpoints

Method Endpoint Description
GET /choices Returns all playable choices
GET /choice Returns a random computer choice
POST /play Plays a round against the computer
GET /scoreboard Returns game history
DELETE /scoreboard Deletes the last scoreboard entry

Game Rules

Rock Paper Scissors Spock Lizard extends the traditional game by adding two additional choices.

Choice Beats
Scissors Paper, Lizard
Rock Scissors, Lizard
Paper Rock, Spock
Lizard Spock, Paper
Spock Scissors, Rock

Reference:

http://www.samkass.com/theories/RPSSL.html

AI Usage

During development, I used AI tools to help with repetitive parts of the code, validate wording in documentation, and review the implementation for possible bugs or edge cases.

The generated suggestions were not used blindly: I reviewed and adjusted them to fit the project structure, requirements, and expected behavior.

Tools used

  • Claude Code
  • Codex (OpenAI)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages