Fedify: an ActivityPub server framework's avatar

Fedify: an ActivityPub server framework

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

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

@[email protected]

Hello, ! It's the official fedi account of the Fedify, an server framework!

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

@[email protected] · Reply to Chris​‌​‬ Hayes‌​​​'s post

@chris_hayes Yes, it corresponds to the misskey:isCat property! According to the docs:

Used on actors to indicate that they in some way identify as a cat, expressed as a boolean value. If this property is set to true, displaying the actor or their notes will have some special effects attached in some clients.

Chris​‌​‬ Hayes‌​​​'s avatar
Chris​‌​‬ Hayes‌​​​

@[email protected]

I was looking at the properties on the Person object implemented by , and wasn't expecting this one, haha!

I'm presuming this is related? The quirks of having to implement many different versions of a spec!

A screenshot of a code editor showing a TypeScript class Person with a property get cat(): boolean | null. The accompanying comment explains that the property is "used on actors to indicate that they in some way identify as a cat, expressed as a boolean value. If this property is set to true, displaying the actor or their notes will have some special effects attached in some clients."
A screenshot of a code editor showing a TypeScript class Person with a property get cat(): boolean | null. The accompanying comment explains that the property is "used on actors to indicate that they in some way identify as a cat, expressed as a boolean value. If this property is set to true, displaying the actor or their notes will have some special effects attached in some clients."
Chris​‌​‬ Hayes‌​​​'s avatar
Chris​‌​‬ Hayes‌​​​

@[email protected]

- I'm learning ActivityPub for a larger project, but taking a moment to and code a minimal fediverse reader.

I found it tricky learning to make a read-only app with , so wanted to make this example Next.js project available. Got a little carried away with the design.

Mockup in , it's a better prototyping tool than one might expect.

Hopefully @tamami doesn't mind me using her nice post in my mockup :blobcatfingergun:.

A design mockup of a minimalistic "Fediverse Reader" app created in Inkscape, showcasing layouts for desktop and mobile screens. The designs include variations of a homepage and post view with text and images. The interface uses light yellow tones and emphasizes simplicity with modern, clean lines.
A design mockup of a minimalistic "Fediverse Reader" app created in Inkscape, showcasing layouts for desktop and mobile screens. The designs include variations of a homepage and post view with text and images. The interface uses light yellow tones and emphasizes simplicity with modern, clean lines.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

The repository has reached 600 stars! Thank you everyone!

https://github.com/dahlia/fedify

The Fedify repository has reached 602 stars.
The Fedify repository has reached 602 stars.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

Here's the detailed release note of Fedify 1.3.0!

https://dev.to/hongminhee/fedify-130-opentelemetry-support-enhanced-message-queue-42gk

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

@[email protected]

FedifyやHolloの開発を支援したい方は、GitHubでスポンサーになってください!

github.com/sponsors/dahlia
QT: fosstodon.org/@hongminhee/1135
[参照]

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

@[email protected]

If you'd like to support the development of @fedify or @hollo, you can sponsor me on GitHub!

github.com/sponsors/dahlia

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

@[email protected] · Reply to 洪 民憙(ホン・ミンヒ)'s post

Fedify 1.3.0の詳細なリリースノートは以下の記事を参照してください!

zenn.dev/hongminhee/articles/7

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

@[email protected]

1.3.0이 릴리스되었습니다. 서포트들 비롯해 많은 것이 바뀌었으니, 아래 릴리스 노트에서 살펴보세요!

velog.io/@hongminhee/fedify-1.

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

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

Here's the detailed release note of Fedify 1.3.0!

https://dev.to/hongminhee/fedify-130-opentelemetry-support-enhanced-message-queue-42gk

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

@[email protected]

ActivityPubサーバーフレームワークのFedifyの1.3.0バージョンがリリースされました。主な変更点は以下の通りです。

