Hollo Grounds · Branch Temple

Fedify Branch Temple (npm edition)

ja· en· ko
If you're new hereThe fedify library itself, living inside hollo (a copy installed from npm).

One npm install, and all of this hall's diplomacy is in hand—that's this tower. package.json holds eight scrolls of the @fedify/* sutra, all standing together.

The join between branch temple and hall is a single line: app.use(federation(fedi, ...)). And because it stands ahead of the routers, the same address /@handle becomes fedify's face or the parlor's face depending on how you visit. By the way, this hall's nameplate is @fedify/hollo—the branch temple and the head temple share a family name.

Highlights

  • createFederation() is called just once in the hall (src/federation/federation.ts). After that, everyone passes around and reads the same instance
  • The @fedify/vocab vocabulary (Accept/Announce/Create/EmojiReact/Follow/Like/Move/QuoteRequest…) is imported directly all over the code
  • Search (v2 search), too, uses lookupObject/isActor by way of @fedify/vocab

A passage from the sutra

app.use(federation(fedi, (_) => undefined));

app.route("/", pages);
app.route("/oauth", oauth);
app.route("/api", api);
app.route("/image", image);
app.route("/proxy", proxy);
src/index.tsx L69-L76— This one line is the covered walkway between branch temple and hall. It stands ahead of the routers

Floor plan

package.json
The eight scrolls of @fedify/*, all ^2.3.0
src/index.tsx
The one-line federation() middleware, a covered walkway
src/federation/federation.ts
The one createFederation() in the hall

Neighboring rooms

Outside links