Fedify: an ActivityPub server framework's avatar

Fedify: an ActivityPub server framework

@fedify@hollo.social · 9 following · 788 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.

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

🎉 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 detailsFedify'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.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

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: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

Once the next version of , v1.0.0, is released, the API will be stabilized. Are there any features you'd like to see before the API is stabilized?

Sam Sethi :pc2red: ⁂'s avatar
Sam Sethi :pc2red:

@samsethi@podcastindex.social · Reply to Sean Tilley's post

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.

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

@squaredot3301 Integrating with more web frameworks is always on Fedify's roadmap, so if there's a web framework you're looking for in particular, open an issue in our issue tracker!

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

In the next release of , v1.0.0, you'll be able to forward received activities inside an inbox listener without any modifications.

You can preview this feature in v1.0.0-dev.398+5c6e1394 (JSR & npm).

https://unstable.fedify.dev/manual/inbox#forwarding-activities-to-another-server

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

started out exclusively for , but now also supports .js and . However, the we created in the early days still features the character from Deno. Should Fedify change its logo now?

OptionVoters
Yes, because it's misleading.5 (28%)
A logo is a logo, no need to change it.13 (72%)
Sean Tilley's avatar
Sean Tilley

@deadsuperhero@social.wedistribute.org · Reply to Darius Kazemi's post

@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 Kazemi's avatar
Darius Kazemi

@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

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

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

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: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

has over 400 stars on GitHub now! 🎊

https://github.com/dahlia/fedify

The header of Fedify's GitHub repository page. It has 401 stars.
ALT text detailsThe header of Fedify's GitHub repository page. It has 401 stars.
Lobsters's avatar
Lobsters

@lobsters@botsin.space

Creating your own federated microblog by @hongminhee lobste.rs/s/albrk0
fedify.dev/tutorial/microblog

洪 民憙(ホン・ミンヒ)'s avatar
洪 民憙(ホン・ミンヒ)

@hongminhee@fedibird.com

LobstersにFedifyチュートリアル「自分だけのフェディバースのマイクロブログを作ろう!」の英語版を投稿しました。

lobste.rs/s/albrk0/creating_yo

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@fosstodon.org

I submitted the @fedify tutorial “Creating your own federated microblog” to @lobsters!

lobste.rs/s/albrk0/creating_yo

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

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 detailsThe mouse cursor is hovering over a method in the example code, and information about that API pops up as a tooltip.
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@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 detailsThe mouse cursor is hovering over a method in the example code, and information about that API pops up as a tooltip.
洪 民憙(ホン・ミンヒ)'s avatar
洪 民憙(ホン・ミンヒ)

@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-
[参照]

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

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!

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

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!

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@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 detailsThe 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 ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

The next release will finally be 1.0.0. Stay tuned!

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social · Reply to Fedify: an ActivityPub server framework's post

If you're curious about 's property hydration, here's the docs for it:

https://unstable.fedify.dev/manual/vocab#property-hydration

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

has a side effect that when you call the getter method of an Activity Vocabulary object, the property that was internally a URI is populated with the actual ActivityStreams object. Today, someone at Ghost gave us a cool term for this: .

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@fosstodon.org

The `fedify inbox` command, which is shipped with @fedify/cli, is a tool that creates an ephemeral server so that you can debug and test the activities you send.

Here's a demo of it.

fedify.dev/cli#fedify-inbox-ep

A demo video of fedify inbox command.
ALT text detailsA demo video of fedify inbox command.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

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

It is now available in JSR and npm.

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social · Reply to silverpill's post

@silverpill FEP-e232 should be implemented in an application code. @hollo will implement it later!

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

In the next version of , the Article, ChatMessage, Note, and Question classes will have a quoteUrl property. This property corresponds to the following three JSON-LD properties all at once:

Available for preview in version 0.15.0-dev.384+6c39741b (JSR & npm).

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

Today, thanks to @ellemedit, we've added two more example projects to !

If you're interested in Fedify and these two frameworks, take a look!

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@fosstodon.org

As a trilingual, I've written the 's tutorial in three languages:

• English: unstable.fedify.dev/tutorial/m
• Korean: hackmd.io/@hongminhee/fedify-t
• Japanese: zenn.dev/hongminhee/books/4a38

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social · Reply to 洪 民憙 (Hong Minhee)'s post

In the next version of , it will allow you to decouple actor URIs from WebFinger usernames with the mapHandle() method. For example, you can use UUIDs for actor URIs but let users use their own username of choice for their fediverse handle.

You can preview it in v0.15.0-dev.382+a8a9b73b: JSR & npm.

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social · Reply to 洪 民憙 (Hong Minhee)'s post

In the next version of , it will allow you to decouple actor URIs from WebFinger usernames with the mapHandle() method. For example, you can use UUIDs for actor URIs but let users use their own username of choice for their fediverse handle.

You can preview it in v0.15.0-dev.382+a8a9b73b: JSR & npm.

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social · Reply to Antolius's post

@antolius Glad you enjoyed reading this!

Antolius's avatar
Antolius

@antolius@mastodon.social · Reply to Fedify: an ActivityPub server framework's post

@fedify this is incredibly helpful! I went into it with some beforehand knowledge & it was still useful.

The structure & flow are great, it's telling a story & leading the reader through it. The tips alone make it worth a read. I love how detailed it is, covering everything from database to frontend. On the other hand, every lib/tool is well & succinctly explained which makes it easy to swap out with an alternative. The prompts for improvements at the end are great.

⭐⭐⭐⭐⭐, will read again.

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@lemmy.ml · Reply to kopper [they/them]'s post

Thank you for your advice. As you mentioned, Fedify currently has actor URIs consisting of handles. This limitation is due to the early design of Fedify and will be fixed before we release v1.0!

← Newer
Older →