Skip to content
This repository was archived by the owner on Aug 11, 2026. It is now read-only.
This repository was archived by the owner on Aug 11, 2026. It is now read-only.

docs(architecture): formalize scalable extension layers, tenant/business boundaries, and service extraction criteria #739

Description

@ahliweb

Parent epic: #738
Related completed foundations: #679, #680, #681, #696

Context

AWCMS-Mini already has an accepted modular-monolith ADR, registry DAG checks, capability ports, and module-admission governance. The remaining gap is a single authoritative architecture decision that connects those mechanisms to the next expansion stage: many derived repositories, optional business foundations, a separate SaaS control plane, and ERP extensions.

Current documentation still needs an explicit distinction between:

  • Core, System Foundation, Official Optional Business Foundation, SaaS Control Plane, ERP Extension, and Derived Application;
  • tenant as security/subscription boundary versus legal entity and organization unit as business/accounting scopes;
  • lifecycle dependencies versus capability dependencies;
  • service catalog/subscription billing versus ERP item catalog/general ledger;
  • criteria for keeping a module in the monolith versus extracting a service later.

Objective

Publish an accepted ADR and supporting diagrams/matrices that establish the target layers, ownership boundaries, dependency direction, data ownership, and evidence-based service-extraction criteria without changing runtime behavior.

Scope

  • Add an ADR under docs/adr/ and update the ADR index.
  • Update docs/awcms-mini/21_module_admission_governance.md, the derived-application guide, master traceability, and architecture diagrams as needed.
  • Define the target layers and allowed dependency directions.
  • Define tenant, legal entity, organization unit, service catalog, subscription billing, operational ledger, accounting ledger, profile/party, and business-role boundaries.
  • Add a data-ownership matrix covering at least Core, workflow, reporting, event runtime, data lifecycle, integration hub, business foundation, SaaS control plane, and ERP extension.
  • Formalize no shared-table write across module owners; collaboration uses a capability port, public/internal API contract, or versioned event.
  • Define service-extraction criteria:
    • materially different CPU/IO/concurrency profile;
    • distinct security/process/network boundary;
    • independent deployment cadence;
    • clear operational owner/on-call responsibility;
    • separable data ownership and stable API/event contracts;
    • business-continuity need for failure isolation.
  • Define future extraction prerequisites: backfill, shadow read, cutover, rollback, no-dual-write, and observability evidence.
  • Map at least five derived-application examples to reusable primitives without moving their domain logic into the base.

Out of scope

  • Implementing microservices, sharding, cache, tenant placement, SaaS billing, or ERP tables.
  • Reclassifying existing modules without a separate admission decision and implementation issue.
  • Runtime plugin installation or marketplace support.

Acceptance criteria

Documentation checklist

  • ADR index.
  • Module admission governance.
  • Derived application guide.
  • Repository architecture/master traceability.
  • Glossary/data ownership matrix.
  • Changeset only if required by repository policy for the affected files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:architectureStruktur repo, module contract, registrypriority:p0Prioritas tertinggi - blocker foundation/securitytype:docsPerubahan dokumentasi sesuai doc 06

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions