Application Engine¶
Status¶
Normative Architecture Document
Purpose¶
The Application Engine defines the use case orchestration layer of CMonChoix Platform.
It exists to coordinate business capabilities without owning business truth or technical implementation details.
Core Definition¶
Application owns use case orchestration.
It coordinates Domain objects, invokes stable Contracts, and returns explicit use case outcomes.
It does not contain business rules.
It does not implement Infrastructure behavior.
It does not expose executable entry points.
Responsibilities¶
Application is responsible for:
- orchestrating use cases;
- coordinating Domain objects;
- invoking stable Contracts;
- returning explicit use case outcomes;
- keeping technical details outside the use case;
- preserving the boundary between Apps, Domain, Contracts and Infrastructure.
What Application May Do¶
Application may:
- receive stable inputs from Apps;
- call Domain objects and factories;
- call Knowledge components when authorized;
- call Contracts required by a use case;
- assemble Domain objects from stable contract data;
- return explicit use case results.
What Application Must Never Do¶
Application must never:
- define Domain invariants;
- contain business truth;
- call SQL directly;
- call WordPress directly;
- call Docker directly;
- read files directly;
- parse merchant-specific formats directly;
- call external partner APIs directly;
- depend on Infrastructure classes;
- depend on Adapter classes;
- define Infrastructure behavior;
- own Runtime orchestration;
- expose CLI, HTTP, worker, cron or operational entry points.
Relationship with Apps¶
Apps are executable entry points.
Apps may invoke Application use cases, but they do not own use case logic.
Application receives stable inputs from Apps and returns explicit outcomes.
Application must remain independent from the executable surface used to trigger it.
Relationship with Domain¶
Domain owns business truth and invariants.
Application coordinates Domain objects.
Application must not move Domain rules into use cases.
Domain objects must remain valid by construction.
Relationship with Contracts¶
Contracts define stable collaboration boundaries.
Application may depend on Contracts that express the needs of a use case.
Application must not depend directly on Infrastructure implementations.
Relationship with Infrastructure¶
Infrastructure implements technical details.
Infrastructure satisfies Contracts required by Application use cases.
Application must not import Infrastructure classes or expose Infrastructure formats.
Relationship with Runtime¶
Runtime owns operational orchestration.
Runtime may invoke Application use cases through Apps or executable entry points.
Application does not own Runtime execution, scheduling, queues, workers, monitoring or logging.
Foundation Scope¶
BC-018 Application Use Case Execution Foundation certifies the Application use case pattern.
It does not define a complete Application framework.
It does not introduce:
- Scheduler;
- Queue;
- Worker;
- Logger;
- Monitoring;
- RuntimeExecutionId;
- RuntimeContext;
- Composition Root;
- Service Container;
- CLI;
- HTTP controller;
- WordPress integration;
- SQL integration.
A concrete Application use case may be implemented only when:
- the corresponding Business Capability has been certified;
- its inputs are stable;
- its output is explicit;
- its dependencies comply with the Platform boundary model.
Review Rules¶
An Application use case is compliant only if:
- it has a clear use case purpose;
- it contains no business truth;
- it depends only on authorized layers;
- it does not import Infrastructure or Adapter classes;
- it does not call SQL, WordPress, Docker, filesystem or external APIs directly;
- it returns an explicit outcome;
- it keeps executable entry-point concerns outside Application.
Architecture Decision¶
Decision: FOUNDATION
Application Use Case Execution Foundation is defined as the minimal pattern for use case orchestration in CMonChoix Platform.
Application coordinates certified business capabilities through Domain objects and Contracts, without owning technical implementation, executable entry points, or Runtime behavior.