Skip to content

Services Management ​

These rules define service ownership and composition for frontend applications regardless of framework. Vue code may appear in examples; it illustrates the decision rather than limiting its scope.

Status ​

Accepted

Rules ​

RuleScope
Create services around meaningful responsibilitiesService creation, ownership, and avoiding premature abstractions
Keep services independent from UI concernsState, lifecycle, and presentation separation
Use services for API contracts and workflowsFramework-neutral client/API coordination principles
Compose services around business domainsFramework-neutral service composition and ownership
Separate services, business components, and storesChoosing the correct owner for reusable logic and state
Keep services independently testableTestability and maintenance rules

Core Principle ​

A service is the boundary for reusable business or application logic that exists independently from the UI. It may coordinate the frontend with an API, transform data, and implement client-owned workflows, while remaining independent from framework reactivity and component lifecycle.

These rules complement the component management rules, the state ownership rules, and the frontend application structure.

You own what ships.