docs/BACKEND_API.md no longer exists as a live file (merged into BACKEND.md in an earlier consolidation pass, per that doc's own intro - only docs/archive/BACKEND_API.md remains, historical only). This mission's "update BACKEND_API.md" instruction is fulfilled by extending the doc that actually supersedes it: new §11 "Seller Management (Optional Capability)", added to the top-of-file table of contents, no existing section renumbered or altered. Every subsection explicitly tagged Implemented / Planned / Future, matching the same legend used in docs/architecture/foundation/ Seller-Management.md (the frontend-side capability doc this section is the backend counterpart to): - 11.2 Future entities: Marketplace (Implemented, existing TenantConfig unchanged), Seller/SellerBranding (Planned - frontend types exist, no backend schema), SellerUser/SellerSettings/ SellerInvitation (Future - no type, no concept, named for roadmap completeness only). - 11.3 Future endpoints: Seller CRUD/Activation/Invitations/Branding/ Analytics/Dashboard - all Future, none designed, each noted as following the existing mock-to-API-gateway pattern (SS8) once built. - 11.4 Authentication: SellerPermissionRole (4 roles) explicitly flagged as a separate vocabulary from the existing, live AdminRole - not merged, no guard wired, zero auth change. - 11.5 Domain resolution: market.com -> Marketplace is Implemented today (ADR-001, backend-Host-resolved); nike.market.com -> Marketplace -> Seller is Future, no backend resolves it - and per the storefront audit, needs no frontend routing change once it does. - 11.6 Bootstrap additions: modules/modules.sellerManagement documented as Implemented-as-contract (typed, always false/absent today); sellerScope/sellerBranding as Planned with an explicitly flagged open question (SellerConfig vs SellerBranding nesting not reconciled); permissions noted as existing/unrelated today. - 11.7 Checkout modes: Unified Order vs Split Orders - Future, not designed, flagged as the single most consequential undecided item for backend design given payments/refunds/reporting all depend on it. - 11.8 Product ownership: sellerId? on Item/AdminProduct/AdminOrder - Implemented as schema only (optional, absent = marketplace-owned, verified backward-compatible via tsc staying clean). Existing products remain valid with no migration required - NULL/absent ownership documented as a permanent state, not transitional. No backend implemented. No frontend code touched. Documentation only.
Marketplace Frontend
Angular 21 multi-tenant marketplace platform frontend. Standalone components, signals, no NgRx. One codebase serves unlimited tenants ("marketplaces") via a per-tenant bootstrap.json fetched at runtime — no tenant-specific code paths.
Three surfaces on this one codebase:
- Storefront (
/) — the public shopping site: catalog, product pages, cart, static/CMS pages. - Builder / Project Editor (
/edit/**) — in-app editor that edits the tenant'sBootstrapConfig(theme, nav, homepage sections, widgets, footer, languages, static pages). - Backoffice / Admin (
/:lang/backoffice/**) — products, categories, orders, transactions, users, moderation, media, monitoring, analytics.
Architecture
Component (container) → Facade → Domain Service → Repository/Provider (DI token, swappable mock↔API) → Mock | API
Enforced by npm run arch:check (import boundaries + circular deps), not just convention. Full detail: docs/ARCHITECTURE.md, governance ADRs at docs/architecture/foundation/**.
Frontend status
Release Candidate — feature-complete. See docs/PROJECT_STATUS.md for the honest current-state breakdown (completion %, known limitations, readiness for demo/production/backend).
Backend
Not implemented yet — fully specified. Every domain currently runs against an in-memory/mock gateway except Categories (the one domain wired to a real HTTP API). The complete contract a backend engineer needs — every endpoint, DTO, auth flow, error model, upload contract, and a step-by-step implementation checklist — lives in one canonical document:
How to switch Mock ↔ API
Toggle useMockData in src/environments/environment.ts (or environment.production.ts). RuntimeProviderStrategyService (src/app/core/providers/runtime-provider-strategy.service.ts) reads this flag per-domain to decide whether a facade gets the mock or real gateway. On localhost with useMockData: false, some domains (bootstrap, categories) still fall back to mock automatically so local dev never silently hits a real backend by accident — see that service for the exact per-domain logic.
Development
npm install # install dependencies
npm start # local dev server
npm run build # production build -> dist/dexarmarket/
npm run arch:check # import-boundary + circular-dependency check
Folder structure
src/
├── app/
│ ├── components/ # Shared storefront components (header, footer, product-card, etc.)
│ ├── core/ # Auth, admin-auth, config/tenant resolution, DI providers, interceptors
│ ├── dynamic-renderer/ # Bootstrap JSON -> section/widget rendering pipeline (live homepage engine)
│ ├── facades/ # Runtime, website, builder, and backoffice facades
│ ├── features/ # Domain features: admin/*, project-editor, content-management, website/*
│ ├── guards/ # Route guards (language, admin-auth, dirty-state, etc.)
│ ├── i18n/ # Translation service, pipe, and locale packs (en/ru/hy)
│ ├── pages/ # Top-level routed pages: home, cart, static-page
│ ├── services/ # API, cart, auth, SEO, Telegram, and language services
│ ├── shared/ # Shared UI primitives (button, dialog, confirm-dialog, table, etc.)
│ └── widgets/ # Dynamic-renderer widget components
├── assets/mock/ # Local mock configuration and catalog data
├── environments/ # Development and production environment settings (incl. useMockData)
└── styles/ # Shared global styles and themes
Documentation map
Full index: docs/PROJECT_INDEX.md. Key entry points:
| Doc | What it covers |
|---|---|
docs/PROJECT_STATUS.md |
Current completion status, honest limitations, demo/production readiness |
docs/BACKEND.md |
The one canonical backend spec — endpoints, DTOs, auth, security, errors, uploads, checklist |
docs/NEXT_PHASE.md |
Roadmap: backend integration → testing → performance → monitoring → v2 |
docs/TODO.md |
Release blockers only |
docs/KNOWN-ISSUES.md |
Real, reproducible, currently-open frontend bugs |
docs/PRODUCT_BACKLOG.md |
Items needing a client/business decision |
DESIGN.md |
Visual design system |
PRODUCT.md |
Product positioning |
Notes
- Authentication and payment integrations are on their existing contracts — see
docs/BACKEND.mdfor the auth/security contract a real backend must satisfy. - Client-facing content should avoid placeholder names, mock labels, and temporary routes.