In order for you to contribute to the project by helping to develop this project is that you have to know how to run the project first, so here are the how-to's for that
first you need to install several things to tun the project:
- Hasura CLI (to manage the database, and run the hasura console if you want direct interaction with the graphql endpoint)
- Yarn (to install and build the webservice stuff)
- Docker Engine and Docker Compose (to run and containerize the project)
And to run the project, all you need to type is
make serve
in the root directory
To open up the hasura console, type
hasura console
in the database directory (and it will automatically open up the console in your default browser)
After successfully running the project, you will be able to access the frontend website of this project in http://localhost:5000
Oh, and one more thing, to create the database structure, run this comand
make migrate
in the root directory
So all in all what you need to run to get all the services running are:
make serve && \
make migrate && \
cd database && hasura console
To install Yarn, go to https://yarnpkg.com/getting-started/install
To install Hasura CLI, go to https://hasura.io/docs/latest/graphql/core/hasura-cli/install-hasura-cli/
To install docker engine and docker compose, go to https://docs.docker.com/engine/install/ and https://docs.docker.com/compose/install/
if you got an error in which the hasura container cant access the postgres container, or you cant even access the postgres container itself, then chances are you have changed the postgres container password in the docker-compose.yaml file, in that case go ahead and run
make remove_volume
and then you can try to rebuild the project all over again by running
make serve && make migrate
Please note that running the project is differrent when you are developing the webservice and game
For the webservice part, you have to go into that directory first and run
yarn dev
to run the development mode of the webservice, this would probably change in the future as we already planned to build docker-compose for development purpose, but that is something to be handled in the future