Monorepo built with nx
- Copy env file
cp apps/frontend/.env.example ./apps/frontend/.env.local
- Install dependencies with pnpm.
pnpm
- Run frontend app locally.
pnpm dev
- Open the app in your browser at https://localhost:4200
build all packages
pnpm nx run-many --target=build --all
remove a project
npx nx generate @nx/workspace:remove --projectName=<your project name>
generate a new next.js app
npx nx generate @nx/next:application <your application name>
generate a new react library
npx nx generate @nx/react:library <your component name>
- Docker
- Docker Compose
- Copy the
.env.example
file to.env
and fill in the required credentials. a. the defaults should work for fresh local development b. by default the instance is unsecured and has no permissions or admin secret - Run
docker-compose up -d
to start the Hasura server.
This will start the Hasura server on port 8080. Connect the frontend above by using the associated variables.
NEXT_PUBLIC_API_URL='http://localhost:8080/v1/graphql'
HASURA_GRAPHQL_ADMIN_SECRET=
If you want to run a secure instance of Hasura, you can enable the secret, unauthorized role, and JWT authentication. Within the graphql-engine
service enable these variables:
HASURA_GRAPHQL_UNAUTHORIZED_ROLE;
HASURA_GRAPHQL_ADMIN_SECRET;
HASURA_GRAPHQL_JWT_SECRET;
Also enable the HASURA_GRAPHQL_ADMIN_SECRET
variable in the hasura-setup
service, in case migrations need to be run.