Domains
Entities Layer Model Glossary
Canonical terms from the closed entities layer model grill
Entities Layer Model Glossary
These terms define the frontend layer model of the frontend-domain-structure
skill, its frontend-layers lint plugin, and the matching package tiers of
ci-solution-structure. They supersede the
Frontend Composition Layer Glossary.
- Composition: the top frontend layer. It holds the global root providers, the proxy, and routing (access, shells, pages). Avoid "abstractions", "root" and "templates".
- Shell: the layout of one route group, in
composition/routing/shells/<name>/. It combines feature providers with the Data Sources that Composition selects. Avoid "Surface", "area", "section" and "sub-app". - Page Template: the component a route renders, in
composition/routing/pages/<page>/. Avoid "page component" and "screen". - Feature: a user-facing capability that combines Entities, with its own workflow, policy, state and providers. Avoid "page", "widget" and "flow folder".
- Entity: a repository-like domain for one business entity: contract, port, CRUD and query machinery, providers, Data Sources and entity views. Avoid "kernel", "model", "repository" and "domain".
- Data Source: an implementation of a port, in a
remote/(server-backed) orsimulated/(in-memory) subpath of an Entity or Feature. Avoid "api", "mock", "fake" and "adapter". - Server Contract: the
index.tsorindex.tsxof aserver/domain: pure types, schemas, parsers and policy functions that the server and the browser of one app share. Every layer below the route layer imports it; its I/O stays inserver.ts. Avoid "protocol", "policy re-export" and "shared remote". - Module: business-agnostic app-local code with no product terms. Avoid "shared", "lib", "utils", "common" and "foundation".
- Integration: an adapter to a third-party system. Avoid "infra", "api" and "mock".
- UI: primitives and shadcn components. In a monorepo only the shared UI package holds them.
Relationships
- A Feature combines one or more Entities.
- An Entity owns zero or more Data Sources; Composition selects which one a Shell injects.
- Routing holds one or more Shells; a Shell wraps the Page Templates of its route group.
- Package tiers use the same words:
packages/entities/<name>and agnosticpackages/modules/<name>.
Axioms
- Each layer imports only lower layers:
apporroutes→ composition → features → entities → modules → integrations → ui. - A Feature never imports another Feature; an Entity never imports another Entity.
- Only Composition and tests import a Data Source.
- A
remote/Data Source exposes browser code only throughindex.tsand server code only throughserver.ts. - An
indexfile only re-exports. - A Server Contract reaches only pure code: never
server-only, a Node built-in,server.ts, or anintegrations/orplatform/file (#296).
Source: grill status and decision log.