• OpenTelemetry の計装のスパンが追加されました。殆どの場合、アプリケーションにOpenTelemetry SDKが設定されていれば、自動的に計装されます。
• 今回のバージョンから、受信アクティビティと送信アクティビティに対して異なるMessageQueueを設定する事が出来る様に成りました。
• Activityを手動でインボックスリスナーにルーティングする事が出来る様に成りました。
• Context.sendActivity()とforwardActivity()メソッドは、タスクをキューに入れる事に失敗した場合、エラーを出す様に成りました。
さんのおかげでSvelteKitと連携する為に@fedify/fedify/x/sveltekitモジュールが追加されました。
• 正しいUser-Agentヘッダ(例えば、`User-Agent: Fedify/1.3.0 (Deno/2.1.2)`)を含めてHTTPリクエストを送る様に成りました。

詳細は変更ログをご覧ください!

github.com/dahlia/fedify/relea
QT: hollo.social/@fedify/01937890-
[参照]

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

@[email protected]

The version 1.3.0 of , an server framework, released! The key changes include:

For details, see the full changelog as well!

Fedify 1.3.0 is available at JSR and npm.

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

@[email protected]

The version 1.3.0 of , an server framework, released! The key changes include:

For details, see the full changelog as well!

Fedify 1.3.0 is available at JSR and npm.

robin's avatar
robin

@[email protected]

아스키아트 로고 귀여워...

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

@[email protected]

I would like to translate 's docs into Korean and Japanese, the languages I can speak, but the amount of the docs is quite much, so I can't even think of doing it. The maintenance costs for updating the docs also cannot be ignored. :blobcatnotlikethis:

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

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

's @opentelemetry instrumentation works like a charm with @getsentry! :opentelemetry: :sentry:

A trace view on Sentry. Many spans are on the instrumentation timeline.
A trace view on Sentry. Many spans are on the instrumentation timeline.
A trace view on Sentry. Many spans are on the instrumentation timeline.
A trace view on Sentry. Many spans are on the instrumentation timeline.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

Many more spans were added today! :opentelemetry:

https://unstable.fedify.dev/manual/opentelemetry#instrumented-spans

Instrumented spans

Fedify automatically instruments the following operations with OpenTelemetry spans:

Span name	Span kind	Description
{method} {template}	Server	Serves the incoming HTTP request.
activitypub.get_actor_handle	Client	Resolves the actor handle.
activitypub.lookup_object	Client	Looks up the Activity Streams object.
http_signatures.sign	Internal	Signs the HTTP request.
http_signatures.verify	Internal	Verifies the HTTP request signature.
ld_signatures.sign	Internal	Makes the Linked Data signature.
ld_signatures.verify	Internal	Verifies the Linked Data signature.
object_integrity_proofs.sign	Internal	Makes the object integrity proof.
object_integrity_proofs.verify	Internal	Verifies the object integrity proof.
webfinger.handle	Server	Handles the WebFinger request.
webfinger.lookup	Client	Looks up the WebFinger resource.

More operations will be instrumented in the future releases.
Instrumented spans Fedify automatically instruments the following operations with OpenTelemetry spans: Span name Span kind Description {method} {template} Server Serves the incoming HTTP request. activitypub.get_actor_handle Client Resolves the actor handle. activitypub.lookup_object Client Looks up the Activity Streams object. http_signatures.sign Internal Signs the HTTP request. http_signatures.verify Internal Verifies the HTTP request signature. ld_signatures.sign Internal Makes the Linked Data signature. ld_signatures.verify Internal Verifies the Linked Data signature. object_integrity_proofs.sign Internal Makes the object integrity proof. object_integrity_proofs.verify Internal Verifies the object integrity proof. webfinger.handle Server Handles the WebFinger request. webfinger.lookup Client Looks up the WebFinger resource. More operations will be instrumented in the future releases.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected] · Reply to Emelia 👸🏻's post

@thisismissem Sure thing! We're adding more spans in next few days, including document loaders!

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

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

's @opentelemetry instrumentation works like a charm with @getsentry! :opentelemetry: :sentry:

A trace view on Sentry. Many spans are on the instrumentation timeline.
A trace view on Sentry. Many spans are on the instrumentation timeline.
A trace view on Sentry. Many spans are on the instrumentation timeline.
A trace view on Sentry. Many spans are on the instrumentation timeline.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

