This document defines the first service-layer boundaries for the TKB Strategies monorepo.
The intent is to create a safe bridge from static apps and legacy WordPress delivery toward a tenant-aware SaaS platform.
The repository already has:
- app lanes under
apps/ - reusable logic under
packages/ - legacy bridges under
legacy/
The next architectural need is a documented service layer so future backend work does not grow ad hoc inside frontend apps or legacy WordPress code.
The service layer is still contract-first. There is no committed implementation code yet. This is intentional.
The right sequence is:
- define domain boundaries
- define request and authorization assumptions
- reuse logic from
packages/ - implement only after the contracts are clear
Primary application-facing API layer.
Owns:
- tenant-scoped HTTP interfaces
- workflow and assessment operations
- export request orchestration
- integration with auth context
Identity and tenancy boundary layer.
Owns:
- actor identity
- tenant membership
- role enforcement vocabulary
- downstream request auth context
Reserved for asynchronous work.
Expected future uses:
- export generation
- notifications
- scheduled reminders
- reconciliation tasks
Reserved for inbound and outbound event surfaces.
Expected future uses:
- external platform notifications
- intake/event ingestion
- publishing triggers
- service code should consume business rules from
packages/, not redefine them - tenant boundaries must be explicit in request context
- WordPress is not the persistence or identity model for the future platform
- apps should degrade gracefully while backend services are still emerging
The next safe backend move after these service docs is to define a minimal request/response contract for:
- tenant config retrieval
- assessment definition retrieval
- export request submission
Those should be added only after the service boundaries here are accepted.
Initial contract documents now exist at:
Matching auth contract documents now exist at: