Technical Debt — Tenant Master Gaps
By Engineering Team•October 9, 2026•4 min read
| Metadata | Details |
|---|---|
| System | tenant-service — Tenant Master |
| Document ID | TD-2026-TEN-001 |
| Author | Engineering Team |
| Status | Tracked |
TD-01 — Server-side validation does not fully mirror the admin UI’s client-side rules
- Status: Open
- Severity: Medium
- Affected component:
service/tenantcontact/,service/tenantaddress/,service/tenanttheme/(Go) — theirdomain/*_validation.gofiles - Evidence:
supportPhoneTollFree(Contact),registeredCompanyName/city/state(Address), and eight of the Theme section’s fourteen fields (accentColor,surfaceColor,cardBgColor,saleBadgeColor,cardCornerRadius,cardBorderWidth,cardElevation,contentDensity) are required/format-checked only in the admin UI’s form controllers, with no matchingValidate()check server-side. - Impact: A direct API call (bypassing the admin form) can persist a blank or malformed value for any of these fields; a downstream consumer reading
tenant-infocannot assume any of them are well-formed. - Remediation direction: Add the missing checks to each section’s
domain/*_validation.go, mirroring the admin UI’s own rules field-for-field. - Related requirement: SR-025 — Validation Parity
TD-02 — Wizard step-indicator is clickable, deviating from the documented non-interactive convention
- Status: Open
- Severity: Low
- Affected component:
TenantConfigPage.tsx(admin UI) - Evidence: The step-indicator circles are wired to a step-jump handler, letting an admin skip directly to any step; the admin app’s own documented wizard convention treats step indicators as progress-only, non-interactive.
- Impact: An admin can jump to a later step before an earlier one has ever been saved, which is harmless today only because every step independently loads/saves and tolerates a 404 “not configured yet” — but it is an undocumented deviation that could surprise a future wizard built to the documented convention.
- Remediation direction: Either make the step indicator non-interactive (matching convention) or formally document this wizard’s step-jump behavior as an intentional, convention-deviating exception.
- Related requirement: SR-025 — Wizard Step-Indicator Navigation
TD-03 — TenantRepository.ts has no DEV_MOCK_* fallback
- Status: Open
- Severity: Low
- Affected component:
TenantRepository.ts(admin UI) - Evidence: Unlike other recently-added
ui-admin-applicationfeatures, this repository has noDEV_MOCK_*-gated local fallback for offline/no-backend development. - Impact: A frontend developer cannot exercise the Tenant Master wizard without a running
tenant-serviceinstance. - Remediation direction: Add the standard
DEV_MOCK_*fallback pattern, consistent with sibling features — or explicitly document why this feature is exempt, per [[feedback_no_dev_mock_when_backend_ready]] if the real endpoints are already considered stable enough to skip mocking. - Related requirement: SR-025 — Client-Side DEV_MOCK Fallback
TD-04 — COLLECTION_BY_STEP label mismatch (cosmetic)
- Status: Open
- Severity: Low
- Affected component:
TenantConfigController.ts(admin UI) - Evidence: The internal
COLLECTION_BY_STEPlookup table’s labels do not consistently match the actual PostgreSQL table names (tenant_configs/tenant_contacts/tenant_addresses/tenant_theme_styles/tenant_policies) they’re meant to describe. - Impact: Cosmetic only — purely an internal naming inconsistency with no effect on behavior, but a source of confusion for anyone tracing a step back to its backing table.
- Remediation direction: Rename the lookup table’s entries to match the real table names exactly.
- Related requirement: SR-025
TD-05 — Async logo-update completion event has no retry or admin-visible failure state
- Status: Open
- Severity: Medium
- Affected component:
message_receiver/tenantlogo_receiver.go(Go),TenantConfigController.ts(admin UI) - Evidence:
ITenantLogoUpdateEventService.HandleImageProcessedconsumescontent-processor’s completion event and writesappLogoUrlonce; there is no retry if this consumer fails, and the admin UI has no polling or notification path to tell the admin the logo was never actually applied. - Impact: An admin can crop/upload a logo, see it appear to succeed in the preview, and move on — while the real
appLogoUrlsilently never updates if the completion event is lost or the handler errors. - Remediation direction: Add a dead-letter/retry policy on the Pub/Sub subscription, and have the admin UI poll or re-fetch
appLogoUrlafter upload to confirm the pipeline actually completed. - Related requirement: Architecture — Flow (B)
TD-06 — No admin-facing tenant-creation/provisioning capability exists anywhere
- Status: Open
- Severity: Medium
- Affected component:
tenant-service(Go — transport/API, gRPC, and repository layers),ui-admin-application’ssrc/features/tenant/ - Evidence: The Tenant Master wizard (
TenantConfigPage.tsx) only ever operates on an already-existing tenant — its first step callsGET /admin/api/v1/tenantto read a tenant code that must already be assigned.tenant-servicehas noPOST /admin/api/v1/tenant(or gRPC equivalent) to create a new tenant row, and its repository layer exposes onlyGetTenantByTenantID, never an insert/create path.ui-admin-applicationhas no tenants-list page, no “create tenant” form, and no onboarding flow anywhere in the app. The only place a new tenant is actually provisioned today isdevelopment/helper-util-scripts/tenant/seed-tenant.js, which inserts directly into"tenant-service".tenants(plus its config/theme/contact/address/policy rows) via raw SQL against the database — bypassing every service layer entirely.tenant-service’s ownCLAUDE.mddocuments the 3-letter tenant code as “manually assigned at provisioning time… there is no admin ‘create tenant’ flow yet,” confirming this is a known, acknowledged gap rather than an oversight. - Impact: Onboarding a new tenant is not self-service for the Shoppee platform/administration team today — it requires someone with direct database access to run a dev script, with no audit trail, no validation beyond what the script itself checks, and no way for a non-engineer on the administration team to onboard a tenant independently. The Tenant Master wizard documented in this doc set (
07-ui-admin/tenant-master/) is exclusively a configure-an-existing-tenant flow — it must not be read as covering tenant onboarding. - Remediation direction: Build a genuine tenant-provisioning capability — a
POSTtenant-creation endpoint intenant-service(assigning the 3-letter code server-side rather than manually) plus a corresponding admin UI, most naturally as a platform-level “Shoppee Administration” surface distinct from a single tenant’s own Tenant Master config wizard, since creating a tenant is a platform-admin operation, not something a tenant’s own store admin should be able to do for itself. - Related requirement: BRD-024, SR-025 FR-03 – FR-04 — both describe configuring an existing tenant’s identity only