This workspace was bootstrapped with 'erm init'. The goal of the generated skeleton is to give you a runnable HTTP service, a place to define your schema, and a repeatable workflow for regenerating code as your domain evolves.
- Initialize your Go module and align 'erm.yaml': go mod init go mod tidy Update 'module' in 'erm.yaml' to match the value passed to 'go mod init'.
- Sketch your first entity with 'erm new ' and keep 'docs/dsl-quick-reference.md' nearby for helper lookups.
- Run 'erm gen --dry-run --diff' to preview migrations, then rerun 'erm gen' to materialize ORM, GraphQL, and migration artifacts.
- Start the HTTP server with 'go run ./cmd/api' and iterate.
- 'cmd/api' — entrypoint for the HTTP server and integration glue.
- 'schema' — your application schema. Run 'erm gen' whenever it changes.
- 'graphql' — gqlgen configuration and generated resolvers.
- 'migrations' — versioned SQL migrations managed by 'erm gen'.
- Practice TDD: write or update tests alongside feature work.
- Keep the code formatted with 'gofmt -w' on edited files.
- Validate changes locally:
- 'go test ./...'
- 'go test -race ./...'
- 'go vet ./...'
- Use 'erm gen --dry-run --diff' to preview schema changes, then rerun without flags to write files. Add '--force' after dependency upgrades to refresh generated packages.
- Use 'erm migrate' to apply database changes during development.
- Reference 'docs/dsl-quick-reference.md' for field, edge, and index combinations when modeling your schema.
Happy hacking!