Content — the module and its seams

Content — the module and its seams An architecture diagram generated by Archify. none · content.Deps{} is empty · Deps · other modules' contracts/ · Deps none content.Deps{} is empty Deps admin · native shell · screens.Mount per Resource · consumers · consumer admin · native shell screens.Mount per Resource consumer contracts/ · Content · 6 events · 2 permissions · Service · modules/content contracts/ Content · 6 events · 2 permissions · Service module.go · Module(Deps{}) · rest.Spec · Nav · modules/content module.go Module(Deps{}) · rest.Spec · Nav internal/ · Render · Service: Publish · Unpublish · Archive · Public · modules/content internal/ · Render Service: Publish · Unpublish · Archive · Public Spec.Mount · rest.Command · contents · publish · unpublish · archive · kit/ seams Spec.Mount · rest.Command contents · publish · unpublish · archive admin screens · admin: /admin/content/contents · kit/ seams admin screens admin: /admin/content/contents events · content.content.* · published · unpublished · archived · kit/ seams events · content.content.* published · unpublished · archived jobs · none · kit/ seams jobs none migrations/000017_content · contents · FORCE RLS · 3 indexes · kit/ seams migrations/000017_content contents · FORCE RLS · 3 indexes Spec · Events NewService Spec.Mount · RegisterRoutes crud over Tx[Tenant] events.Publish Jobs: nil Resource Deps{} api.Resources() modules/content kit/ seams Deps · other modules' contracts/ consumers Legend Frontend Backend Database Message bus

Promises

  • • content:read: the list, the reads, the nav entry; content:manage: the writes and the three commands; the public read needs no session
  • • content.content.* from the routes; published, unpublished, archived from the commands, once each: a repeat says nothing

Needs

  • • Deps is empty: content carries its tenant id, which row-level security matches on; the author comes off the context; no configuration
  • • Immutable: status, publishedAt, author — two the commands own, one the create stamps; the body is Markdown, rendered on read

Proof

  • • contracts/contenttest: the fake and the real service pass one suite; module_test: a PATCH refuses the three fields, a draft is a 404
  • • No browser journey: e2e/admin-tasks.spec.ts exercises tasks only