Status: design + bootstrap skeleton (alpha).
Goal: Generate an opinionated, production-grade GraphQL backend that fully supports the Relay Server Spec (globalNodeIDs + cursor-based connections) on top of a schema-as-code ORM with code generation—built for PostgreSQL viajackc/pgxv5 and secured by OIDC (default mapping for Keycloak).
- DX & AI-friendly: one-command scaffolds, rich comments, consistent conventions, and LLM-ready docs & prompts.
- Relay-complete:
Nodeinterface, global ObjectID, connections/edges,PageInfo, opaque cursors. - ORM: ent-like schema-as-code: fields, edges, indexes, views, mixins, annotations; hooks, interceptors, privacy policies, transactions, predicates, eager loading, traversal, pagination, ordering, aggregations, and migrations.
- PostgreSQL first-class: batteries-included support for extensions: PostGIS, pgvector, TimescaleDB.
- IDs: UUID v7 by default at the ORM layer (generated app-side).
- CLI:
ermprovidesinit,new,gen, andgraphql initworkflows.
See: PRD, Roadmap, Agents, Orchestrator.
Download the latest binary from the GitHub Releases page and place it on your PATH,
or use go install github.com/deicod/erm/cmd/erm@latest if you're iterating on the source.
mkdir myproj && cd myproj
go mod init github.com/yourname/myproj
go mod tidy
# Assuming 'erm' binary is on PATH, else: go run ./cmd/erm
erm init
erm new User
erm gen
erm graphql initGenerated app uses:
- gqlgen for GraphQL. Autobind is disabled by default; opt in with
erm graphql init --autobind(or manually add theautobindblock tographql/gqlgen.yml) once your project has the supporting Node helpers and enum wrappers in place. - OIDC middleware (pluggable claims mapping; default Keycloak).
- pgx/v5 pools + migrations.
To keep custom business logic safe across regenerations, follow the patterns in Customizing generated code safely.
MIT © 2025 deicod / contributors