idleverse
idleverse copied to clipboard
A sci-fi idle/MMO mashup!
Idleverse Monorepo
Prerequisites:
- docker
- docker compose
- nvm (and run
nvm useat the root) - yarn
- nx:
yarn global add nx(after which runningnx --versionshould return >15.7.x)
Once done with prereqs, run a yarn at the root to bootstrap your environment.
After all of this, talk to one of the code owners about setting up your .env files. Various secrets are required to develop the application against our various cloud services. You will need a .env at the root.
Running against production
nx serve idleverse-web will serve the client against prod.
Running locally using Docker
Ensure you have created a .env at the root with the following variables (talk to a code owner for values):
COMPOSE_PROJECT_NAME=idleverse
SECURE_HASURA=secure
AUTH0_DOMAIN=dev-uyer-vun.us.auth0.com
REMOTE_SCHEMA_URI=host.docker.internal
AUTH0_CLIENT_ID=<talk_to_owners>
AUTH0_MANAGEMENT_API_CLIENT_ID=<talk_to_owners>
AUTH0_MANAGEMENT_API_CLIENT_SECRET=<talk_to_owners>
Now:
yarn prepare-watchwill build the game server and install deps (only need to run once)yarn docker-upwill build and bring up theidleversestack. This includes everything except the client. For example the game-server will now be available on http://localhost:4000/graphql.yarn hasurawill apply all the Hasura metadata & migrations
Now you can decide what you want to work on:
| App | Command | Result |
|---|---|---|
| Client | nx serve idleverse-web -c docker |
Serves at http://localhost:3000 |
| Game Server | nx run idleverse-game-server:watch |
Watches idleverse-game-server container for code changes in apps/game-server/src. |
| Hasura | yarn console |
Runs the Hasura console at http://localhost:9695/ |