Fedify: ActivityPub server framework's avatar

Fedify: ActivityPub server framework

@fedify@hollo.social

9 following1,121 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/

fedify.dev

Fedify

Fedify is a TypeScript library for building federated server apps powered by ActivityPub and other standards, so-called fediverse.

@thisismissem@hachyderm.io

Starting with v1.0.0, the term handle throughout Fedify will only be used to refer to a fediverse handle (e.g., @hongminhee@fosstodon.org). An actor's internal unique ID (e.g., b379dbdc-3b4f-4ef4-88c2-fc25632d1c22) will be referred to as identifier and a WebFinger name (e.g., hongminhee) will be referred to as username. The term handle in the API will be retained for the time being for backwards compatibility, but a deprecation warning will be logged and will be deprecated in the future.

@samsethi@podcastindex.social · Reply to Sean Tilley

1/3 @deadsuperhero As someone new to developing ActivityPub apps the poor documentation was a big turn off. @fedify have done a great job in making it easier to build new apps and their documentation is much better. The new book by @evan is also a great read for new AP developers.

However given that the Activity Vocab was defined way back in 2017 by the W3C and Mastodon the biggest AP client still doesn't support all the verbs is a disappointment. e.g summary, listen etc.

@deadsuperhero@social.wedistribute.org · Reply to Darius Kazemi

@darius Fedify is super cool. I’ve been eyeing it for some future projects, just gotta get better at JavaScript 😅

It’s pretty wild, though, that you can totally take this library, and spin up a working Fediverse app with it. Having to do all of the federation stuff from scratch seems like it would be a nightmare.

@darius@friend.camp

Damn... Fedify is really good. It seems like the ActivityPub library I always wanted for Node applications (rather than a reference server like the one I created for ExpressJS).

I love that it's built so you can take an existing app and quickly drop in the federation features you need (like oh okay I need my application to Follow/Accept/Reject/Undo and have the ability to Create an Article but that's it, cool, Fedify has me covered)

fedify.dev/tutorial/basics

fedify.dev

Learning the basics of Fedify | Fedify

This tutorial provides a step-by-step guide to building a small federated server with the Fedify framework. It is intended for developers who want to build a federated server with the Fedify framework.

@hongminhee@fosstodon.org · Reply to 洪 民憙 (Hong Minhee)

One of the benefits of is that you don't have to worry about whether a property of an Activity Vocabulary object has a URL or embeds an actual object. If you need an object, you can call the `getObject()` method (which will fetch a remote object if necessary). If you need a URI, you can access the `objectId` property.

fedify.dev/manual/vocab#object

fedify.dev

Vocabulary | Fedify

The Activity Vocabulary is a collection of type-safe objects that represent the Activity Vocabulary and the vendor-specific extensions. This section explains the key features of the objects.

We've applied Twoslash to the Fedify docs to show type information as tooltips in TypeScript example code—check it out now!

https://fosstodon.org/@hongminhee/113134894222177741

The mouse cursor is hovering over a method in the example code, and information about that API pops up as a tooltip.
ALT text

The mouse cursor is hovering over a method in the example code, and information about that API pops up as a tooltip.

@hongminhee@fosstodon.org

I'm applying to the docs. It works like magic! When I'm done, the Fedify docs will be even easier to read the example code than they are now.

The mouse cursor is hovering over a method in the example code, and information about that API pops up as a tooltip.
ALT text

The mouse cursor is hovering over a method in the example code, and information about that API pops up as a tooltip.

@hongminhee@fedibird.com

次のバージョンのFedifyはLinked Data Signatures (RsaSignature2017)に対応します。つまり、Mastodonが他のサーバーからフォワードしたアクティビティをFedifyが検証出来る様になります。

また、Context.sendActivity()メソッドで送信するアクティビティは、RSA-PKCS#1-v1.5の鍵ペアが一つでも有る場合、HTTP Signaturesに加え、Linked Data Signaturesが添付されます。

すでに廃止された標準であるLinked Data Signaturesを実装するのは気が進まなかったのですが、この変更がFedifyアプリのより良い互換性と相互運用性の基礎になる事を願っています。
QT: hollo.social/@fedify/0191ec91-
[参照]

fedibird.com

投稿の参照(1件) by 洪 民憙(ホン・ミンヒ) (@hongminhee@fedibird.com)

The next version of #Fedify will support #LDSignatures (#RsaSignature2017), which means that Fedify will be able to verify activities forwarded by #Mastodon from other servers. In addition, activities sent with the Context.sendActivity() method will have Linked Data Signatures attached in addition to HTTP Signatures if any RSA-PKCS#1-v1.5 key pairs are present. We were not motivated by implementing Linked Data Signatures, which is already an outdated standard, but we hope this change will lead to better compatibility and interoperability of Fedify apps! #fedidev #ActivityPub

The next version of will support (), which means that Fedify will be able to verify activities forwarded by from other servers.

In addition, activities sent with the Context.sendActivity() method will have Linked Data Signatures attached in addition to HTTP Signatures if any RSA-PKCS-v1.5 key pairs are present.

We were not motivated by implementing Linked Data Signatures, which is already an outdated standard, but we hope this change will lead to better compatibility and interoperability of Fedify apps!

The next version of will support (), which means that Fedify will be able to verify activities forwarded by from other servers.

In addition, activities sent with the Context.sendActivity() method will have Linked Data Signatures attached in addition to HTTP Signatures if any RSA-PKCS-v1.5 key pairs are present.

We were not motivated by implementing Linked Data Signatures, which is already an outdated standard, but we hope this change will lead to better compatibility and interoperability of Fedify apps!

@hongminhee@fosstodon.org

Working on @fedify's docs about … I hope someday drop the support for Linked Data Signatures… 😇

The combination of HTTP Signatures and Linked Data Signatures is the most widely supported way to sign activities in the fediverse, as of September 2024. Despite Linked Data Signatures is outdated and not recommended for new implementations, it is still widely used in the fediverse due to Mastodon and other major implementations' reliance on it.

However, for new implementations, you should consider using both Object Integrity Proofs and Linked Data Signatures for maximum compatibility and future-proofing.
ALT text

The combination of HTTP Signatures and Linked Data Signatures is the most widely supported way to sign activities in the fediverse, as of September 2024. Despite Linked Data Signatures is outdated and not recommended for new implementations, it is still widely used in the fediverse due to Mastodon and other major implementations' reliance on it. However, for new implementations, you should consider using both Object Integrity Proofs and Linked Data Signatures for maximum compatibility and future-proofing.

Fedify, an server framework, has released v0.15.0! The key changes include:

It is now available in JSR and npm.

npmjs.com

@fedify/fedify

An ActivityPub server framework. Latest version: 0.15.0, last published: an hour ago. Start using @fedify/fedify in your project by running `npm i @fedify/fedify`. There is 1 other project in the npm registry using @fedify/fedify.