Anuva Bento Repository Architecture
Ownership
The public Bento source remains the upstream application foundation. Anuva extensions will be introduced by later Linear issues behind explicit boundaries.
flowchart LR
Upstream["nyblnet/bento\npublic upstream"]
Downstream["anuva-bento\nprivate downstream"]
Contract["Anuva contracts\nand validators"]
Editor["Anuva editor\nand templates"]
Player["Anuva player\nand artifacts"]
CMS["anuvax-cms"]
Unity["anuva-unity-video-creator"]
Python["anuva-python-server"]
Upstream --> Downstream
Downstream --> Contract
Downstream --> Editor
Downstream --> Player
Contract --> CMS
Editor --> CMS
Player --> CMS
Player --> Unity
CMS --> Python
Python --> Unity
Production contract and player boundary
ANU-11 adds a server-safe @anuva/bento-contract package plus an offline,
read-only deterministic player. The package owns pure JSON-domain types,
runtime validation, compatibility, stable errors, and transformations without
DOM or editor dependencies. The player owns Bento rendering, external asset
loading, readiness, same-origin host messaging, and absolute-time state.
Main, Companion, and Emphasis share the same surface-document semantics. Transparency is optional for every surface and is not an Emphasis invariant.
CMS, Python, and Unity consume exact compatibility metadata before use. This repository does not own their persistence, orchestration, host lifecycle, or capture behavior.
Production editor and template boundary
ANU-12 adds a host-embedded editor that owns one in-memory composite presentation while loading exactly one independent surface document into the upstream Bento store at a time. A versioned editor protocol exchanges complete validated DTOs, operations, save requests, and accepted revisions with the parent host. The host owns persistence and accepted revision assignment.
The server-safe package also owns template-family schemas, coordinated per-surface layout packs, semantic mapping, allowlisted operation validation, and pure atomic transformations. Browser-only materialization, the editor session, navigation, bridge, and composite undo remain in the isolated Anuva adapter. Editor and player artifacts share one exact renderer version.
ANU-18 extends that boundary with host-requested manual/autosave, stable per-surface slide focus through the upstream Store API, and a generated packaged template catalog. The editor owns validation, correlation, focus state, and DTO production; the host continues to own persistence, accepted revision assignment, and product workflow.
Bootstrap boundary
ANU-9 adds instructions, workflow skills, docs, provenance, and repository configuration. It does not alter the Bento editor, renderer, document model, network behavior, or build outputs.
The later feasibility spike determines exact source and build boundaries before production implementation begins.
Compatibility authority
- Product Main owns product-level invariants and acceptance.
- This repository owns executable schemas, validators, compatibility metadata, editor/player builds, templates, and artifacts.
- CMS owns persistence, authoring workflows, compilation, and packaging.
- Unity owns deterministic three-player hosting and capture behavior.
- Python owns validated staging and lifecycle transport.