This project is a simple implementation of the popular board game Monopoly. It includes a web client that allows players to play the game online.
- Node.js (v22 or later)
- dotnet core (v8 or later)
It is highly recommended to use Docker/Podman. Since this simplifies deployment and is configured to run in https by default.
-
Clone the repository:
git clone https://github.com/NydusBorn/PolyMonopoly.git
-
Navigate to the project directory:
cd PolyMonopoly
-
Change network parameters (optional):
The project is configured to run on localhost by default, and thus cannot be used for hosting a public instance. Change BACKEND_HOST in environment in compose.yaml to a full root of a host, examples include:
- https://127.0.0.1:8000 (instance for you only)
- https://localhost:8000 (instance for you only)
- https://192.168.0.1:8000 (instance for you only)
- https://1.2.3.4:8000 (would be your public instance, if your public ip is 1.2.3.4)
- https://your.website.com:8000 (your public instance)
This is used only for telling the web clients where to connect to. Port 8000 is the default backend port, if you want to change it, change host port in ports of caddy-proxy service in compose.yaml, look for one that targets 8000
Web client port can be changed similarly. You need to change host port in ports of caddy-proxy service in compose.yaml, look for one that targets 3000
-
Start the docker containers:
docker compose --profile $$ up -d
Where $$ is any of backend, frontend, full
-
Open host firewall ports (required if this is a public instance):
- Web client: 3000 by default
- Backend: 8000 by default
- Clone the repository:
git clone https://github.com/NydusBorn/PolyMonopoly.git
- Navigate to the project directory:
cd PolyMonopoly
- Navigate to the web client directory:
cd web-client
- Install dependencies:
npm install
- Running the Web Client:
- Make sure that BACKEND_HOST is set in your environment. (it is set by direnv within the repository)
- Start the development server:
npm run dev
- Open your browser and navigate to http://localhost:3000.
- Navigate to the backend directory:
cd asp-backend
- Run the project:
dotnet run
- Navigate to the e2e directory:
cd e2e-tests
- Run tests:
npx playwright test
If you have just runner installed, then you can use just {recipe-name} to run any of the recipes specified in justfile.
More human friendly list of recipes can be achieved via
just --list
Before running any recipes, ensure there are no dependencies missing in any of the subprojects you are planning to run.
This project is licensed under the MIT License.