Many more spans were added today! :opentelemetry:

https://unstable.fedify.dev/manual/opentelemetry#instrumented-spans

Instrumented spans

Fedify automatically instruments the following operations with OpenTelemetry spans:

Span name	Span kind	Description
{method} {template}	Server	Serves the incoming HTTP request.
activitypub.get_actor_handle	Client	Resolves the actor handle.
activitypub.lookup_object	Client	Looks up the Activity Streams object.
http_signatures.sign	Internal	Signs the HTTP request.
http_signatures.verify	Internal	Verifies the HTTP request signature.
ld_signatures.sign	Internal	Makes the Linked Data signature.
ld_signatures.verify	Internal	Verifies the Linked Data signature.
object_integrity_proofs.sign	Internal	Makes the object integrity proof.
object_integrity_proofs.verify	Internal	Verifies the object integrity proof.
webfinger.handle	Server	Handles the WebFinger request.
webfinger.lookup	Client	Looks up the WebFinger resource.

More operations will be instrumented in the future releases.
Instrumented spans Fedify automatically instruments the following operations with OpenTelemetry spans: Span name Span kind Description {method} {template} Server Serves the incoming HTTP request. activitypub.get_actor_handle Client Resolves the actor handle. activitypub.lookup_object Client Looks up the Activity Streams object. http_signatures.sign Internal Signs the HTTP request. http_signatures.verify Internal Verifies the HTTP request signature. ld_signatures.sign Internal Makes the Linked Data signature. ld_signatures.verify Internal Verifies the Linked Data signature. object_integrity_proofs.sign Internal Makes the object integrity proof. object_integrity_proofs.verify Internal Verifies the object integrity proof. webfinger.handle Server Handles the WebFinger request. webfinger.lookup Client Looks up the WebFinger resource. More operations will be instrumented in the future releases.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

We now have and 's official server! Join us now!

https://discord.gg/bhtwpzURwd

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

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

:opentelemetry: @opentelemetry instruments are being added one by one to …!

Instrumented spans

Fedify automatically instruments the following operations with OpenTelemetry spans:

Operation	Span type	Description
Federation.fetch()	Server	Serves the incoming HTTP request.
lookupObject()	Client	Looks up the Activity Streams object.
lookupWebFinger()	Client	Looks up the WebFinger resource.
handleWebFinger()	Server	Handles the WebFinger request.

More operations will be instrumented in the future releases.
Instrumented spans Fedify automatically instruments the following operations with OpenTelemetry spans: Operation Span type Description Federation.fetch() Server Serves the incoming HTTP request. lookupObject() Client Looks up the Activity Streams object. lookupWebFinger() Client Looks up the WebFinger resource. handleWebFinger() Server Handles the WebFinger request. More operations will be instrumented in the future releases.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

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

@silverpill Thanks!

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

@[email protected]

Though we have OpenTelemetry Semantic Conventions 1.28.0, it does not yet define attributes related to the fediverse. So is taking the initiative to define semantic attributes related to the ActivityPub protocol and its related protocols. If you have any ideas, please leave a comment!

https://gist.github.com/dahlia/7ad0f197a3a87072707996b2ee14a749

Semantic attributes for ActivityPub

The OpenTelemetry Semantic Conventions currently do not have a specification for ActivityPub.  However, Fedify provides a set of semantic attributes for ActivityPub.  The following table shows the semantic attributes for ActivityPub:

