Build · Frameworks

Fedify

A TypeScript framework for building ActivityPub servers — it handles the federation plumbing for you.

MIT · TypeScript · fedify.dev · Repo

Why it exists

ActivityPub in the field means four signature mechanisms — two for HTTP requests, two for documents — JSON that changes shape between servers, deliveries that arrive out of order, and per-server quirks the spec never mentions. Fedify turns that pain into defaults — its author wrote the field guide: Why ActivityPub is hard.

Who it's for

  • A new federated app in TypeScript or JavaScript — fedify at full strength. Ghost, Hollo, and Hackers' Pub run it in production.
  • An existing app that should federate — integrations for Express, Hono, Next.js, SvelteKit, and a dozen more.
  • Anyone tired of hand-writing JSON-LD — the typed vocabulary alone is worth adopting.
  • Implementers in other languages — deterministic output makes it a byte-exact answer sheet.

The good part

  • The whole federation core is one options object — about two dozen lines in Hollo.
  • The inbox is a routing table — signatures are verified before your handler runs.
  • An actor is a database lookup — WebFinger, NodeInfo, and key publishing come free.
  • Delivery to every follower is one call — fan-out, retries, and ordering included.
What it feels likewith receipts from Hollo and Hackers' Pub

The road

Federation grows in stages, each one verifiable before the next: be findable → be followable → speak → listen → interact → grow up. The first three are thin; the fourth is where your real work lives.

The roadmapsix stages with checkpoints, and how far the road goes

Keep in mind

  • Persistence is yours — fedify stores nothing; mirroring remote actors and posts is the real work.
  • Policy is yours — accepting follows, moderation, honoring deletes.
  • Sharp edges exist — immutable vocab, Object shadowing, cross-origin re-fetches, two key types.
Keep in mindthe traps, each with where it's written down

Running it

  • Split web and worker processes.
  • Leave the safety rails on.
  • Debug with the CLI, lint in your editor.
Running itops, debugging, and where to start

See also