Fedify: ActivityPub server framework's avatar

Fedify: ActivityPub server framework

@fedify@hollo.social

9 following1,131 followers

:fedify: Fedify is a TypeScript library for building federated server apps powered by ActivityPub and other standards, so-called fediverse. It aims to eliminate the complexity and redundant boilerplate code when building a federated server app, so that you can focus on your business logic and user experience.

Pinned

🎉 Excited to announce that is now on Open Collective! Support the project's development starting at:

  • Backer (from $5/mo)
  • Supporter (from $25/mo)
  • Sponsor (from $100/mo)
  • Corporate Sponsor (from $500/mo)
  • Custom donations welcome

Your support will help us maintain and improve Fedify. Check it out here:

https://opencollective.com/fedify

:fedify:

Fedify's Open Collective page showing the project logo, description as “A TypeScript library for building federated server apps powered by ActivityPub and other standards”, and five contribution tiers starting from $5/month Backer to $500/month Corporate Sponsor, with custom contribution options available.
ALT text

Fedify's Open Collective page showing the project logo, description as “A TypeScript library for building federated server apps powered by ActivityPub and other standards”, and five contribution tiers starting from $5/month Backer to $500/month Corporate Sponsor, with custom contribution options available.

Pinned

Fedify is an server framework in & . It aims to eliminate the complexity and redundant boilerplate code when building a federated server app, so that you can focus on your business logic and user experience.

The key features it provides currently are:

If you're curious, take a look at the website! There's comprehensive docs, a demo, a tutorial, example code, and more:

https://fedify.dev/

What is the biggest reason that makes you hesitate to adopt ?

  • ActivityPub protocol seems too complex8 (14%)
  • Not familiar with TypeScript/JavaScript ecosystem13 (23%)
  • Lack of documentation or tutorials6 (11%)
  • Integration with existing systems looks difficult7 (12%)
  • Performance/scalability not proven5 (9%)
  • Security and stability concerns2 (4%)
  • Debugging/testing appears challenging3 (5%)
  • Insufficient community support3 (5%)
  • Too much time required for learning8 (14%)
  • Team/company resistance to adopting new technology2 (4%)

🎉 Huge shoutout to @2chanhaeng for implementing custom collection dispatchers in through the Korean program!

This incredible contribution adds support for creating arbitrary collections beyond the built-in ones (e.g., outbox, inbox, following, followers). Now developers can expose custom collections like user bookmarks, post categories, or any grouped content through the protocol:

federation
  .setCollectionDispatcher(
    "bookmarks",
    Article,
    "/users/{identifier}/bookmarks",
    async (ctx, values, cursor) => {
      const { posts, nextCursor } = await getBookmarkedPosts(values.identifier, cursor);
      return { items: posts, nextCursor };
    }
  )
  .setCounter(async (ctx, values) =>
    getBookmarkCount(values.identifier)
  );

The implementation is technically excellent with full support, both Collection and OrderedCollection types, cursor-based pagination, authorization predicates, and zero breaking changes. @2chanhaeng delivered not just code but a complete feature with 313 lines of comprehensive documentation, practical examples, and thorough test coverage.

This opens up countless possibilities for ActivityPub applications built with Fedify. From user-specific collections to complex categorization systems, developers now have the flexibility to create any type of custom collection while maintaining full ActivityPub compliance.

Thank you @2chanhaeng for this outstanding contribution and to the OSSCA program for fostering such excellent open source collaboration! 🚀

github.com

Support custom collection dispatchers by 2chanhaeng · Pull Request #332 · fedify-dev/fedify

