Skip to content

[FCE-2925] Document @fishjam-cloud/composition usage#292

Closed
Gawor270 wants to merge 1 commit into
mainfrom
fce-2925
Closed

[FCE-2925] Document @fishjam-cloud/composition usage#292
Gawor270 wants to merge 1 commit into
mainfrom
fce-2925

Conversation

@Gawor270

Copy link
Copy Markdown
Member

What

Expands the @fishjam-cloud/composition package README (previously a one-line stub) into a full usage guide.

Where

packages/composition/README.md in js-server-sdk.

Chose the package README because that is where the code lives and it matches the repo convention — every package here has a README, and the sibling composition-cli README already carries real usage docs. The documentation/website Docusaurus sites have no composition/smelter pages yet, so nothing to extend there.

Contents

  • Install (via composition-cli init, or manual).
  • Minimal template: a default-exported React component using usePeers() + Smelter Tiles/InputStream.
  • Reacting to peers/events: usePeers/usePeer/useRoom/useSpeakingState, the PeerWithStreams role split (cameraStream/screenShareStream/customStreams), the Stream/TrackState shape, active-speaker example, and the eventBus for custom events.
  • Host-facing ./core (compositionStore / CompositionStoreFeed) noted as not-for-template-authors.
  • Build/bundle with composition-cli (single ESM dist/App.js, allowed-imports contract, default-export + size validation).
  • How it connects to Fishjam/foundry (server-side Smelter worker composing forwarded room tracks into one output stream).

Everything is grounded in the package source (hooks.ts, types.ts, store.ts, eventBus.ts, index.ts), the CLI (init.ts, build.ts, validate.ts, smoke.ts, manifests/v1.ts), and the @swmansion/smelter exports — no invented APIs.

Open questions

  • composition-cli not on main yet. This branch is based on origin/main, where the composition-cli package isn't merged. The guide references it by npm name (no broken repo-relative links) since it ships alongside; if it should stay on a feature branch, the build section may need adjusting.
  • Docs-site coverage. Should this also land as a how-to page in the documentation Docusaurus site (e.g. docs/how-to/backend/)? Left out for now since there's no existing composition/smelter section to match.
  • Exact wording of the foundry/host runtime boundary (who registers the composition output, transport of the final stream) — kept deliberately high-level; happy to tighten with the foundry team's preferred terminology.

@linear

linear Bot commented Jul 23, 2026

Copy link
Copy Markdown

FCE-2925

@Gawor270

Copy link
Copy Markdown
Member Author

Closing per project decision: the full @fishjam-cloud/composition usage guide (FCE-2925) will live in the documentation site (documentation.fishjam.io) as part of the new Smelter Cloud section, not in the package README. Keeping the package README minimal.

@Gawor270 Gawor270 closed this Jul 23, 2026
@Gawor270
Gawor270 deleted the fce-2925 branch July 23, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant