schnoz is an online puzzle game where two players place units to score points.
server
: a Nest.js appweb
: a Next.js appcoordinate-utils
: util function to interact with coordinates as used in the gamegame-logic
: contains game logic such as game modes, placement rules and moretypes
: all shared types, i.e. database typeseslint-config-custom
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
)tsconfig
:tsconfig.json
s used throughout the monorepo
To spin up a database for development spin up a docker container.
Before serving the database, make sure you have the correct environment variables set in your .env
. Use the contents of packages/database/.env.local
into packages/database/.env
or use the command:
cp packages/database/.env.local packages/database/.env
yarn start:db
To develop all apps and packages, run the following command:
yarn dev
To run a dockerized version of schnoz you can spawn server
, web
and database
containers using docker-compose
.
First, create an .env
file in the database
package with the connection string for the database. Depending on your environment, different values should be used:
Use the contents of packages/database/.env.docker.local
into packages/database/.env
or use the command:
cp packages/database/.env.docker.local packages/database/.env
TBD
TBD
TBD
A docker network is required for the containers to communicate. Create one, if you did not already:
docker network create app_network
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml up -d