Tasks — the module and its seams

Tasks — the module and its seams An architecture diagram generated by Archify. tenant · Deps.Tenants: jobs.TenantLister · Deps · other modules' contracts/ · Deps tenant Deps.Tenants: jobs.TenantLister Deps admin · native shell · screens.Mount per Resource · consumers · consumer admin · native shell screens.Mount per Resource consumer contracts/ · Task · 6 events · 2 permissions · Service · modules/task contracts/ Task · 6 events · 2 permissions · Service module.go · Module(Deps{Tenants, SweepEvery}) · rest.Spec · modules/task module.go Module(Deps{Tenants, SweepEvery}) · rest.Spec internal/ · Service: Assign · Resolve · CheckSLA · SLASweep · modules/task internal/ Service: Assign · Resolve · CheckSLA · SLASweep Spec.Mount · rest.Command · /api/v1/task/tasks · assign · resolve · check-sla · kit/ seams Spec.Mount · rest.Command /api/v1/task/tasks · assign · resolve · check-sla admin screens · admin: /admin/task/tasks · kit/ seams admin screens admin: /admin/task/tasks events · task.task.* · assigned · resolved · sla_breached · kit/ seams events task.task.* · assigned · resolved · sla_breached jobs · SLASweep · every minute · kit/ seams jobs SLASweep · every minute migrations/000004_task · tasks · FORCE RLS · indexes · kit/ seams migrations/000004_task tasks · FORCE RLS · indexes Spec · Events NewService Spec.Mount · RegisterRoutes crud over Tx[Tenant] events.Publish SLASweep Resource Deps api.Resources() modules/task kit/ seams Deps · other modules' contracts/ consumers Legend Frontend Backend Database Message bus

Promises

  • • task:read guards the list and the reads; task:update the writes and the three commands
  • • task.task.created/updated/deleted from the routes; task.assigned, task.resolved and task.sla_breached from the commands and the sweep

Needs

  • • Deps.Tenants is jobs.TenantLister, the tenant module's Active lister in main; SweepEvery zero means a minute
  • • Handlers only call the Service; Immutable: assigneeId, slaBreached, resolvedAt, resolution — each has a command instead of a PATCH

Proof

  • • contracts/tasktest: the fake and the real service pass one conformance suite
  • • e2e/admin-tasks.spec.ts creates a task through the generated form and finds it in the list