Fedify: an ActivityPub server framework's avatar

Fedify: an ActivityPub server framework

@fedify@hollo.social · 8 following · 724 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

내일 서울 서초구 오픈업 플레이그라운드에서 이뤄지는 Open Contribution Jam 2024에 메인테이너(@hongminhee)가 참여합니다. Fedify에 기여해보고 싶은 분들은 와주시면 메인테이너가 성심껏 도와드리겠습니다! 자세한 행사 정보는 아래 링크를 참고하시면 됩니다.

https://festa.io/events/6342

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

@fedify@hollo.social

We are going to add instrumentation support for to . What kind of spans or events would you like to be instrumented?

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

@fedify@hollo.social

Have you heard of Val Town? Val Town is a kind of code pastebin + serverless function.

Actually, works just fine with Val Town. Here's a piece of ActivityPub software, implemented in about 170 lines of code, running on Val Town. Of course, it's built with Fedify!

Give it a follow @demo, and it will follow you back.

Curious to see how it was implemented? Check out the source code!

https://www.val.town/v/minhee/FedifyOnValTown

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

@fedify@hollo.social

Starting with 1.3.0, you'll be able to use different message queues for incoming and outgoing activities!

https://unstable.fedify.dev/manual/mq#using-different-message-queues-for-different-tasks

Using different message queues for different tasks

This API is available since Fedify 1.3.0.

In some cases, you may want to use different message queues for different tasks, such as using a faster-but-less-persistent queue for outgoing activities and a slower-but-more-persistent queue for incoming activities. To achieve this, you can pass FederationQueueOptions to the CreateFederationOptions.queue option.

For example, the following code shows how to use a PostgresMessageQueue for the inbox and a RedisMessageQueue for the outbox:

const federation = createFederation<void>({
  queue: {
    inbox: new PostgresMessageQueue(
      postgres("postgresql://user:pass@localhost/db")
    ),
    outbox: new RedisMessageQueue(() => new Redis()),
  },
  // ... other options
});

Or, you can provide a message queue for only the inbox or outbox by omitting the other:

