This is a bundled suite of applications which you can run with Docker:
- An authentication server, using Gin
- A PostgreSQL database with a
users
table by default - A pre-loaded Hasura DDN project which can be run locally
- A starter CLI application, using Bubble Tea
- Docker
- The Hasura DDN CLI
Clone the repo:
git clone https://github.com/robertjdominguez/ddn-gopher
Move into the repository:
cd ddn-gopher
Then, create a new .env
file with a JWT secret key:
touch ./auth-server/.env && echo "JWT_SECRET=somethingSuperSecureGoesHere!" > ./auth-server/.env
Replace the value
for the JWT key in hasura/supergraph_globals/auth-config.hml
With whatever value you used above, replace 3q2+7w==iQ==
in this โ๏ธ file:
kind: AuthConfig
version: v1
definition:
mode:
jwt:
audience: null
issuer: null
allowedSkew: null
claimsConfig:
namespace:
claimsFormat: Json
location: /https:~1~1hasura.io~1jwt~1claims
tokenLocation:
type: BearerAuthorization
key:
fixed:
algorithm: HS256
key:
value: <your-new-value-here>
From the root of the project, run:
HASURA_DDN_PAT=$(ddn auth print-pat) docker compose up -d