@andreabiagini5/applicazioni-e-servizi-web-project
Version:
Project for Applicazioni e Servizi Web.
100 lines (68 loc) • 3.44 kB
Markdown
# SandPiles
_Place your grains. Tip the balance. In this world of unstable equilibrium, every move can trigger a chain reaction. Conquer the board one avalanche at a time._
[](https://sonarcloud.io/summary/new_code?id=AndreaB2000_ASW-project)
[](https://sonarcloud.io/summary/new_code?id=AndreaB2000_ASW-project)
[](https://sonarcloud.io/summary/new_code?id=AndreaB2000_ASW-project)
[](https://sonarcloud.io/summary/new_code?id=AndreaB2000_ASW-project)
[](https://sonarcloud.io/summary/new_code?id=AndreaB2000_ASW-project)
[](https://sonarcloud.io/summary/new_code?id=AndreaB2000_ASW-project)
An online multiplayer turn-based strategy game based on the mathematical **[Abelian sandpile model](https://en.wikipedia.org/wiki/Abelian_sandpile_model)**, developed for "Applicazioni e Servizi Web" and "Software Process Engineering" exams at UniBo's Computer Science Master Degree courses.
## Table of Contents
- [Documentation](#-documentation)
- [Features](#-features)
- [Tech Stack](#-tech-stack)
- [Installation](#-installation)
- [Running the System](#-running-the-system)
- [Development](#-development)
- [License](#-license)
## Documentation
Full technical documentation and academic report available here: [Report](./docs/report.md)
## Features
- Competitive matches
- Matches against bot
- Login to save your progress
- Leaderboard to check your skill level
## Tech Stack
**Frontend**
- Vue.js + TypeScript
- SCSS
- MDBootstrap
**Backend**
- Node.js + Express
- Socket.IO
- MongoDB
- Prolog bot
**DevOps**
- Build automation with npm scripts
- Docker containerization
- SonarCloud
- GitHub Actions CI/CD
## Installation
1. **Prerequisites**:
- Node.js v20+
- Docker (for production)
1. Install dependencies:
```bash
npm install
```
1. Configure environment:
- Create a `.env` file in the root directory containing: DB_NAME, DB_APP_USERNAME, DB_APP_PASSWORD, DB_ADMIN_USERNAME, DB_ADMIN_PASSWORD, JWT_SECRET, JWT_EXPIRATION.
## Running system
The system can be executed locally, using the following commands:
```sh
npm run build && npm start
```
and the client can be accessed from `http://localhost:4173`.
To run the system in Docker, you first need to create a valid certificate and key pair using the following commands:
```sh
openssl req -x509 -newkey rsa:2048 -keyout certs/key.pem -out certs/cert.pem -days 365 -nodes -subj "/CN=sandpiles.com"
```
Then build and start by running the following commands:
```sh
npm run build:docker && npm run start:docker
```
and accessing the client using `https://172.0.0.11`.
## Contributing
See [CONTRIBUTING](./CONTRIBUTING.md) for details on how to contribute to this project.
## License
MIT Licensed - See [LICENSE](./LICENSE) for details.