Summary This PR implements custom collection dispatchers for Fedify, allowing developers to create and expose arbitrary collections of ActivityPub objects beyond the built-in collections (outbox, i...

🎉 Huge shoutouts to two amazing contributors from Korea's program who just made even better!

First, @z9mb1 delivered PR #321, adding a handy -o/--output option to fedify lookup. Now you can save lookup results directly to files instead of just printing to terminal—a nice quality-of-life improvement for analysis and scripting workflows.

But the real showstopper is @joonnot's incredible PR #283, which introduces the brand new @fedify/testing package! This massive contribution (2,014 lines across 20 files) brings MockFederation and MockContext classes that completely transform how we test federated applications. No more complex setups or actual network requests—just clean, straightforward unit testing with activity tracking, inbox simulation, and queue-aware testing capabilities.

These contributions solve real pain points and showcase the amazing talent emerging from the OSSCA program. Both features will be available in the upcoming Fedify 1.8 release. The future of federated software development just got a lot brighter! 🚀

github.com

feat(test): `MockFederation` and `MockContext` by notJoon · Pull Request #283 · fedify-dev/fedify

Description This PR implements mock classes for the Federation and Context interface to improve testability, addressing issue #197 MockFederation Class The new MockFederation class provides a compl...

@link@twink.men
@fedicat@pc.cafe · Reply to Andy Piper

@andypiper I'm not a server-side person, so there's really not much there - I started with the tutorial, enough to create one account, and an instance with a nodeinfo, added the mastodon api instance info that's in the screenshot, and web pages that display links and a resume from hardcoded data and embedded static json. I'm just dabbling, but I'd like to see a fediverse portfolio/resume site, like linkedin but not linkedin.

@fedicat@pc.cafe

my very single-user instance built with

screenshot of an instance showing me and two dogs not mine and stats showing just one user and virtually no activity
ALT text

screenshot of an instance showing me and two dogs not mine and stats showing just one user and virtually no activity

@hack13@cyberfurz.social

Been reading up on the spec as I design my plan out. There's a lot of really nice proposals out there I'm interested in considering implementing. Also been pretty happy with the @fedify library it's pretty awesome for hitting the ground running.

🎉 Huge shoutout to two amazing contributors from Korea's program who've made excellent contributions to !

👏 @gaebalgom tackled a tricky terminal compatibility issue in PR #282, fixing the fedify node command's favicon display on terminal emulators without truecolor support (#168). His solution elegantly detects terminal capabilities and falls back to 256-color mode when needed—ensuring a great experience across different environments.

🌟 @joonnot enhanced Fedify's functionality in PR #281 by adding a configurable maxRedirection option to the lookupWebFinger() function (#248). He transformed a hardcoded limitation into a flexible, user-customizable parameter while maintaining perfect backward compatibility.

Both delivered thoughtful, well-implemented solutions that showcase the quality of contributions coming from the OSSCA program. Welcome to the Fedify community! :fedify:

Side-by-side comparison of `fedify node` command output showing terminal favicon display. Left side shows broken display on terminal without truecolor support with corrupted color blocks. Right side shows proper display after the fix with clean, correctly rendered favicon and NodeInfo output including mastodon.social server information and statistics.
ALT text

Side-by-side comparison of `fedify node` command output showing terminal favicon display. Left side shows broken display on terminal without truecolor support with corrupted color blocks. Right side shows proper display after the fix with clean, correctly rendered favicon and NodeInfo output including mastodon.social server information and statistics.

🎉 Big thanks to @2chanhaeng for his first contribution to ! He implemented the new fedify webfinger command in PR #278, which allows isolated lookups for testing configurations. This addresses the need for developers to test WebFinger functionality without performing comprehensive object retrieval.

The contribution includes:

  • A new fedify webfinger <handle> command that accepts @user@domain format handles or URIs
  • Clean JSON output of WebFinger JRD results
  • Proper error handling for invalid handles and lookup failures
  • Complete integration with help text and usage examples

This was originally filed as issue #260 and marked as a good first issue—perfect for newcomers to learn the codebase structure while contributing meaningful functionality. The PR has been merged and will be included in the upcoming Fedify 1.8.0 release.

We appreciate all first-time contributors who help make Fedify better for the entire community. Welcome aboard, ChanHaeng!

github.com

fedify-dev/fedify

ActivityPub server framework in TypeScript. Contribute to fedify-dev/fedify development by creating an account on GitHub.

@box464@mastodon.social

has moved to a monorepo structure with unified versioning across all packages (@fedify/fedify, @fedify/cli, database adapters & framework integrations).

All packages now release together, making dependency management much simpler!

Fedify monorepo structure diagram showing all packages (@fedify/fedify, @fedify/cli, database adapters, framework integrations) unified with shared versioning
ALT text

Fedify monorepo structure diagram showing all packages (@fedify/fedify, @fedify/cli, database adapters, framework integrations) unified with shared versioning

@maybeanerd@bumscode.com · Reply to Doug Webb
@thisismissem@hachyderm.io · Reply to Emelia 👸🏻

A couple of things to note:

- Testing this between a local mastodon instance and a local Adonis.js server was a royal PITA, due to SSL requirements on Mastodon's side, and not being able to supply an extra certificate to trust (I was using localcan to proxy everything, but it uses a self-signed certificate and mastodon is very unhappy about that)

- Converting between the Request/Response objects that Fedify wants and what Adonis.js has was a little troublesome — it's mostly based on the express code, but modified for Adonis.js — I did have a bug where the body was incomplete for some reason.

- Changing instance URLs is a PITA because everything gets weirdly cached. Here be dragons.

- I did hit into an issue with firstKnock throwing an error, but I can't manage to reproduce it now. I think it may have been SSL related.

@thisismissem@hachyderm.io

Okay, so after an evening hacking session with a 4 hour blackhole of focus, I've managed to get @adonisframework working together with @fedify — now, this code is super rough, and definitely not reusable, but may I might make it into a package later.

For now, this is just an experimental demo:

github.com/ThisIsMissEm/adonis

github.com

GitHub - ThisIsMissEm/adonisjs-fedify-demo

Contribute to ThisIsMissEm/adonisjs-fedify-demo development by creating an account on GitHub.

@hongminhee@hollo.social

Excited to share that I've joined (Open Source Software Contribution Academy) as a mentor for the @fedify project!

OSSCA is a national program run by South Korea's NIPA (National IT Industry Promotion Agency) through their Open Source Software Support Center, aimed at fostering the next generation of open source contributors.

We're currently in the process of selecting around 20 mentees who will start contributing to once the selection is complete. I've been busy preparing good first issues to help them get started on their open source journey.

Looking forward to working with these new contributors and seeing what amazing things we can build together!

@julian@fietkau.social · Reply to Fedify: ActivityPub server framework

I build Encyclia as a solo dev, and I consider myself more of a hobbyist developer than a professional (I used my university CS credentials to go into academia instead of the tech industry).

This is why Encyclia's development pace is so uneven: I get around to it when I get around to it. 😉

But having created ActivityPub projects with and without frameworks, let me say that @fedify makes it realistic to build reliable, practical, long-term ActivityPub integrations for someone like me. 👍

We're pleased to share that Encyclia has joined our success stories.

@encyclia bridges academic research to the by making researcher profiles and publications discoverable through —built with for seamless interoperability across Mastodon and other fediverse platforms.

This demonstrates Fedify's versatility beyond traditional social networking, helping specialized domains connect to the federated web.

We're also grateful for 's sponsorship support, which helps make Fedify's development possible.

Learn more about Encyclia at https://encyclia.pub/. 📚

encyclia.pub

Encyclia.pub

Bridging ORCID into the Fediverse

We are pleased to announce the release of 1.7.0. This release was expedited at the request of the Ghost team, who are actively using Fedify for their implementation. As a result, several features originally planned for this version have been moved to Fedify 1.8.0 to ensure timely delivery of the most critical improvements.

This release focuses on enhancing message queue functionality and improving compatibility with ActivityPub servers through refined HTTP signature handling.

Native retry mechanism support

This release introduces support for native retry mechanisms in message queue backends. The new MessageQueue.nativeRetrial property allows queue implementations to indicate whether they provide built-in retry functionality, enabling Fedify to optimize its retry behavior accordingly.

When nativeRetrial is set to true, Fedify will delegate retry handling to the queue backend rather than implementing its own retry logic. This approach reduces overhead and leverages the proven retry mechanisms of established queue systems.

Current implementations with native retry support include:

  • DenoKvMessageQueue — utilizes Deno KV's automatic retry with exponential backoff
  • WorkersMessageQueue — leverages Cloudflare Queues' automatic retry and dead-letter queue features
  • AmqpMessageQueue — can now be configured to use AMQP broker's native retry mechanisms

The InProcessMessageQueue continues to use Fedify's internal retry mechanism, while ParallelMessageQueue inherits the retry behavior from its wrapped queue.

AMQP message queue improvements

Alongside Fedify 1.7.0, we have also released @fedify/amqp 0.3.0. This release adds the nativeRetrial option to AmqpMessageQueueOptions, enabling you to leverage your AMQP broker's built-in retry mechanisms. When enabled, this option allows the AMQP broker to handle message retries according to its configured policies, rather than relying on Fedify's internal retry logic.

Configurable double-knocking

The new FederationOptions.firstKnock option provides control over the HTTP Signatures specification used for the initial signature attempt when communicating with previously unknown servers.

Previously, the first knock for newly encountered servers always used RFC 9421 (HTTP Message Signatures), falling back to draft-cavage-http-signatures-12 if needed. With this release, you can now configure which specification to use for the first knock when communicating with unknown servers, with RFC 9421 remaining the default.

Summary

This release maintains Fedify's commitment to reliability and compatibility while laying the groundwork for more efficient message processing. The native retry mechanism support will particularly benefit applications using queue backends with sophisticated retry capabilities, while the double-knocking mechanism addresses real-world compatibility challenges in the ActivityPub ecosystem.

For detailed technical information about these changes, please refer to the changelog in the repository.

github.com

fedify/CHANGES.md at 1.7.0 · fedify-dev/fedify

ActivityPub server framework in TypeScript. Contribute to fedify-dev/fedify development by creating an account on GitHub.

@dantescanline@autonomous.zone

the thing that is always revelatory for me about the fediverse is that the fundamental thing (federation) actually just works? yes there are many many issues with the way applications integrate with each other.

but doing the hello world example for the fedify library, running a tunnel so my local code is reachable over a domain and seeing the actor show up in any random fediverse server is like magic. you'd think this is the part that would take 15 years to build, not the UI on top

Fedify 1.6.2 has been released as a hotfix to address compatibility issues with certain Mastodon servers.

This release resolves interoperability problems with Mastodon instances running bleeding-edge versions that include RFC 9421 HTTP Message Signatures support. These versions contain a bug that causes 500 Internal Server Error responses when receiving RFC 9421 signatures, affecting communication with several major servers including mastodon.social.

The fix extends Fedify's double-knocking mechanism to retry requests with draft-cavage-http-signatures-12 when receiving 5xx error responses, in addition to the existing 4xx error handling. This ensures continued federation compatibility while Mastodon addresses the underlying issue in their implementation.

This is a temporary workaround that will be reverted in a future release once Mastodon fixes their RFC 9421 implementation and affected servers are updated. The change maintains backward compatibility and does not affect the behavior with servers that properly handle RFC 9421 signatures.

Users are encouraged to update to 1.6.2 to ensure reliable federation with affected Mastodon servers.

rfc-editor.org

RFC 9421: HTTP Message Signatures

This document describes a mechanism for creating, encoding, and verifying digital signatures or message authentication codes over components of an HTTP message. This mechanism supports use cases where the full HTTP message may not be known to the signer and where the message may be transformed (e.g., by intermediaries) before reaching the verifier. This document also describes a means for requesting that a signature be applied to a subsequent HTTP message in an ongoing HTTP exchange.

@encyclia@fietkau.social

Encyclia was shown as a speed demo at @fediforum on June 7. 🙂 You can find the 5 minute video on Peertube: spectra.video/w/tSjP7WnV3pBakD or on YouTube: youtube.com/watch?v=8QipWHAaUE

In case you've been waiting: the project hasn't been forgotten, @julian is just having a busy few months at the day job since April now. 😓 We'll probably be making more progress again later in the summer!

youtube.com

FediForum Demo: Encyclia: bridging ORCID into the Fediverse

Speed demo by Julian Fietkau (@julian@fietkau.social), at FediForum June 2025.More info: https://fediforum.org/2025-06/

@silverpill@mitra.social

Mitra v4.4.0 supports verification of RFC-9421 HTTP signatures. It is known to be compatible with @fedify, but I haven't tested it with Mastodon or Streams yet.
Outgoing requests are still signed according to the draft-cavage. I don't plan to implement double-knocking, but something like FEP-844e could be supported in the future, though this is not urgent.

My implementation of a parser is available in APx library.

@rfc9421 #rfc9421

RE: https://mitra.social/objects/01974018-9b83-c1ec-a109-24a72a579235

mitra.social

#Mitra v4.4.0 - Post by @mitra

Federated social network

@samvie@chaos.social

Great demo of @encyclia by @julian

Day 3 of starts strong with a great tool for the academic sphere👏

Making available for via @fedify

Open science communication is very relevant for the future development of the 🚀

Julian presenting Encyclia at Fediforum. You see a screenshare and Julians camera.
ALT text

Julian presenting Encyclia at Fediforum. You see a screenshare and Julians camera.

Julians page of Encyclia which he Demos at FediForum
ALT text

Julians page of Encyclia which he Demos at FediForum