Users — the module and its seams

Users — the module and its seams An architecture diagram generated by Archify. none · user.Deps{} is empty · Deps · other modules' contracts/ · Deps none user.Deps{} is empty Deps auth · Deps.Users · user.invited · consumers · consumer auth Deps.Users · user.invited consumer admin · native shell · screens.Mount per Resource · consumers · consumer admin · native shell screens.Mount per Resource consumer notification · Deps.Recipients → Get · consumers · consumer notification Deps.Recipients → Get consumer tenant · Deps.Invite → Provision · consumers · consumer tenant Deps.Invite → Provision consumer a client module · Deps.Users: user.Service · consumers · consumer a client module Deps.Users: user.Service consumer contracts/ · User · 7 events · 2 permissions · Service · modules/user contracts/ User · 7 events · 2 permissions · Service module.go · Module(Deps{}) · rest.Spec · Nav · modules/user module.go Module(Deps{}) · rest.Spec · Nav internal/ · Service · Invite · SetPassword · SetRoles · Deactivate · modules/user internal/ · Service Invite · SetPassword · SetRoles · Deactivate Spec.Mount · rest.Command · user/users · set-password · roles · deactivate · kit/ seams Spec.Mount · rest.Command user/users · set-password · roles · deactivate admin screens · admin: /admin/user/users · kit/ seams admin screens admin: /admin/user/users events · user.user.* · invited, password_set, roles_set, deactivated · kit/ seams events · user.user.* invited, password_set, roles_set, deactivated jobs · none · kit/ seams jobs none migrations/000007_user · users · FORCE RLS · 2 indexes · kit/ seams migrations/000007_user users · FORCE RLS · 2 indexes Spec · Events NewService Spec.Mount · RegisterRoutes crud over Tx[Tenant] events.Publish Jobs: nil Resource Deps{} api.Resources() modules/user kit/ seams Deps · other modules' contracts/ consumers Legend Frontend Backend Database Message bus

Promises

  • • user:read guards the list, the reads and the nav entry; user:manage the writes, the invitation and the commands
  • • user.user.* from the routes; user.invited from Invite and Provision; password_set, roles_set and deactivated from the commands

Needs

  • • Deps is empty: a user carries its tenant id, which row-level security matches on; configuration: none
  • • Immutable: status and roles — Deactivate and SetRoles own them, and the create route refuses roles too; a password is 12+ characters

Proof

  • • contracts/usertest: the fake and the real service pass one suite; module_test: one door per lifecycle change, no password in a body
  • • No browser journey of its own: make e2e signs in as the administrator the bootstrap provisioned