diff --git a/docs/architecture/frontend-application-foundation.md b/docs/architecture/frontend-application-foundation.md index d9fe275e..e2633a09 100644 --- a/docs/architecture/frontend-application-foundation.md +++ b/docs/architecture/frontend-application-foundation.md @@ -118,8 +118,9 @@ Central installed catalogs are aggregation points only: - `installed-contract-contributions.ts`: declared contract packages and the registry the HTTP executor resolves against, filled as features load - `installed-feature-runtime-registries.ts`: loads every runtime half and - composes the V2 API registries and contract contributions; the platform - overview route calls it before it renders, the boot never does + composes the contract contributions, the FE-REG-API rows projected from + them and the FE-REG-SCHEMA registry; the platform overview route calls it + before it renders, the boot never does - `loaded-feature-runtimes.ts`: the same registries as module constants (top- level await) for Node scripts, tests and registry governance; nothing under `src` may import it (`boot-does-not-load-every-feature-runtime`) diff --git a/docs/architecture/starter-experience.md b/docs/architecture/starter-experience.md index 204290f2..1bba7c60 100644 --- a/docs/architecture/starter-experience.md +++ b/docs/architecture/starter-experience.md @@ -133,10 +133,11 @@ selected app. Every build and check script runs it first; run it yourself with `loadRuntime`, which imports `feature-runtime.ts` dynamically. `src/features/reference-feature/feature-module.ts` is the complete example. 2. Create `src/features//feature-runtime.ts` with - `defineFeatureRuntime`: the API contract (operations, schema metadata, - runtime schemas, mappers), the adapter contributions + `defineFeatureRuntime`: the `schemas` (FE-REG-SCHEMA rows for the + feature's route and API schemas), the adapter contributions (`defineFeatureAdapterContribution`, with `needs` naming the platform - capabilities it receives) and the contract contributions. The router loads + capabilities it receives) and the contract contributions (the HTTP + operations). The router loads it (`application.features.load`) when one of the feature's routes is entered. Do not import it statically from anywhere: each feature would add its whole executable code to the initial chunk again, about 3.9 KB gzip diff --git a/src/features/feature-module.ts b/src/features/feature-module.ts index f9defeff..28352a34 100644 --- a/src/features/feature-module.ts +++ b/src/features/feature-module.ts @@ -9,8 +9,9 @@ type EmptyRecord = Readonly>; * contract packages the release manifest is checked against at boot. It is * imported statically and lands in the initial chunk, so it stays data. * - * Everything executable (API contracts with their runtime schemas and mappers, - * the application input factory, the HTTP contract contributions) is the + * Everything executable (the FE-REG-SCHEMA schema definitions, the adapter + * contributions that build the application input, and the HTTP contract + * contributions whose descriptors FE-REG-API rows are projected from) is the * runtime half (`FeatureRuntime`). `loadRuntime` imports it dynamically when * one of the feature's routes is entered. Before 15-01 both halves loaded at * boot and each feature added about 3.9 KB gzip to the initial chunk. diff --git a/src/features/installed-feature-contracts.ts b/src/features/installed-feature-contracts.ts index 0e88e974..205c59e0 100644 --- a/src/features/installed-feature-contracts.ts +++ b/src/features/installed-feature-contracts.ts @@ -9,8 +9,9 @@ import { INSTALLED_PRODUCT_FEATURES } from "./installed-product-manifest.ts"; /** * 15-01. Boot-time registries composed from the features' declarations: the * route table, route runtime contracts, cache invalidation and navigation. - * The V2 API registries need the executable half of every feature and live in - * `loaded-feature-runtimes.ts`, which the app boot never imports. + * FE-REG-API and FE-REG-SCHEMA come from the executable half of every feature + * (rows projected from the contract contributions, and the runtime `schemas`) + * and live in `loaded-feature-runtimes.ts`, which the app boot never imports. */ export const INSTALLED_FEATURE_CONTRACTS = INSTALLED_PRODUCT_FEATURES;