Issue Summary
Create the infra/hasura/ directory structure inside dApp-SafeTrust and
add the root Hasura configuration files. This is the infrastructure container
that all subsequent migration and metadata issues will populate. No migrations
are added in this issue — only the scaffold and Hasura project config.
Type of Issue
Depends on
None — can run in parallel with all frontend issues.
Files to create
infra/
└── hasura/
├── config.yaml ← Hasura CLI project config
├── .env.example ← infra-specific env vars
└── migrations/
└── safetrust/
└── .gitkeep ← placeholder, removed when first migration added
└── metadata/
├── base/
│ └── .gitkeep
└── tenants/
└── safetrust/
└── .gitkeep
└── seeds/
└── safetrust/
└── .gitkeep
infra/hasura/config.yaml
version: 3
endpoint: http://localhost:8080
admin_secret: myadminsecretkey
metadata_directory: metadata
actions:
kind: synchronous
handler_webhook_baseurl: http://localhost:3000
infra/hasura/.env.example
# Hasura
HASURA_GRAPHQL_ENDPOINT=http://localhost:8080
HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey
# Database
PG_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/postgres
# JWT (Firebase)
HASURA_GRAPHQL_JWT_SECRET='{"type":"RS256","jwk_url":"https://www.googleapis.com/service_accounts/v1/jwk/securetoken@system.gserviceaccount.com","audience":"safetrust-890d0","issuer":"https://securetoken.google.com/safetrust-890d0"}'
Update docker-compose.yml
Verify the hasura service in the root docker-compose.yml mounts the
correct migration path. Add if missing:
hasura:
volumes:
- ./infra/hasura/migrations:/hasura-migrations
- ./infra/hasura/metadata:/hasura-metadata
environment:
HASURA_GRAPHQL_MIGRATIONS_DIR: /hasura-migrations
HASURA_GRAPHQL_METADATA_DIR: /hasura-metadata
Acceptance Criteria
References
Issue Summary
Create the
infra/hasura/directory structure insidedApp-SafeTrustandadd the root Hasura configuration files. This is the infrastructure container
that all subsequent migration and metadata issues will populate. No migrations
are added in this issue — only the scaffold and Hasura project config.
Type of Issue
Depends on
None — can run in parallel with all frontend issues.
Files to create
infra/hasura/config.yamlinfra/hasura/.env.exampleUpdate
docker-compose.ymlVerify the
hasuraservice in the rootdocker-compose.ymlmounts thecorrect migration path. Add if missing:
Acceptance Criteria
infra/hasura/directory exists with the full subfolder structureinfra/hasura/config.yamlexists with correct endpoint and versioninfra/hasura/.env.exampledocuments all required infra env varsdocker-compose.ymlhasura service mountsinfra/hasura/migrationsand
infra/hasura/metadatacorrectlydocker compose up hasurastarts without volume mount errorsmigrations/safetrust/,metadata/base/,metadata/tenants/safetrust/,seeds/safetrust/directories all existReferences