- local docker
- Run
yarn
to download project dependencies. cp .env.example .env
and fill in details.- Execute the SQL in
bootstrap/
as superuser, first in thepostgres
database and then in thegbh
database (or whatever you choose to call it). - Make sure your connection string points to the database you just created, then run
pgsh up
to migrate to the latest version. - Run
pgsh psql < seed.sql
to seed the database with some dishes you can order. yarn start
to begin the server, which hosts the following:- the auth webhook
- the auth remote schema
- the cart remote schema
- event webhooks
docker-compose up
to start the Hasura appliance, which will communicate with our running. You can also view docker-compose.yaml to see what we're passing to the container.- Open the Hasura console by navigating to http://localhost:8080 (by default) and enter in the
HASURA_SECRET
from your.env
file as the password. - Navigate to settings (the cog in the top-right of the screen), click Import Metadata, and select the metadata JSON file in this repository. Hasura annotates relationships separately in its own schema;
metadata.json
is a dump of these annotations. - Clone
https://github.com/sastraxi/great-bear-frontend
and follow its setup instructions. Put the following in its.env
:REACT_APP_GRAPHQL_VARIANT=hasura REACT_APP_GRAPHQL_URL=http://localhost:8080/v1/graphql # by default REACT_APP_SUBSCRIPTION_URL=ws://localhost:8080/v1/graphql # by default
- Run the frontend with
yarn start
as well. - Navigate to http://localhost:3000 (by default).
- Add error handling
- Add some testing