SSP is a full-stack web application where users can play Scissors, Stone, Paper either against the machine or in real-time multiplayer mode using WebSockets. Users also have access to a personalized statistics page to track their performance and habits.
- 🎮 Singleplayer mode against the computer.
- 🧑🤝🧑 Multiplayer mode using WebSockets.
- 📊 User statistics page:
- Total games played
- Games won
- Win/loss ratio
- Most frequently chosen option (scissors, stone, or paper)
- Angular 20
- PrimeNG
- Spring Boot 3.5
- Java 21
- PostgreSQL 15
- Docker & Docker Compose
- Ngrok (for external access to multiplayer)
[ Angular (Frontend) ] <---> [ Spring Boot (Backend) ] <---> [ PostgreSQL (DB) ]
-
Docker
-
Docker Compose
-
Ngrok (optional for multiplayer)
git clone https://github.com/purquijo/ssp.git
cd sspngrok http 80Use the Ngrok URL to allow external players to connect to your multiplayer game. Change the app.cors.allowed-origins prop to the url provided by ngrok.
docker-compose up --buildThis project uses a .env file to securely manage environment variables such as database credentials. These values are automatically loaded by Docker Compose when the services are started.
-
Keeps sensitive information (like passwords) out of the codebase.
-
Makes the app easier to configure in different environments (local, staging, production).
-
Improves security and maintainability.
Copy the example environment file:
cp .env.example .envOpen .env and fill in your configuration:
POSTGRES_USER=postgres
POSTGRES_PASSWORD=your-secure-password
POSTGRES_DB=gamesdb
ssp/
├── docker-compose.yml
├── .env
├── ssp-frontend/ # Angular 20 + PrimeNG
└── ssp-backend/ # Spring Boot 3.5 + Java 21
This project is licensed under the MIT License.