Fedify: an ActivityPub server framework's avatar

Fedify: an ActivityPub server framework

@[email protected] · 7 following · 373 followers

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.

WebsiteGitHubJSRnpm

https://fedify.dev/

https://github.com/dahlia/fedify

https://jsr.io/@fedify/fedify

https://www.npmjs.com/package/@fedify/fedify

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

@[email protected]

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

@[email protected]

次のバージョンの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

@[email protected]

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

@[email protected]

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)

@[email protected]

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

@[email protected]

The next release will finally be 1.0.0. Stay tuned!

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

@[email protected] · 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

@[email protected]

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)

@[email protected]

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.
A demo video of fedify inbox command.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

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

@[email protected] · 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

@[email protected]

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

@[email protected]

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)

@[email protected]

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

@[email protected] · 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

@[email protected] · 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

@[email protected] · Reply to Antolius's post

@antolius Glad you enjoyed reading this!

Antolius's avatar
Antolius

@[email protected] · 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)

@[email protected] · 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!

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

@[email protected]

한국어판 Fedify 튜토리얼 《나만의 연합우주 마이크로블로그 만들기》를 공개합니다! Fedify나 ActivityPub을 몰라도 차근차근 따라할 수 있게 되어 있으니, ActivityPub 구현에 관심이 있으신 분들은 부디 읽어 주시기 바랍니다. (대신, 조금 깁니다. 😅)

https://hackmd.io/@hongminhee/fedify-tutorial-ko

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

@[email protected]

日本語版Fedifyチュートリアル『自分だけのフェディバースのマイクロブログを作ろう!』をZennで公開しました!ActivityPubの実装に興味の有る方々は是非ご覧ください!

zenn.dev/hongminhee/books/4a38

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

@[email protected]

We just finished drafting a new tutorial for ! This tutorial will walk you through the steps of creating your own federated . It's pretty long, though.

Please read it, give us feedback, and have fun!

https://unstable.fedify.dev/tutorial/microblog

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

@[email protected]

We just finished drafting a new tutorial for ! This tutorial will walk you through the steps of creating your own federated . It's pretty long, though.

Please read it, give us feedback, and have fun!

https://unstable.fedify.dev/tutorial/microblog

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

@[email protected]

The next version of will add the Context.lookupObject() method, which is preferred over the global lookupObject() function.

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

@[email protected]

Are there any features you'd like to see in ?

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

@[email protected]

Fedifyは、TypeScriptとJavaScriptで書かれたActivityPubサーバーフレームワークです。分散型のソーシャルネットワークを構築するためのサーバーアプリケーションを作る際の複雑さと冗長なコードを排除し、ビジネスロジックとユーザー体験の開発に集中できるようにすることを目指しています。

現在提供している主な機能は以下の通りです:

  • Activity Vocabularyのための型安全なオブジェクト(一部のベンダー固有の拡張機能を含む)
  • WebFingerクライアントとサーバー
  • HTTP SignaturesObject Integrity Proofs
  • ウェブフックを処理するためのミドルウェア
  • NodeInfoプロトコル
  • Node.js、Deno、Bunのサポート
  • テストとデバッグのためのCLIツールチェーン

興味がある方は、Fedifyのウェブサイトをご覧ください!包括的なドキュメント、デモ、チュートリアル、サンプルコードなどが用意されています:

https://fedify.dev/

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

@[email protected]

Question for those who have followed the tutorial: How long did it take you to follow the tutorial?

OptionVoters
30 minutes or shorter1 (33%)
1 hour or shorter1 (33%)
2 hours or shorter1 (33%)
4 hours or shorter0 (0%)
More than 4 hours0 (0%)
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I finally finished the first draft of the new tutorial, but it's still in Korean. Now I just need to polish it up and translate it into English.

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

@[email protected]

Did you know? offers the markdown-it plugins for parsing -style mentions and hashtags syntax:

Check it out!

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

@[email protected]

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!

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

@[email protected]

Released 0.14.2 & 0.13.3, which fix an incompatibility issue with Meta's Threads where sent activities had not been verified by their inbox.

Older →