Attribute 	Type 	Description 	Examples
activitypub.activity.id 	string 	The IRI of the activity object. 	"https://example.com/activity/1"
activitypub.activity.type 	string[] 	The qualified IRI(s) of the activity type(s). 	["https://www.w3.org/ns/activitystreams#Create"]
activitypub.activity.to 	string[] 	The IRI(s) of the recipient collections/actors of the activity. 	["https://example.com/1/followers/2"]
activitypub.activity.cc 	string[] 	The IRI(s) of the carbon-copied recipient collections/actors of the activity. 	["https://www.w3.org/ns/activitystreams#Public"]
activitypub.activity.resend_count 	int 	The ordinal number of activity resending attempt (if and only if it's retried). 	3
activitypub.actor.id 	string 	The IRI of the actor object. 	"https://example.com/actor/1"
activitypub.actor.type 	string[] 	The qualified IRI(s) of the actor type(s). 	["https://www.w3.org/ns/activitystreams#Person"]
activitypub.object.id 	string 	The IRI of the object or the object enclosed by the activity. 	"https://example.com/object/1"
activitypub.object.type 	string[] 	The qualified IRI(s) of the object type(s). 	["https://www.w3.org/ns/activitystreams#Note"]
activitypub.object.in_reply_to 	string[] 	The IRI(s) of the orig
Semantic attributes for ActivityPub The OpenTelemetry Semantic Conventions currently do not have a specification for ActivityPub. However, Fedify provides a set of semantic attributes for ActivityPub. The following table shows the semantic attributes for ActivityPub: Attribute Type Description Examples activitypub.activity.id string The IRI of the activity object. "https://example.com/activity/1" activitypub.activity.type string[] The qualified IRI(s) of the activity type(s). ["https://www.w3.org/ns/activitystreams#Create"] activitypub.activity.to string[] The IRI(s) of the recipient collections/actors of the activity. ["https://example.com/1/followers/2"] activitypub.activity.cc string[] The IRI(s) of the carbon-copied recipient collections/actors of the activity. ["https://www.w3.org/ns/activitystreams#Public"] activitypub.activity.resend_count int The ordinal number of activity resending attempt (if and only if it's retried). 3 activitypub.actor.id string The IRI of the actor object. "https://example.com/actor/1" activitypub.actor.type string[] The qualified IRI(s) of the actor type(s). ["https://www.w3.org/ns/activitystreams#Person"] activitypub.object.id string The IRI of the object or the object enclosed by the activity. "https://example.com/object/1" activitypub.object.type string[] The qualified IRI(s) of the object type(s). ["https://www.w3.org/ns/activitystreams#Note"] activitypub.object.in_reply_to string[] The IRI(s) of the orig
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

Though we have OpenTelemetry Semantic Conventions 1.28.0, it does not yet define attributes related to the fediverse. So is taking the initiative to define semantic attributes related to the ActivityPub protocol and its related protocols. If you have any ideas, please leave a comment!

https://gist.github.com/dahlia/7ad0f197a3a87072707996b2ee14a749

Semantic attributes for ActivityPub

The OpenTelemetry Semantic Conventions currently do not have a specification for ActivityPub.  However, Fedify provides a set of semantic attributes for ActivityPub.  The following table shows the semantic attributes for ActivityPub:

Attribute 	Type 	Description 	Examples
activitypub.activity.id 	string 	The IRI of the activity object. 	"https://example.com/activity/1"
activitypub.activity.type 	string[] 	The qualified IRI(s) of the activity type(s). 	["https://www.w3.org/ns/activitystreams#Create"]
activitypub.activity.to 	string[] 	The IRI(s) of the recipient collections/actors of the activity. 	["https://example.com/1/followers/2"]
activitypub.activity.cc 	string[] 	The IRI(s) of the carbon-copied recipient collections/actors of the activity. 	["https://www.w3.org/ns/activitystreams#Public"]
activitypub.activity.resend_count 	int 	The ordinal number of activity resending attempt (if and only if it's retried). 	3
activitypub.actor.id 	string 	The IRI of the actor object. 	"https://example.com/actor/1"
activitypub.actor.type 	string[] 	The qualified IRI(s) of the actor type(s). 	["https://www.w3.org/ns/activitystreams#Person"]
activitypub.object.id 	string 	The IRI of the object or the object enclosed by the activity. 	"https://example.com/object/1"
activitypub.object.type 	string[] 	The qualified IRI(s) of the object type(s). 	["https://www.w3.org/ns/activitystreams#Note"]
activitypub.object.in_reply_to 	string[] 	The IRI(s) of the orig
Semantic attributes for ActivityPub The OpenTelemetry Semantic Conventions currently do not have a specification for ActivityPub. However, Fedify provides a set of semantic attributes for ActivityPub. The following table shows the semantic attributes for ActivityPub: Attribute Type Description Examples activitypub.activity.id string The IRI of the activity object. "https://example.com/activity/1" activitypub.activity.type string[] The qualified IRI(s) of the activity type(s). ["https://www.w3.org/ns/activitystreams#Create"] activitypub.activity.to string[] The IRI(s) of the recipient collections/actors of the activity. ["https://example.com/1/followers/2"] activitypub.activity.cc string[] The IRI(s) of the carbon-copied recipient collections/actors of the activity. ["https://www.w3.org/ns/activitystreams#Public"] activitypub.activity.resend_count int The ordinal number of activity resending attempt (if and only if it's retried). 3 activitypub.actor.id string The IRI of the actor object. "https://example.com/actor/1" activitypub.actor.type string[] The qualified IRI(s) of the actor type(s). ["https://www.w3.org/ns/activitystreams#Person"] activitypub.object.id string The IRI of the object or the object enclosed by the activity. "https://example.com/object/1" activitypub.object.type string[] The qualified IRI(s) of the object type(s). ["https://www.w3.org/ns/activitystreams#Note"] activitypub.object.in_reply_to string[] The IRI(s) of the orig
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

If you are using on , the minimum supported Deno version will be raised to 2.0.0 starting with Fedify 1.3.0.

モナコ広告 :fedibird1: @技術・雑談's avatar
モナコ広告 :fedibird1: @技術・雑談

@[email protected]

本日の 勉強会の発表資料を置きました!

FedifyでActivityPubサーバを作ってみた(第5回FediLUG勉強会)
docswell.com/s/monaco_koukoku/

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

@[email protected]

Thanks to @robin_maki, integration support has been added to ! This feature will be included in Fedify 1.3.0.

https://unstable.fedify.dev/manual/integration#sveltekit

SvelteKit

This API is available since Fedify 1.3.0.

SvelteKit is a framework for building web applications with Svelte. Fedify has the @fedify/fedify/x/sveltekit module that provides a hook handler to integrate Fedify with SvelteKit. Put the following code in your hooks.server.ts file:

import { createFederation } from "@fedify/fedify";
import { fedifyHook } from "@fedify/fedify/x/sveltekit";

const federation = createFederation<string>({
  // Omitted for brevity; see the related section for details.
});

// This is the entry point to the Fedify hook from the SvelteKit framework:
export const handle = fedifyHook(federation, (req) => "context data");
SvelteKit This API is available since Fedify 1.3.0. SvelteKit is a framework for building web applications with Svelte. Fedify has the @fedify/fedify/x/sveltekit module that provides a hook handler to integrate Fedify with SvelteKit. Put the following code in your hooks.server.ts file: import { createFederation } from "@fedify/fedify"; import { fedifyHook } from "@fedify/fedify/x/sveltekit"; const federation = createFederation<string>({ // Omitted for brevity; see the related section for details. }); // This is the entry point to the Fedify hook from the SvelteKit framework: export const handle = fedifyHook(federation, (req) => "context data");
robin's avatar
robin

@[email protected]

오늘에한일
fedify에 SvelteKit 지원을 추가했다
스벨트에 영광은 영원할것이다

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

@[email protected]

Fedify CLIの隠れた便利機能をご紹介!

• 賢いオブジェクト検索
• インタラクティブなインボックステスト
• 見やすいNodeInfo表示
• 柔軟なローカル開発
• シェル統合
• カスタムUser-Agentサポート(Fedify 1.3.0の新機能)

ActivityPubの実装をデバッグする際に、これらの機能が大変役立ちます!

詳細は記事をチェックしてみてください。

zenn.dev/hongminhee/articles/9

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

@[email protected]

Did you know the CLI can help debug federation?

Learn about hidden features like:

• Smart object lookup with content negotiation
• Interactive inbox testing with a web UI
• NodeInfo visualization
• Local development tunneling
• And more!

dev.to/hongminhee/hidden-gems-

Older →