Skip to content

angee.compose.web

Web runtime manifest projected from the composed addon graph.

The composer's web projector. It is deliberately offline and pure: it reads static AppConfig declarations and renders two files under runtime/web/manifest.json (the package graph + codegen contributions) and tailwind.sources.css (the Tailwind @source include). It holds no GraphQL-schema knowledge: which schemas exist, whether each is live, and the shape of their operation documents are owned by the SDL on disk and the @angee/app angee-web-codegen CLI that reads this manifest. Generating runtime/web/app.ts is the CLI's job, not the composer's, so that no schema-shaped TypeScript is ever authored in Python.

CORE_WEB_PACKAGES

Rendered framework packages every host must scan and compose against.

DEFAULT_WEB_ROOT

Path from runtime/web/ to the host web package when both are project siblings.

WebPackage

python
@dataclass(frozen=True)
class WebPackage()

Web package projected into a composed web runtime manifest.

manifest_entry

python
def manifest_entry() -> dict[str, str]

Return the JSON-safe manifest entry for this package.

WebCodegen

python
@dataclass(frozen=True)
class WebCodegen()

An external GraphQL codegen pass an addon contributes to the manifest.

The Django console/public schemas are emitted into runtime/schemas/ (owned by :class:~angee.graphql.sdl.GraphQLSdl) and discovered by the CLI there. A schema owned elsewhere — the operator daemon — keeps its committed SDL in its own addon package; this entry records the package, the package-relative SDL path, and the document file so the CLI reads the SDL straight from node_modules and generates runtime/gql/<schema>/ with the entry's config. The composer only collects and orders the declaration; it neither runs the daemon nor mixes external SDL into the Django-owned schema directory.

manifest_entry

python
def manifest_entry() -> dict[str, object]

Return the JSON-safe manifest entry for this codegen pass.

WebRuntime

python
class WebRuntime()

Render the runtime/web manifest + Tailwind sources from AppConfigs.

__init__

python
def __init__(addons: Iterable[AppConfig],
             *,
             web_root: str = DEFAULT_WEB_ROOT) -> None

Create a web projector over addons rooted at web_root.

render_sources

python
def render_sources() -> dict[Path, str]

Return generated runtime/web files keyed by relative path.

manifest_json

python
def manifest_json() -> str

Return the deterministic web runtime manifest.

tailwind_sources_css

python
def tailwind_sources_css() -> str

Return the Tailwind source include consumed by host CSS.

Released under the AGPL-3.0 License.