Skip to main content

Module federation

Module federation 

Source
Expand description

Aggregated federated albums — the album-group view (SSoT: Federation — Federated Shared Albums and Organization — views).

An aggregated album is N ordinary container albums — one per contributor, each homed on its contributor’s own server and single-writer-domain as always — that clients present as one logical album. There is zero new server surface: servers never learn a group exists. The group is client-side metadata, asserted per constituent:

  • The creator mints a group_id (UUIDv7) and shares it in the invite (AlbumGroupInvite).
  • Each contributor’s client writes an AlbumGroupAssertion into their own container album’s encrypted collaborative-metadata stream (the operation path) — a device-signed, AMK-sealed operation, so the assertion is never legible to any server.

There is deliberately no shared mutable group object: a union of per-album assertions needs no cross-server consensus. The aggregate is a computed view (render_aggregate), holding no keys and forming no access-control boundary, exactly like every view album.

§Inclusion is injection-proof by construction

A constituent appears in the local aggregate only if the local user is a member of that album (holds its AMK) and it asserts the group_id (Constituent::admits). A stranger’s album cannot inject itself into anyone’s view: without an invite its assertion is never even decryptable, so it is never a member; member_hint only tells the client where to ask, membership does the admitting.

Structs§

AggregateAsset
One asset a constituent contributes, as the local index (or federated breadcrumb index) holds it. capture_timestamp is the merge-ordering key; asset_id breaks ties.
AggregateEntry
One merged entry in the rendered aggregate. Carries its origin so a client can group by server and honor the per-origin degraded indicator.
AggregateView
The computed aggregate view over the constituents of one group. Nothing here is stored: it is recomputed at render and is identical across devices given the same inputs.
AlbumGroupAssertion
The album-group assertion — client-side group metadata, asserted per constituent and written into that album’s collaborative-metadata stream. This type owns the schema (SSoT: Federation — The Album-Group Assertion).
AlbumGroupInvite
Group-aware invite data riding the existing album invite: the group_id plus the sibling hints a joiner seeds its own assertion from. This carries the group facts as data; the interactive membership ceremony (delivering the AMK, the MLS Welcome) belongs to the MLS authority’s membership layer and is blocked — same caveat as the organization doc’s invitation surface. A joiner turns this into its own constituent’s AlbumGroupAssertion with to_assertion.
Constituent
One constituent album’s contribution to an aggregate, as the local client sees it. Built from the local library for own albums and from a federated read for remote ones; the renderer applies the inclusion rule uniformly.
MemberHint
A sibling/member hint: where a constituent of the group is claimed to live. Advisory discovery only, never trusted — it tells a client where to ask for an album, but membership (holding the AMK) is what admits a constituent into the view. A hint can name an album a stranger controls and it changes nothing: without an invite that album is not a member, so it is never rendered.
OriginStatus
The per-origin partial-view indicator for one included constituent. Structured data — the client formats the localized “photos from {home_server} currently unavailable” string from an i18n key; the core never carries the user-facing string.

Functions§

mint_group_id
Mint a fresh group_id — a UUIDv7 from ids, per the assertion schema. The creator mints it once and carries it in the AlbumGroupInvite.
render_aggregate
Render the aggregate for group_id over constituents, honoring the per-viewer cover_override (a group_id → asset_id choice from the library-settings document; None falls back to the newest included asset).