Admin — the module and its seams

Admin — the module and its seams An architecture diagram generated by Archify. auth · Deps.Authorize: httpx.Authorizer · Deps · tenant's contracts/, httpx.Authorizer, design.Pair · Deps auth Deps.Authorize: httpx.Authorizer Deps tenant · Deps.Tenants: tenantcontracts.Service · Deps · tenant's contracts/, httpx.Authorizer, design.Pair · Deps tenant Deps.Tenants: tenantcontracts.Service Deps design · Deps.Theme: design.Pair · Deps · tenant's contracts/, httpx.Authorizer, design.Pair · Deps design Deps.Theme: design.Pair Deps native shell · GET /api/v1/admin/resources · consumers · consumer native shell GET /api/v1/admin/resources consumer every rest.Spec · one httpx.Resource each · consumers · consumer every rest.Spec one httpx.Resource each consumer contracts/ · none · no entity, events or permissions · modules/admin contracts/ none · no entity, events or permissions module.go · Module(Deps{…}) · Routes: internal.Mount · modules/admin module.go Module(Deps{…}) · Routes: internal.Mount internal/ · Mount · frame · pages.mount · mountCatalog · modules/admin internal/ Mount · frame · pages.mount · mountCatalog page.Serve · httpx.Register · /admin +4 pages · GET /api/v1/admin/resources · kit/ seams page.Serve · httpx.Register /admin +4 pages · GET /api/v1/admin/resources admin screens · 7 screens per api.Resources() · kit/ seams admin screens 7 screens per api.Resources() events · none · Events: nil — the shell owns no data · kit/ seams events none · Events: nil — the shell owns no data jobs · none · Jobs: nil · kit/ seams jobs none · Jobs: nil no migrations · none · no Migrations, no table · kit/ seams no migrations none · no Migrations, no table none internal.Mount Routes: pages.mount · mountCatalog none · counts via r.List none published none Shell Deps.Tenants Deps.Authorize Deps.Theme screens.Describe as JSON screens.Mount per Resource modules/admin kit/ seams Deps · tenant's contracts/, httpx.Authorizer, design.Pair consumers Legend Frontend Backend Database Message bus

Promises

  • • No permission of its own: screens carry their resource's Read and WriteAuth, pages httpx.SignedIn(), the switcher tenant:manage
  • • No events, no nav entry: the shell owns no data; catalog and dashboard omit what the caller may not read

Needs

  • • Deps.Modules for Nav; Authorize is auth's Auth in main; Tenants is tenantcontracts.Service; a zero Theme is design.Default()
  • • Composed last: Routes reads api.Resources(), so a later module gets no screen; the switcher takes api.SystemToken()

Proof

  • • module_test.go behind the real kernel: screens from struct tags; sidebar and dashboard hide the unreadable; the catalog as JSON
  • • e2e/admin-tasks.spec.ts: sign in at /admin/login, the dashboard, the gallery, no theme stored until chosen; the switcher has no test