const federation = createFederation<void>({
  queue: {
    inbox: new PostgresMessageQueue(
      postgres("postgresql://user:pass@localhost/db")
    ),
    // outbox is not provided; outgoing activities will not be queued
  },
  // ... other options
});
ALT text detailsUsing different message queues for different tasks This API is available since Fedify 1.3.0. In some cases, you may want to use different message queues for different tasks, such as using a faster-but-less-persistent queue for outgoing activities and a slower-but-more-persistent queue for incoming activities. To achieve this, you can pass FederationQueueOptions to the CreateFederationOptions.queue option. For example, the following code shows how to use a PostgresMessageQueue for the inbox and a RedisMessageQueue for the outbox: const federation = createFederation<void>({ queue: { inbox: new PostgresMessageQueue( postgres("postgresql://user:pass@localhost/db") ), outbox: new RedisMessageQueue(() => new Redis()), }, // ... other options }); Or, you can provide a message queue for only the inbox or outbox by omitting the other: const federation = createFederation<void>({ queue: { inbox: new PostgresMessageQueue( postgres("postgresql://user:pass@localhost/db") ), // outbox is not provided; outgoing activities will not be queued }, // ... other options });
たいにゃんぷ :tai_sushi::kogane_doya:'s avatar
たいにゃんぷ :tai_sushi::kogane_doya:

@taichan@mi.taichan.site

fedify使ったAPubリレーの実装組みたいと思ってたの急に思い出した

^Kur0den\d{4}$ :irai_houki_tyuu:'s avatar
^Kur0den\d{4}$ :irai_houki_tyuu:

@kur0den0010@chpk.kur0den.net

暇なときに読もうと思ってもってきたfedify本を読んでる
物理本、やっぱり良き

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

@monaco_koukoku@fedibird.com

Fedify本、ついに完走!
他鯖のフォロイーの投稿を読めるようになったぞい :blobcatalt:

monaco koukoku's microblog
フォローボタン・投稿ボタン・マイクロブログのタイムラインがある。
ALT text detailsmonaco koukoku's microblog フォローボタン・投稿ボタン・マイクロブログのタイムラインがある。
もちもちずきん :teto_zuho: 🍆's avatar
もちもちずきん :teto_zuho: 🍆

@Yohei_Zuho@mstdn.y-zu.org

帰ったらFedifyの本読むんや

段風桜 Dampuzakura(わかいい)'s avatar
段風桜 Dampuzakura(わかいい)

@dampuzakura@fedibird.com

じゃあもうそれこそFedifyでPixelfedみたいなやつ作るか

もちもちずきん :teto_zuho: 🍆's avatar
もちもちずきん :teto_zuho: 🍆

@Yohei_Zuho@mstdn.y-zu.org

Fedify使ってGoogle+そっくりさん作りたいかもしれない

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

@hongminhee@fosstodon.org

Star History of , , and :

star-history.com/#dahlia/fedif

Star History of Fedify, Hollo, and LogTape.
ALT text detailsStar History of Fedify, Hollo, and LogTape.
Renaud Chaput's avatar
Renaud Chaput

@renchap@oisaur.com · Reply to Renaud Chaput's post

@Montreal_Weather But if you plan to have this many bots, I would encourage you to not rely on Mastodon for those bots, but implement your own (very simple) ActivityPub software, it will be much easier for you.
For example see shkspr.mobi/blog/2024/02/a-tin, or fedify.dev for NodeJS

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

@monaco_koukoku@fedibird.com

ようやくFedifyを触り始めた。WSL+DockerでNode.jsの環境をサクッと作って、コードはVSCodeで書けるようにした。後から環境設定が取っ散らからなくて良さそう。

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

@fedify@hollo.social

Flyers for and to be used at an open source event in Japan!

https://mstdn.y-zu.org/@Yohei_Zuho/113440544215822210

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

@fedify@hollo.social · Reply to Sebastian Lasse's post

@sl007 Okay, we're adding a mention for it!

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

@hongminhee@fosstodon.org

for @loops!

The terminal screen of the output of the `fedify node loops.video` command:

loops.video
===========
Software:
  loops v0.1.0
  https://joinloops.org/
  https://github.com/px-loops/loopd
Protocols:
  activitypub
Users:
  8,726 (total)
  8,726 (active half year)
  8,726 (active month)
Local posts:
  1,195
Local comments:
  819
Open registrations:
  Yes
ALT text detailsThe terminal screen of the output of the `fedify node loops.video` command: loops.video =========== Software: loops v0.1.0 https://joinloops.org/ https://github.com/px-loops/loopd Protocols: activitypub Users: 8,726 (total) 8,726 (active half year) 8,726 (active month) Local posts: 1,195 Local comments: 819 Open registrations: Yes
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@hongminhee@fosstodon.org

for .social! :pixelfed:

The terminal screen of the output of the `fedify node pixelfed.social` command:

pixelfed.social
===============
Software:
  pixelfed v0.12.3
Protocols:
  activitypub
Users:
  124,264 (total)
  22,376 (active half year)
  7,212 (active month)
Local posts:
  35,773,844
Local comments:
  0
Open registrations:
  No
ALT text detailsThe terminal screen of the output of the `fedify node pixelfed.social` command: pixelfed.social =============== Software: pixelfed v0.12.3 Protocols: activitypub Users: 124,264 (total) 22,376 (active half year) 7,212 (active month) Local posts: 35,773,844 Local comments: 0 Open registrations: No
💜 Wysteria 🪷🪷🪷's avatar
💜 Wysteria 🪷🪷🪷

@wysteriary.art@bsky.brid.gy

neofetch, but for ActivityPub servers #FedifyNode

Screenshot of the terminal output of the fedify node command, which resembles Neofetch. Output:

baraag.net
==========
Software:
  mastodon v4.3.1
Protocols:
  activitypub
Users:
  294,891 (total)
  66,290 (active half year)
  44,517 (active month)
Local posts: 
  14,734,899
Local comments:
  0
Open registrations:
  No
ALT text detailsScreenshot of the terminal output of the fedify node command, which resembles Neofetch. Output: baraag.net ========== Software: mastodon v4.3.1 Protocols: activitypub Users: 294,891 (total) 66,290 (active half year) 44,517 (active month) Local posts: 14,734,899 Local comments: 0 Open registrations: No
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social · Reply to Sebastian Lasse's post

@sl007 That's good idea! We will add a list of projects that use Fedify soon!

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

@fedify@hollo.social

Starting with 1.3.0, you can customize the User-Agent header for every HTTP request that Fedify makes.

https://unstable.fedify.dev/manual/federation#useragent

userAgent

This API is available since Fedify 1.3.0.

The options for making User-Agent header in the HTTP requests that Fedify makes. By default, it contains the name and version of the Fedify library, and the name and version of the JavaScript runtime, e.g.:

Fedify/1.3.0 (Deno/2.0.4)
Fedify/1.3.0 (Node.js/v22.10.0)
Fedify/1.3.0 (Bun/1.1.33)

You can customize the User-Agent header by providing options like software and url. For example, if you provide the following options:

{
  software: "MyApp/1.0.0",
  url: "https://myinstance.com/"
}

The User-Agent header will be like:

MyApp/1.0.0 (Fedify/1.3.0; Deno/2.0.4; +https://myinstance.com/)

Or, you can rather provide a custom User-Agent string directly instead of an object for options.
ALT text detailsuserAgent This API is available since Fedify 1.3.0. The options for making User-Agent header in the HTTP requests that Fedify makes. By default, it contains the name and version of the Fedify library, and the name and version of the JavaScript runtime, e.g.: Fedify/1.3.0 (Deno/2.0.4) Fedify/1.3.0 (Node.js/v22.10.0) Fedify/1.3.0 (Bun/1.1.33) You can customize the User-Agent header by providing options like software and url. For example, if you provide the following options: { software: "MyApp/1.0.0", url: "https://myinstance.com/" } The User-Agent header will be like: MyApp/1.0.0 (Fedify/1.3.0; Deno/2.0.4; +https://myinstance.com/) Or, you can rather provide a custom User-Agent string directly instead of an object for options.
wolf aliceif's avatar
wolf aliceif

@aliceif@hollo.x27.one · Reply to aliceif's post

@aliceif

console output for fedify node hollo.x27.one
on the left, an ascii art version of the orange on black x27 server icon
on the right, information

Software:
  hollo v0.2.0
  https://docs.hollo.social/
  https://github.com/dahlia/hollo
Protocols:
  activitypub
Outbound services:
  atom1.0
Users:
  2 (total)
  1 (active half year)
  1 (active month)
Local posts:
  19
Local comments:
  16
Open registrations:
  No
ALT text detailsconsole output for fedify node hollo.x27.one on the left, an ascii art version of the orange on black x27 server icon on the right, information Software: hollo v0.2.0 https://docs.hollo.social/ https://github.com/dahlia/hollo Protocols: activitypub Outbound services: atom1.0 Users: 2 (total) 1 (active half year) 1 (active month) Local posts: 19 Local comments: 16 Open registrations: No
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

Starting with 1.3.0, you can customize the User-Agent header for every HTTP request that Fedify makes.

https://unstable.fedify.dev/manual/federation#useragent

userAgent

This API is available since Fedify 1.3.0.

The options for making User-Agent header in the HTTP requests that Fedify makes. By default, it contains the name and version of the Fedify library, and the name and version of the JavaScript runtime, e.g.:

Fedify/1.3.0 (Deno/2.0.4)
Fedify/1.3.0 (Node.js/v22.10.0)
Fedify/1.3.0 (Bun/1.1.33)

You can customize the User-Agent header by providing options like software and url. For example, if you provide the following options:

{
  software: "MyApp/1.0.0",
  url: "https://myinstance.com/"
}

The User-Agent header will be like:

MyApp/1.0.0 (Fedify/1.3.0; Deno/2.0.4; +https://myinstance.com/)

Or, you can rather provide a custom User-Agent string directly instead of an object for options.
ALT text detailsuserAgent This API is available since Fedify 1.3.0. The options for making User-Agent header in the HTTP requests that Fedify makes. By default, it contains the name and version of the Fedify library, and the name and version of the JavaScript runtime, e.g.: Fedify/1.3.0 (Deno/2.0.4) Fedify/1.3.0 (Node.js/v22.10.0) Fedify/1.3.0 (Bun/1.1.33) You can customize the User-Agent header by providing options like software and url. For example, if you provide the following options: { software: "MyApp/1.0.0", url: "https://myinstance.com/" } The User-Agent header will be like: MyApp/1.0.0 (Fedify/1.3.0; Deno/2.0.4; +https://myinstance.com/) Or, you can rather provide a custom User-Agent string directly instead of an object for options.
Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@fedify@hollo.social

We're fixing all HTTP requests from Fedify to include the proper User-Agent header.

Poes's avatar
Poes

@poes@bsd.cafe

single file activity pub:

1. gitlab.com/edent/activity-bot/ from @Edent
2. val.town/v/minhee/FedifyOnValT from @fedify@holo.social

(仮)'s avatar
(仮)

@kakkokari_gtyih@misskey.io

origin指定で自動的にNodeinfoを取ってきてパースするとか普通に便利な機能が多い

RE:
https://misskey.io/notes/a04wampe1y1509us

(仮)'s avatar
(仮)

@kakkokari_gtyih@misskey.io

fedify、既存のアプリにサクっとAP対応させるのに便利かもしれない

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

@fedify@hollo.social

Have you heard of Val Town? Val Town is a kind of code pastebin + serverless function.

Actually, works just fine with Val Town. Here's a piece of ActivityPub software, implemented in about 170 lines of code, running on Val Town. Of course, it's built with Fedify!

Give it a follow @demo, and it will follow you back.

Curious to see how it was implemented? Check out the source code!

https://www.val.town/v/minhee/FedifyOnValTown

네이버 타이머's avatar
네이버 타이머

@maka@social.maka.nagoya

Fedify lookup 생각보다 유용해 보이긴 하는데
(이거저거 들쑤셔볼때 액터 사이닝 안되어있어서 존나귀찮은적 많음)

맹꽁이's avatar
맹꽁이

@sunwoo1524@pointless.chat

심심해서 포인트리스 fedify node -b로 출력해봤더니 파비콘 다 깨짐 ㅋㅋㅋㅋㅋㅋ
그리고 포인트리스 꽤 큰 인스턴스였구나
@Native

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

@fedify@hollo.social

We've added the build guide to the CONTRIBUTING.md docs in the repository. We hope this is helpful for those who want to contribute to Fedify!

https://github.com/dahlia/fedify/blob/main/CONTRIBUTING.md#build

← Newer
Older →