Marketplace Platform Architecture Foundation
Status: Approved Owner: Lead Software Architect Date: 2026-07-03
Purpose
This folder defines the mandatory engineering governance for transforming this codebase into a reusable, configuration-driven, multi-tenant Marketplace Platform (Marketplace-as-a-Service).
This repository is not treated as a single marketplace website. It is a platform runtime that must support unlimited tenants from one Angular application.
Platform Principles
- One codebase, unlimited tenants.
- Every tenant has three surfaces: Website, Builder, Backoffice.
- Frontend contains no tenant-specific implementation code.
- Tenant behavior is controlled by configuration loaded at bootstrap.
- Authentication, payment, authorization behavior and contracts remain unchanged.
- Prefer composition over inheritance.
- Prefer configuration over conditionals.
- No circular dependencies.
- Shared and UI layers are feature-agnostic.
Non-Negotiable Constraints
- Authentication behavior remains exactly as current implementation.
- Payment API behavior remains exactly as current implementation.
- Authorization behavior remains exactly as current implementation.
- Existing authentication and payment API contracts cannot be changed.
- Proven modules are reused, wrapped, and isolated, not redesigned.
Document Set
Architecture Decision Records
Engineering Rule Documents
- Folder Blueprint
- Import Boundary Matrix
- Dependency Rules
- Naming Conventions
- Coding Standards
- Component Standards
- Service Standards
- Configuration Standards
- State Management Standards
Compliance
All new work must comply with this foundation. If an implementation conflicts with these rules, implementation must be adjusted. If a rule must change, an ADR update is required first.
Mandatory Phase Order
Implementation must proceed only in this order:
- Foundation structure only, app compiles.
- Shared interfaces and types only.
- Mocked configuration payloads only.
- ConfigService abstraction only.
- Theme engine.
- Dynamic rendering engine.
- Reusable widget library.
- Website from configuration.
- Builder from configuration domain.
- Backoffice from business domain.
- Backend documentation.
For each phase:
- Explain what will be created.
- Explain why.
- List files to create.
- Explain dependencies.
- Implement only that phase.
- Verify build integrity.
- Stop and wait.