HOCO B2B
Team tasksAnis

SRV-01 — Service catalogue — module boundaries, events & ownership (freeze)

Review and freeze the 24 server modules: responsibilities, data each owns, events each emits, jobs, and which apps consume them.

FieldDetails
Task codeSRV-01
PhaseP0 — Foundations (cadrage, UX/UI, architecture & contract)
Product scopeV1
StatusDone (Sun 18 Oct 2026)
StartSun 18 Oct 2026
DueSun 18 Oct 2026
ResponsibleAnis — Full-stack developer
Co-responsible—
Effort0.5 person-day(s) planned · 2 from scratch · size XS
Area · appServer · server
Depends onPRJ-02
UnblocksSRV-02
Milestones—

Summary

Review and freeze the 24 server modules: responsibilities, data each owns, events each emits, jobs, and which apps consume them.

Description

Step 1 of Anis's sequence (services → database → API contract): before any model or route exists, the 24 modules of the modular monolith (AUTHORING §3) are reviewed and frozen so that ownership of data, events and jobs is unambiguous (NFR-03, NFR-09). For each module the catalogue fixes its responsibility, the Prisma models it owns, the outbox events it emits and consumes, its BullMQ jobs and the apps that call it; cross-module access goes through services, never through another module's tables. The 17 Oct decisions are placed explicitly: AttributeDefinition/VariantAttributeValue in catalog, PriceChange and the three-price resolution in pricing, availability projection in inventory, returns (ReturnRequest, ReturnItem) in orders, CreditNote in billing, AFTER_SALES tickets and SupportRegion in support, the reseller SSE stream in notifications. Out of scope: field-level schema (SRV-02) and request/response shapes (SRV-03). SRV-02 and SRV-03 are derived directly from this freeze.

Note

Step 1 of Anis's sequence: services → database → API contract.

Subtasks

#SubtaskOwner
1Responsibility statement and owned entities for each of the 24 modules (identity … integrations), using the canonical model namesAnis
2Place the new V1 entities: AttributeDefinition/VariantAttributeValue (catalog), SupportRegion/SupportRegionWilaya (support), ReturnRequest/ReturnItem (orders), CreditNote (billing)Anis
3Outbox event catalogue with producer, payload outline and consumers (order.submitted/validated/refused/modified/status_changed/cancelled, return., ticket., stock.alert, visit.checked_in, tour.*)Anis
4Jobs catalogue with schedule and owner (orders.expireAssisted, promotions.applySchedule, support.autoClose, stock alerts, analytics daily aggregates, idempotency and location-ping purges)Anis
5Endpoint group → module mapping for every group in endpoints.json, including events.stream and admin.events.streamAnis
6Inter-module dependency rules (allowed service calls, no cyclic imports) enforced by a lint rule on apps/server/src/modulesAnis
7Consumer review of the module → app matrix for the reseller and delegate appsImad
8Freeze: catalogue page marked v1, change process for later edits (ADR in docs)Anis

Deliverables

  • apps/docs/content/docs/srs/service-catalogue.mdx frozen as v1
  • apps/docs/content/docs/srs/jobs-and-scheduler.mdx with every job, schedule and owner
  • Folder skeleton apps/server/src/modules/<module>/ for the 24 modules with an index exporting the service interface
  • ADR recording the module boundaries and the outbox pattern

Acceptance criteria

  • Every canonical entity of AUTHORING §3 is owned by exactly one module
  • Every endpoint group of endpoints.json maps to one owning module
  • Every outbox event has a producer, at least one consumer and a payload outline
  • Returns, credit notes, after-sales claims, attributes and support regions have an owning module
  • Imad has reviewed and accepted the module → app matrix

Requirements covered

RequirementTitleRelease
NFR-03Scalability for more resellers, products, orders and zonesV1
NFR-09Maintainability: automated tests, CI gates, typed contracts, documentationV1

Test measures

  • Script check: entity list in the catalogue equals the model list planned for SRV-02
  • Dependency lint (no cross-module repository imports) passes on the skeleton

Risks

  • Boundaries drift once coding starts — changes go through an ADR and a catalogue update in the same PR

KPI

  • Delivered by Sun 18 Oct 2026 within 0.5 person-day(s).
  • Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
  • Zero open critical defects, permission gaps or data-integrity regressions at sign-off.

Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.

On this page