Files
marketplaces/docs/backend/PHASE-10-CONTENT-MODULES-CONTRACT.md
sdarbinyan ec6760ac65 docs: backend contracts for Phases 8-10 (identity/messaging, tenant registry, content modules)
- Phase 8: Customer/ExternalIdentity/ContactChannel, VK ID OAuth 2.1/PKCE
  built first per Sprint 0.1 ("do all after vk"), then OTP, then MAX/
  Telegram bot linking, then the Notification Orchestrator + Delivery
  Conversation State Machine. Hard rule carried through: bots never touch
  financial statuses, only delivery fields via a dedicated Delivery Service.
- Phase 9: Marketplace/MarketplaceDomain/MarketplaceFeatureSet/
  MarketplaceRevision, full Hostinger DNS automation sequence (snapshot
  before change, never touch MX/SPF/DKIM/DMARC/CAA), lifecycle state
  machine that must expose its own blocker on every transition, publish
  model with orders/payments/inventory explicitly excluded from revisions.
- Phase 10: Gorbushka-class content entities (Shop/Service/Floor/
  SchemePin/RentListing/News/Lead/MallSettings), explicitly lowest
  priority and gated on Commerce Core being real first.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 23:05:39 +04:00

3.3 KiB
Raw Blame History

Phase 10 Backend Contract — Tenant Content Modules (Gorbushka-class tenants)

Companion to PRODUCT-PLAN-v3.1-DELIVERY-PLAN.md Phase 10 (Sprints 10.110.2). Covers plan §11.

Status: ready to build, lowest priority. Only after Commerce Core (Phases 17) is real — the plan is explicit that this tenant type does not define the platform architecture; it is one configuration of the shared runtime, not a separate build.


1. Entities

interface Shop {
  id: string;
  marketplaceId: string;
  shopCategoryId: string;
  name: string;
  floorId?: string;
  status: 'draft' | 'published';
}

interface ShopCategory {
  id: string;
  marketplaceId: string;
  title: string;
}

interface Service {
  id: string;
  marketplaceId: string;
  title: string;
  description: string;
  status: 'draft' | 'published';
}

interface Floor {
  id: string;
  marketplaceId: string;
  order: number;
  label: string;
}

interface SchemePin {
  id: string;
  marketplaceId: string;
  floorId: string;
  shopId?: string;
  x: number;
  y: number;
}

interface RentListing {
  id: string;
  marketplaceId: string;
  title: string;
  areaSqm: number;
  floorId?: string;
  status: 'available' | 'leased';
}

interface Lead {
  id: string;
  marketplaceId: string;
  rentListingId?: string;
  contactName: string;
  contactPhone: string;
  message?: string;
  createdAt: string;
}

interface NewsPromo {
  id: string;
  marketplaceId: string;
  title: string;
  body: string;
  publishedAt?: string;
}

interface MallSettings {
  marketplaceId: string;
  openingHours: Record<string, string>;
  contactInfo: Record<string, string>;
}

Every entity above carries marketplaceId, an audit trail, and the same draft/preview/publish flow as Phase 9's revision model §5 — not a separate content pipeline.

2. Endpoints

GET/POST/PATCH/DELETE  /api/admin/v2/content/shops
GET/POST/PATCH/DELETE  /api/admin/v2/content/shop-categories
GET/POST/PATCH/DELETE  /api/admin/v2/content/services
GET/POST/PATCH/DELETE  /api/admin/v2/content/floors
GET/POST/PATCH/DELETE  /api/admin/v2/content/scheme-pins
GET/POST/PATCH/DELETE  /api/admin/v2/content/rent-listings
POST                   /api/admin/v2/content/rent-listings/{id}/leads
GET/POST/PATCH/DELETE  /api/admin/v2/content/news
PATCH                  /api/admin/v2/content/mall-settings

3. Tenant feature configuration (Gorbushka's v1 default, per plan §11.1)

{
  "cms": true, "shops": true, "services": true, "mallScheme": true,
  "rentListings": true, "news": true, "seoMedia": true,
  "catalog": false, "sellerPortal": false,
  "cart": false, "checkout": false, "payments": false, "orders": false
}

Commerce modules are platform-ready but off — the point of Phase 10 is proving this tenant can flip catalog/cart/checkout/etc. to true later via Phase 9's MarketplaceFeatureSet with zero backend or storefront code changes, since the commerce core is already generic by the time Phase 10 starts.

4. What the frontend will start doing once this ships

  • Mall scheme / floor / pin editor UI.
  • Rent listing + lead capture forms.
  • Confirm the existing Gorbushka frontend/archive is used as UX reference only — production data and auth route through the shared platform per ADR-0001.