Bridgy Fed
connects your web site
to Mastodon and the
fediverse.
Learn more...
Bridgy Fed turns your web site into its own fediverse account, visible in Mastodon and beyond. You can post, reply, like, repost, and follow fediverse accounts by posting on your site with microformats2 and sending webmentions. Bridgy Fed translates those posts into ActivityPub, and when people inside the fediverse respond, it sends those responses back to your site as webmentions.
This isn't syndication or POSSE! You don't need an account on Mastodon or anywhere else. Bridgy Fed makes your site a first class member of the fediverse. People there will see your posts directly from your site, and vice versa.
Bridgy Fed takes some technical know-how to set up, and there are simpler (but less powerful) alternatives. If you just want your site's posts to show up in the fediverse, without any other interactions, consider an RSS or Atom feed bot instead. Or, if you want to cross-post to an existing Mastodon account, try Bridgy.
- How do I set it up?
- How do I set up my profile?
- How do I update my profile?
- Where's my user page and dashboard?
- How do I verify my profile links (ie get green checks) in Mastodon?
- I hate this! How do I opt out?
- How do I post to the fediverse?
- Which of my posts will show up in the fediverse?
- Which fediverse apps are supported?
- How does it decide which parts of my posts to include?
- What's up with the visible fed.brid.gy links in my fediverse posts?
- How do I reply to a fediverse post?
- How do I favorite (aka like) or boost (aka repost) a fediverse post?
- How do I follow someone?
- How do I unfollow someone?
- How do I include an image in a post?
- How do I use hashtags?
- How do I @-mention someone?
- How do I edit an existing post?
- How do I delete a post?
- Can I publish just one part of a page?
- How do fediverse replies, likes, and other interactions show up on my site?
- How do I read my fediverse timeline/feed?
- Are there notifications?
- How can people on the fediverse find and follow me?
- How can I see what my posts look like inside the fediverse?
- Can I make my posts show up when people search for them in the fediverse?
- I tried it, and it didn't work!
- Who are you? Why did you make this?
- How much does it cost?
- What do you do with my data?
- How long has this been around?
- What are the terms of service?
- I found a bug! I have a feature request!
- I found a security vulnerability!
- What are Bridgy Fed's product and engineering values?
- How do the different protocols compare?
- How are the different protocols translated?
- How are activities routed?
- How are errors handled?
Setup
Usage
About
Development
- How do I set it up?
-
- Your site needs to support SSL. Bridgy Fed uses your domain as your identity, so it depends on SSL to prove that you own it.
- Configure your site to redirect these URL paths to the same paths on
https://fed.brid.gy/
, including query parameters: -
WordPress (self-hosted): install the Safe Redirect Manager plugin, then add these entries:
/.well-known/host-meta* => https://fed.brid.gy/.well-known/host-meta*
/.well-known/webfinger* => https://fed.brid.gy/.well-known/webfinger* - Known or Drupal: follow the Apache or nginx instructions below.
- Apache: add this to your
.htaccess
file:
RewriteEngine on RewriteBase / RewriteRule ^.well-known/(host-meta|webfinger).* https://fed.brid.gy/$0 [redirect=302,last]
(RewriteEngine on
is optional if you already have it earlier in your.htaccess
.RewriteBase /
is optional if you don't have any otherRewriteBase
directives, or if you put thisRewriteRule
inside an existingRewriteBase /
section.) - nginx: add this to your
nginx.conf
file, in theserver
section:
rewrite ^/\.well-known/(host-meta|webfinger).* https://fed.brid.gy$request_uri? redirect;
- Netlify: add this to your
netlify.toml
file.[[redirects]] from = "/.well-known/host-meta*" to = "https://fed.brid.gy/.well-known/host-meta:splat" status = 302 [[redirects]] from = "/.well-known/webfinger*" to = "https://fed.brid.gy/.well-known/webfinger" status = 302
- Add webmention support to your site. This is strongly recommended, but technically optional. You don't have to automate the webmentions to Bridgy Fed to federate your posts, and you don't have to accept the inbound webmentions that Bridgy Fed sends, but you'll have a much better experience if you do. Check out the IndieWeb wiki for instructions for your web server.
/.well-known/host-meta /.well-known/webfinger
Here are instructions for a few common web servers:
- How do I set up my profile?
-
Your site's fediverse profile comes from the microformats2 representative h-card on your site's home page. Here's a minimal example to set your name and a profile picture:
<span class="h-card"> <a class="u-url" rel="me" href="/">Alice Foo</a> <img class="u-photo" src="/me.jpg" /> </span>
You can use indiewebify.me to check your site's h-card interactively, but note that that doesn't check that it's representative. In the common case, this just means that your h-card needs a link to your home page with the
u-url
class. See the representative h-card spec for more details.If you want to set a header image, add a
u-featured
image to your h-card, eg:<img class="u-featured" src="/my-header.png" />
By default, your fediverse address will be
@yourdomain.com@yourdomain.com
. Many services (eg Mastodon) default to only showing the username, so this generally shows up as just@yourdomain.com
in posts, and the full address appears on hover.We recommend this for simplicity and predictability, for everyone else as well as you, but if you want a different username, you can set it by adding an
acct:
u-url link inside your h-card withusername@yourdomain.com
, eg:<a class="u-url" href="acct:alice@yourdomain.com"></a>
- How do I update my profile?
-
If you've changed the representative h-card on your site's home page, and you want to update your profile in Mastodon to match, click the button next to your domain on your user page. Alternatively, you can send a webmention from your home page to
https://fed.brid.gy/
. - Where's my user page and dashboard?
-
Enter your domain here to see your user page. It shows your site's current status, recent interactions, remote follow UI, and links to your timeline feeds in various formats.
- How do I verify my profile links (ie get green checks) in Mastodon?
-
Mastodon's verified profile links with ✅ green checks are fun! Follow these steps to get one on your Bridgy Fed profile:
- Add a
rel=me
link on your site that points tohttps://fed.brid.gy/r/https://[DOMAIN]/
for your domain, eghttps://fed.brid.gy/r/https://snarfed.org/
- Click the 🔄 button on your Bridgy Fed user page to update your profile on all of your followers' instances.
- Log into any Mastodon instance where you have an account.
- Search for your fediverse handle, eg
@snarfed.org@snarfed.org
. - Click on your fediverse user in the search results.
- Wait a minute or two (or ten 😐), then refresh the page. You should see a green check on the profile link for your web site.
When you're logged into a Mastodon instance, searching for your Bridgy Fed user triggers that instance to check and verify its profile link(s) in the background. This only works when you're logged in with a native Mastodon account. Also, each instance does this independently; verified links are not synched across instances.
- Add a
- I hate this! How do I opt out?
-
Sorry to hear it! Just put the text
#nobridge
or#nobot
in your profile bio, refresh your profile on your Bridgy Fed user page, and it will stop bridging your account. - How do I post to the fediverse?
-
Create a post with the
h-entry
microformat on your web site. Many web servers include this or compatible microformats automatically. The post can be a note, article, like, repost, reply, or follow. For example:<div class="h-entry"> <p class="e-content">Two naked tags walk into a bar. The bartender exclaims, "Hey, you can't come in here without microformats, this is a classy joint!"</p> <a class="u-bridgy-fed" href="https://fed.brid.gy/" hidden="from-humans"></a> </div>
Mastodon preserves HTML links and line breaks, but removes all other formatting and tags. Other fediverse sites vary in their HTML handling.
Then, include a link (optionally blank, and if so with a
hidden
attribute to be kind to screen readers and keyboard navigation users) tohttps://fed.brid.gy/
in that post and send Bridgy Fed a webmention. That webmention will trigger Bridgy Fed to forward your post into the fediverse. Your web server may send the webmention automatically if it supports them, or you can send it manually.(The
u-bridgy-fed
class isn't strictly necessary, but it's useful in some cases to prevent microformats2 parsers from interpreting the link as an impliedu-url
.) - Which of my posts will show up in the fediverse?
-
Only the ones you explicitly trigger with a webmention. Bridgy Fed doesn't automatically create posts in the fediverse based on your site's Atom feed, HTML, or anything else. It only create posts in the fediverse on an opt in basis, per post, via webmention.
- Which fediverse apps are supported?
-
Lots! Mastodon, Friendica, Misskey, PeerTube, Hubzilla, and more. We're working on interoperation with others; see GitHub issues with the
app
label for details. - How does it decide which parts of my posts to include?
-
Magic! Most major blog engines and CMSes are supported out of the box, no setup necessary. Bridgy Fed looks for microformats in your HTML, first the microformats2
e-content
class and then the legacyentry-content
class. It also understands more advanced microformats2 classes likein-reply-to
,u-like-of
,u-repost-of
, andu-photo
.Bridgy Fed sends the full contents of all posts, specifically everything inside
e-content
, to the fediverse. However, not all fediverse apps currently show the full contents of all posts.For example, text-based posts fall into two broad buckets: short notes, eg tweets and toots, and longer articles, eg blog posts. In the IndieWeb, we differentiate based on whether the post has a title: articles generally have titles, notes don't.
Mastodon currently shows the full text of notes, but for articles, it only shows their titles and a link to the full article. This is because Mastodon and most other fediverse apps are designed primarily for smaller notes, not longer articles.
- What's up with the visible fed.brid.gy links in my fediverse posts?
-
These can happen for a couple reasons. For articles, this is expected behavior, as described above. The link is a Bridgy Fed URL that redirects to the original post on your web site. This is because Mastodon requires ActivityPub (ie fediverse) object URLs to use the same domain that serves them, which in this case is fed.brid.gy. We know it's awkward; sorry for the ugliness!
Otherwise, this may be the invisible fed.brid.gy link that's required to trigger Bridgy Fed. Mastodon will show a preview of links even if their text is blank, so if your link is inside your
e-content
microformats2 element, that's probably what's happening. You can prevent that by moving it outside ofe-content
. It can go anywhere in your HTML! - How do I reply to a fediverse post?
-
Put the reply in a new post on your web site, and include a link to the fediverse post you're replying to with class
u-in-reply-to
, as if you were publishing a normal IndieWeb reply. For example:<div class="h-entry"> <p class="e-content">Highly entertaining. Please subscribe me to your newsletter.</p> <a class="u-in-reply-to" href="https://indieweb.social/@tchambers/109243684867780200"></a> <a class="u-bridgy-fed" href="https://fed.brid.gy/" hidden="from-humans"></a> </div>
- How do I favorite (aka like) or boost (aka repost) a fediverse post?
-
Favoriting and boosting are almost exactly the same as replying. The only difference is that you use
u-like-of
for a favorite/like oru-repost-of
for a boost/repost.<a class="u-like-of" href="https://indieweb.social/@tchambers/109374703563569354"></a>
<a class="u-repost-of" href="https://cosocial.ca/@evan/110290575042195305"></a>
- How do I follow someone?
-
If your web site supports
IndieAuth, go to your user page, click the Following link, then enter the address of the account you want to follow.
You can also follow someone by posting an IndieWeb follow on your site, including the
u-follow-of
microformats2 class, and sending a webmention to Bridgy Fed. Your site may do that automatically if it supports webmentions. For example:<div class="h-entry"> I'm now following <a class="u-follow-of" href="https://mastodon.social/@adactio">@adactio@mastodon.social</a>! <a class="u-bridgy-fed" href="https://fed.brid.gy/" hidden="from-humans"></a> </div>
This method doesn't require IndieAuth, and it can be automated. - How do I unfollow someone?
-
Go to your user page, click the Following link, find the account you want to unfollow, and click the X next to their address. Like following, this requires your web site to support
IndieAuth.
- How do I include an image in a post?
-
Use
<img class="u-photo">
for the image in your post. For example:<img class="u-photo" src="/full_glass.jpg" /> I love scotch. Scotchy scotchy scotch.
-
Use
p-category
and link the hashtag to a fully qualified URL. (Any URL you want!) Fediverse sites like Mastodon will generally rewrite the link to point to a search for that hashtag on the local instance. For example:<div class="h-entry"> <p class="e-content"> chasing the fun laser <a href="https://indieweb.social/tags/caturday" class="p-category">#caturday</a> </p> </div>
The leading
#
character on the hashtag text is optional. If you don't include the hashtag ine-content
, or include it but not inside an<a>
link, fediverse sites won't add the hashtag text or link themselves, but your post will still be indexed in searches for that hashtag. - How do I @-mention someone?
-
Include a link to their fediverse profile in your post's content with their full handle as the text, eg
@adactio@mastodon.social
. For example:Hi <a href="https://mastodon.social/@adactio">@adactio@mastodon.social</a>!
The link and text are both necessary!
- How do I edit an existing post?
-
Edit the post on your web site, then send another webmention to Bridgy Fed for it. Bridgy Fed will refetch the post and send an
Update
activity for it to the fediverse. - How do I delete a post?
-
First, delete the post on your web site, so that HTTP requests for it return 410 Gone or 404 Not Found. Then, send another webmention to Bridgy Fed for it. Bridgy Fed will refetch the post, see that it's gone, and send an
Delete
activity for it to the fediverse. - Can I publish just one part of a page?
-
If that HTML element has its own id, then sure! Just put the id in the fragment of the URL that you publish. For example, to publish the
bar
post here:<div id="a" class="h-entry">foo</div> <div id="b" class="h-entry">bar</div> <div id="c" class="h-entry">baz</div>
...just add the id to your page's URL in a fragment, e.g.
http://site/post#b
here. - How do fediverse replies, likes, and other interactions show up on my site?
-
To receive likes, reposts, replies, @-mentions, and follows from the fediverse, just make sure your site accepts webmentions! Bridgy Fed translates those interactions and sends them to your site as webmentions. The source URL will usually be a proxy page on
fed.brid.gy
. For best results, make sure your webmention handler detects and handlesu-url
links. - How do I read my fediverse timeline/feed?
-
Your user page has links to your fediverse timeline/feed, ie posts from people you follow, in HTML, Atom, and RSS formats. Add them to your feed reader or read them in your browser!
- Are there notifications?
-
Yes! Your user page has a feed of your notifications - mentions, replies, likes, reposts, follows, etc - in HTML, RSS, and Atom formats, which you can subscribe to in any reader.
- How can people on the fediverse find and follow me?
-
They can search for your web site in any Mastodon instance! Often you can just enter your domain, eg
yourdomain.com
, in any Mastodon search box. If that doesn't work, try your full fediverse address, eg@yourdomain.com@yourdomain.com
. This can be finicky now and then, but it usually works.Your user page has a "Following" link that shows you everyone on the fediverse who's currently following you. It also has a "remote follow" form that lets people enter their fediverse address and follow you directly.
- How can I see what my posts look like inside the fediverse?
-
This varies by fediverse app. For Mastodon, open your list of followers in Bridgy Fed and click on one to open their profile. Then, inside that Mastodon instance, search for your site's address, click on it in the search results, and you'll see your fediverse profile and all of your posts that were delivered to that instance. This may not be all of them, depending on how long and when people on that instance have been following you.
This general process should often work in other fediverse apps too.
Note: in Mastodon, each of your posts on a given instance will have a permalink inside that instance, eg mastodon.social/@snarfed.org@snarfed.org/109729052169033033, but those permalinks only go to Mastodon if you're logged into that instance. If you're not, they redirect to the original post on your site.
- Can I make my posts show up when people search for them in the fediverse?
-
Yes! Add this line of HTML to each post that you publish with Bridgy Fed and want to be searchable, replacing
[URL]
with that post's URL:<link rel="alternate" type="application/activity+json" href="https://fed.brid.gy/r/[URL]">
Search is intentionally limited in Mastodon and much of the overall fediverse, so this won't index the full text of your posts, but it will make them show up in search results when you search for your post's full URL, which people commonly do in the fediverse to find and interact with posts.
- I tried it, and it didn't work!
-
Check out your user page! It detects and describes common problems with your setup, and it shows your recent interactions and detailed logs.
- Who are you? Why did you make this?
-
I'm Ryan Barrett. I'm just a guy who likes the web and owning my data.
- How much does it cost?
-
Nothing! Bridgy Fed is small, and it doesn't cost much to run. We don't need donations, promise.
If you really want to contribute, file an issue or send a pull request, or donate to the IndieWeb!
- What do you do with my data?
-
Nothing! Bridgy Fed isn't a business, and never will be, so we don't have the same motivations to abuse your data that other services might. More concretely, Bridgy Fed won't ever send you email, it stores as little of your PII (personally identifiable information) as possible, and it never has access to any of your passwords.
- How long has this been around?
-
I started thinking about bridging federated social networks and peer to peer networks when I discovered them in the early 2000s. I started talking about bridging them to the IndieWeb in 2016, led a session on it at IndieWeb Summit in July 2017, wrote up concrete designs soon after, started working on Bridgy Fed in August 2017, and launched it on October 22, 2017.
- What are the terms of service?
-
Bridgy Fed's terms of service are very simple. You agree not to deliberately attack, breach, or otherwise harm the service. If you manage to access private keys or other private data, you agree to report the vulnerability and not use or disclose that data.
Otherwise, you may use the service for any purpose you see fit. However, we may terminate or block your access for any reason, or no reason at all. (We've never done this, and we expect we never will. Just playing it safe.)
Do you an administer an instance or other service that Bridgy Fed interacts with? If you have any concerns or questions, feel free to file an issue!
- I found a bug! I have a feature request!
-
Great! Please file it in GitHub. Thank you!
- I found a security vulnerability!
-
Oof. Thank you for reporting it! Please send details to security@brid.gy. We may provide monetary awards for reports of significant vulnerabilities, eg reading or modifying stored access tokens, if you follow these rules:
- Vulnerabilities must be in the application itself, not unrelated services like email (eg SPF/DKIM/DMARC).
- Out of scope: rate limiting, XSS/CSRF attacks (Bridgy Fed has no authenticated sessions or private data accessible to users),
/admin/*
pages. - Public user data is intentionally public. That's not a vulnerability.
- No automated fuzzing, DoSes, or other high volume traffic. We block this traffic, and it will disqualify you from any possible award.
Otherwise, the code is open source, feel free to try to break in, let us know if you succeed!
- What are Bridgy Fed's product and engineering values?
-
What's important to Bridgy Fed and its development? How do we make technical and design decisions and prioritize work? One way to do this is to explicitly enumerate its product and engineering values, along with their priorities. Bryan Cantrill describes this well.
As far as I can tell, Bridgy Fed's top product and engineering values are:
- Quality: expected functionality works consistently, with minimal bugs, surprises, or outages.
- Functionality: common features and use cases are supported as broadly and comprehensively as possible.
Bridgy Fed's second tier of product and engineering values are:
- Safety and security: Bridgy Fed minimizes harm to its users. The primary way this currently manifests is that it only bridges fully public data, and it enables and supports the networks' own moderation features (blocking, reporting, etc). It also uses modern secure coding and ops practices to minimize vulnerabilities that could expose private keys or other sensitive information.
- Accessibility: users should mostly fall into a "pit of success" with minimal work on their end. Discovering and following users on other networks should be as easy as possible. After that, all interactions should work automatically, trasnparently.
- Transparency: it should be easy for users to understand what Bridgy Fed is doing. This includes per-user dashboard pages in the web UI, verbose public logs, and comprehensive documentation.
- Scalability: we want to handle as much usage as we receive, as automatically as possible. This doesn't mean that Bridgy Fed is designed to handle millions of users today, just that it could be, and that we'd prioritize it.
- How do the different protocols compare?
-
Here's a table showing how they stack up on a number of factors. It's obviously oversimplified, but hopefully still right in spirit, focusing on how they're deployed and used in the real world. For example, identity in ActivityPub is technically URL-based, but in practice the fediverse uses WebFinger
user@domain
identifiers more or less universally, so the table reflects that. - How are the different protocols translated?
-
Here are internal details on how Bridgy Fed translates user identity and events between protocols, including some like Nostr and Bluesky/AT Protocol that aren't launched here, or even fully implemented or thought through yet. Caveat hacker!
In the tables below, BF is Bridgy Fed. Green parts have been implemented and running here for years, the rest are still in the early design phase.
Here's how we (hope to) translate user identity between protocols. Specifically, each cell shows how a user in a given column is identified to the protocol in a given row. These identities uniquely identify users, and are intended primarily to be machine readable and usable. (Scroll down for the equivalent table for translating human-meaningful user handles.)
Note that Bridgy Fed generates some of these ids itself behind the scenes, notably
did:plc
s for Bluesky/AT Protocol and npub public keys for Nostr.Web ActivityPub AT Protocol Nostr Web URL - Fediverse profile URL https://bsky.app/profile/[did]
(can we avoid hard-coding bsky.app?)NIP-05 domain or BF user page WebFinger address @[domain]@web.brid.gy
- @[handle]@bsky.brid.gy
@[NIP-05 or npub]@nostr.brid.gy
ActivityPub actor https://web.brid.gy/ap/[domain]
- https://bsky.brid.gy/ap/[did]
https://nostr.brid.gy/ap/[npub]
AT Protocol did:plc
did:plc
- did:plc
Nostr npub
npub
npub
- Here's how we (hope to) translate user handles (aka usernames) between protocols. Each cell shows how a user's handle in a given column is translated to the protocol in a given row. These handles are human-chosen, human-meaningful, generally unique, but may not be the primary machine-usable ids in each protocol. Scroll down to the next table for examples, up to the previous table for machine-usable ids.
Basic is the default, enhanced requires extra setup on the user's part (or their fediverse instance's) to forward some of their
/.well-known
HTTP requests to Bridgy Fed.Web ActivityPub AT Protocol Nostr Web - Fediverse profile URL bare handle NIP-05 domain or BF user page AP address basic @[domain]@web.brid.gy
- @[handle]@bsky.brid.gy
@[NIP-05 or npub]@nostr.brid.gy
enhanced @[domain]@[domain]
@[handle]@[handle]
@[NIP-05]
ATP handle basic [domain].web.brid.gy
[username].[instance].ap.brid.gy
- [NIP-05 or npub].nostr.brid.gy
(convert@
to.
)enhanced bare domain [username].[instance]
domainbare NIP-05 domain
(_
username)Nostr NIP-05 domain basic [domain]@web.brid.gy
[username].[instance]@ap.brid.gy
[handle]@bsky.brid.gy
- enhanced bare domain [username]@[instance]
bare handle Here are concrete examples:
Web me.com
ActivityPub @me@instance.com
AT Protocol me.com
Nostr me@domain.com
[_@]me.com
Web - https://instance.com/@me
(varies by instance)me.com
? me.com
ActivityPub basic @me.com@web.brid.gy
- @me.com@bsky.brid.gy
@me[domain.]com@nostr.brid.gy
enhanced @me.com@me.com
@me.com@me.com
@me@domain.com
@me.com@me.com
AT Protocol basic me.com.web.brid.gy
me.instance.com.ap.brid.gy
- me.[domain.]com.nostr.brid.gy
enhanced me.com
me.instance.com
me.[domain.]com
Nostr basic me.com@web.brid.gy
me.instance.com@ap.brid.gy
me.com@bsky.brid.gy
- enhanced [_@]me.com
[_@]me.instance.com
[_@]me.com
Here's how we (hope to) infer the protocol for any string id. In the Format column, green parts are deterministic, ie they conclusively determine that a matching id belongs to the protocol, and yellow parts are ambiguous, ie a matching id may or may not belong to the protocol:
Example(s) Format Network discovery Web user https://snarfed.org/ http(s) URL with empty path HTTP GET
succeeds and returns HTMLobject https://snarfed.org/2023-05-26_50328 http(s) URL with non-empty path ActivityPub user https://indieweb.social/users/snarfed http(s) URL HTTP GET
with AS2 conneg returns valid AS2 withActor type
object https://mitra.social/post/01885fad HTTP GET
with AS2 conneg returns valid AS2 withnon-Actor type
AT Protocol user did:plc:abc123
did:web:snarfed.org
did:plc
ordid:web:
prefix
(TODO: domain handles) resolve did:plc
,
resolvedid:web
object at://did:plc:asdf/post/abc-123
at://
URIcom.atproto.repo.getRecord
XRPCNostr user abc123...
(32 chars)
npub10hx886...
(bech32)32 char hex or npub
prefix(TODO: NIP-05 domains) NIP-65 or NIP-39 lookup object def456...
(32 chars)
nevent10hx886...
(bech32)
note10hx886...
(bech32)32 char hex or nevent
,note
, etc prefixREQ
requestHere's how we (hope to) translate events and operations between protocols, both inbound to and outbound from Bridgy Fed:
Web ActivityPub AT Protocol Nostr User discovery inbound serve h-card
on BF user pagebasic: serve WebFinger and AP actor on fed.brid.gy
enhanced: user's site serves and redirects WebFinger to fed.brid.gyresolve DID, serve DID document with fed.brid.gy PDS NIP-39 (kind 0) query to BF (or other?) relay User discovery outbound Fetch home page, parse h-card
look up WebFinger, fetch AP actor resolve DID, subscribe to PDS repo, extract profile object? discover user's relays with NIP-65, query NIP-39 to get profile Publish inbound webmention to fed.brid.gy deliver to fed.brid.gy inbox, user or shared subscribe to user's PDS repo on fed.brid.gy publish event to BF relay Publish outbound serve on BF user page followings h-feed
deliver to recipient's inbox serve repo diff via sync
XRPCs to subscribing BGSesserve to subscribers Follow inbound users: UI on BF user page
code: webmention withu-follow-of
Follow
activity delivered to BF user inboxreceive sync.subscribeRepos
?user's client sends REQ
to BF relayFollow outbound webmention with BF proxy HTML page as source deliver Follow
to followee's inboxcall sync.subscribeRepos
on followee's PDS?discover followee's relay(s) with NIP-65, send them a REQ
Response inbound webmention to a BF proxy page Create
,Like
,Announce
delivered to BF user inboxresponse object received from a subscribed repo?
(what if it's from a user we don't subscribe to?)NIP-10 response event received at BF relay or other relay Response outbound same as follow outbound, with the corresponding response data type - How are activities routed?
-
A bridge does more than just translate protocols and formats. It processes activities (events) based on domain-specific logic and semantics. The domain Bridgy Fed currently handles is public social microblogging, the kind popularized by Twitter. There are many other related social domains, with fuzzy boundaries and lots of overlap, eg forums (Reddit), questions and answers (StackOverflow), project trackers (GitHub), and many more, but here we're currently focused on microblogging.
Even within that domain, behavior logic varies. Twitter follows are one way, but Facebook friends are bidirectional. Your Bluesky timeline (skyline) includes your followings' replies, but your fediverse timeline generally doesn't. LinkedIn...honestly I have no clue how LinkedIn works, but I'm sure it has its own logic, workfluencers and all.
Here's what Bridgy Fed's activity router does. I've tried to make it follow "least common denominator" logic, ie do the most common and least surprising thing, and I've explicitly tried not to innovate or invent anything new here. It's a bridge, not a product, after all.
When Bridgy Fed receives a... The router will... follow - deliver the follow activity to the followee
- automatically send an accept activity to the follower
(we may eventually add UX for this) - store the follower locally
- generate a local notification to the follower
unfollow - deliver the unfollow activity to the followee
- deactivate the locally stored follower
new post - deliver to all active stored followers
- store the post locally
update post - deliver to all active stored followers
- update the locally stored post
delete post - deliver to all active stored followers
- mark the locally stored post deleted
delete actor - deactivate their locally stored follows, to and from
reply - deliver to the original post
- store locally
- generate a local notification to the original post's author
repost - deliver to all active stored followers
- store locally
- generate a local notification to the original post's author
like - deliver to the original post
- generate a local notification to the original post's author
- How are errors handled?
-
"It's complicated." ...well, at least a bit. There are different philosophies on how to architect request handling and error propagation in these kinds of server-to-server protocols.
One common bit of received wisdom is to handle all requests asynchronously, in the background. Do minimal request validation synchronously, if necessary, then return HTTP 202 (or 201) and enqueue the request in a background task queue to be processed offline. This is widespread in ActivityPub implementations, for example. Webmention even recommends it as a SHOULD!
Upon receipt of a POST request containing the source and target parameters, the receiver SHOULD verify the parameters (see Request Verification below) and then SHOULD queue and process the request asynchronously, to prevent DoS attacks.
It's a good idea, but it has drawbacks. Most importantly, it hides errors. Sending side implementations always receive HTTP 202 responses, even when their requests fail in the background, and there's no standard or widely implemented way to get more information or debug. Webmention nods to this and says receivers can return a per-request status URL in the
Location
response header, but that's not widely implemented, and ActivityPub has no corresponding mechanism. This makes development and interop materially harder, especially in these protocols' loosely connected ecosystems. Mastodon's issue tracker, for example, is full of issues complaining "Mastodon isn't working with my code, but I can't tell why!"Bridgy Fed currently takes a compromise position. It handles most requests synchronously, blocks on delivering them to the destination protocol, and propagates any errors back to the sender with the appropriate HTTP response status code and body (often JSON). Delivering posts to ActivityPub followers is one exception; it currently delivers to inboxes serially, so it often takes many minutes, which is uncomfortably long for many HTTP clients.
Converting to webmention is another exception. Bridgy Fed uses webmentions and microformats2 to provide social interactions for web sites, but unlike with other protocols, it doesn't require web sites to support them. So, Bridgy Fed doesn't currently convert webmention failures (or lack of support) to errors in other protocols. It records those failures, and shows them in the UI on your user page, but returns success to the sending side in its own protocol.
Setup
Usage
About
Development
Other possible values include maintainability, operability, feature velocity, innovation, debuggability, performance, efficiency, standards compliance, user growth, and more. Those can all be good, and we may aim at some of them too, but less than the explicitly chosen values above.