Skip to content

Latest commit

 

History

History
88 lines (66 loc) · 4.82 KB

File metadata and controls

88 lines (66 loc) · 4.82 KB

Contract Artifacts (F8)

Third-party renderer adapters and product modules should consume Platform contracts from these published artifact locations. F8 documents the map; it does not add npm/go publish automation.

BFF UI contract (bff.v1)

Artifact Location Role
JSON Schema schema/bff/v1/ Strict validation for screen, page, nav, session, actions
TypeScript types web/contract/ @fastygo/bff-contract — shared types and validators
Golden fixtures pkg/conformance/testdata/bff/v1/ Canonical proof screens for adapters
Fixture index pkg/conformance/bffparity/parity.go ProofFixtures, ProofDashboardFixtures, ProofTemplateFixtures, ProofRealtimeFixtures
Conformance matrix pkg/conformance/bffparity/conformance_matrix.go Expected HTML/JSON semantics per fixture
Adapter authoring Renderer adapter authoring Implement adapters from schema + fixtures alone
Conformance guide Renderer adapter conformance F4–F7 fixture matrix and delivery modes

Frontend DX readiness (Pass 6)

Platform freeze exposes enough contract surface for future React/Vite/shadcn adapters. Official frontend DX is deferred; adapters build on frozen artifacts.

Layer Stable now Deferred
Contract JSON Schema, @fastygo/bff-contract, golden fixtures, conformance matrix
Semantics Screen/nav/session/action models proven by fixtures Product metadata domain semantics
Adapter dev Schema validation, fixture tests, manual /bff/* fetch useScreen, useAction, useSession, useNavigation
Tooling web/react compatibility proof, examples/renderer-adapters Full SDK, create-fastygo-app, shadcn mapping pack
Platform core Renderer-neutral BFF runtime React/Vite/shadcn as required or default stack

See Frontend adapters.

Contract change acceptance flow

When a BFF contract change affects renderer-visible behavior, these artifacts must move together or the change must declare no fixture impact:

Go structs (pkg/bff, pkg/render)
    -> JSON Schema (schema/bff/v1/*)
    -> TypeScript types + validators (web/contract)
    -> Golden fixtures (pkg/conformance/testdata/bff/v1/)
    -> Conformance matrix (pkg/conformance/bffparity/)
    -> Adapter proofs (web/react, examples/renderer-adapters) when semantics change

Internal-only refactors that do not alter golden fixture semantics may document no fixture impact in the PR or release notes instead of updating fixtures.

Verification gates

Layer Gate Command / workflow Scope
Platform package Go conformance go test ./pkg/conformance ./pkg/renderers/templ ./pkg/bff ./pkg/render Schema, roundtrip, Templ parity, boundaries
Platform package BFF parity script scripts/bff-parity.sh CI parity + optional AppCMS/AppCRM BFF tests
Platform package GitHub CI .github/workflows/bff-parity.yml Automated Platform package gate on PRs
Product assembly App BFF parity go test ./cmd/server -run BFF in AppCMS/AppCRM Live route parity vs golden fixtures
Separate track Codex conformance GoCMS / product codex suites Observable CMS behavior; not BFF renderer gate

Third-party adapters should copy or submodule pkg/conformance/testdata/bff/v1/ and depend on @fastygo/bff-contract (local path or future package). They must not import Platform product apps or module internals.

Codex compatibility (separate track)

Artifact Location Role
Codex docs Codex profiles Observable CMS behavior, URLs, REST
Platform codex models pkg/codex/ Route contracts and conformance cases
GoCMS oracle go-codex/en (GoCMS repo) WordPress-compatible observable behavior

Codex conformance is not part of the BFF renderer fixture gate.

Toolset and Panel

Artifact Location Role
Toolset pkg/toolset/ Records, fields, relations, validation
Panel pkg/panel/, pkg/panelschema/ Resources, pages, views, actions

Module templates register through these contracts; see App template authoring.

Framework runtime

Host, security, and HTTP routing contracts live in github.com/fastygo/framework. Platform BFF docs describe UI models only; Framework owns runtime/security conformance for product apps.