Author: @tree.fail
Warning
This is the Draft, WiP - Work in progress
Currently, PDS (Personal Data Server) and all its repositories (or accounts) is hard-fixed to a single "Network" (which is bundle of AppView, Relay & Moderation service). This proposal is to enable the use of many different separate "Networks", which will be configured on the individual repository (account) level.
These modifications will allow to use the current Bluesky apps (mobile, web, etc.) and lexicons alternatively with other microblogging providers (or protocols). Closed communities can be created, with their own moderation and independent of the rules and conditions of the Bluesky PBC.
native- default AT Protocol interface through AppView, Relay and Moderation Servicecustom- non-native network, for example bridged Nostr or Mastodon (ActivityPub) client
{
"lexicon": 1,
"id": "com.atproto.repo.networks",
"defs": {
"main": {
"type": "record",
"description": "A declaration of a connected AT Protocol networks.",
"key": "literal:self",
"record": {
"type": "array",
"items": {
"name": { "type": "string", "maxLength": 64 },
"type": { "type": "string", "enum": [ "native", "custom" ] },
"endpoints": {
"type": "object",
"properties": {
"appview": { "type": "string", "format": "uri" },
"appview:did": { "type": "string", "format": "did" },
"relay": { "type": "string", "format": "uri" },
"relay:did": { "type": "string", "format": "did" },
"moderation": { "type": "string", "format": "uri" },
"moderation:did": { "type": "string", "format": "did" }
}
},
"default": { "type": "boolean" },
"createdAt": { "type": "string", "format": "datetime" }
}
}
}
}
}Example:
[
{
"name": "Bluesky",
"type": "native",
"endpoints": {
"appview": "https://api.bsky.app",
"appview:did": "did:web:api.bsky.app",
"relay": "https://bsky.network",
"moderation": "https://mod.bsky.app",
"moderation:did": "did:plc:ar7c4by46qjdydhdevvrndac",
},
"default": true,
"createdAt": "2024-09-11T21:26:09.448Z"
},
{
"name": "My Community Server",
"type": "native",
"endpoints": {
"appview": "https://my-bluesky-instance.com",
"relay": "https://my-bluesky-instance.com",
"moderation": "https://my-bluesky-instance.com"
},
"createdAt": "2024-09-11T21:26:09.448Z"
},
{
"name": "Custom network",
"type": "custom",
"createdAt": "2024-09-11T21:26:09.448Z"
}
]Modifications within the PDS are crucial. Here we need to get rid of the hard-fixed "Network" settings within the configuration, and use the dynamic settings based on the each repository (record in com.atproto.repo.networks collection).
Fixed Bluesky AppView in PDS configuration (current situation):
PDS_BSKY_APP_VIEW_URL="https://api.bsky.app"
PDS_BSKY_APP_VIEW_DID="did:web:api.bsky.app"
PDS_REPORT_SERVICE_URL="https://mod.bsky.app"
PDS_REPORT_SERVICE_DID="did:plc:ar7c4by46qjdydhdevvrndac"
PDS_CRAWLERS="https://bsky.network"https://github.com/bluesky-social/pds/blob/main/installer.sh#L54-L58
Endpoints, where we need to add new optional query parameter network and pipethrough to AppView of this network:
app.bsky.actor.getProfileapp.bsky.actor.getProfilesapp.bsky.feed.getActorLikesapp.bsky.feed.getAuthorFeedapp.bsky.feed.getFeedapp.bsky.feed.getPostThreadapp.bsky.feed.getTimelineapp.bsky.notification.registerPush
Within clients, the implementation is very simple and there is no breaking changes.
This page represents self record item in the com.atproto.repo.networks collection (the lexicon and example JSON described above).
There may also be an "Discover New Networks" section as suggestions for users (similar to "Discover New Feeds").
Within the "New post" dialog, we need to add a choice of the network that the post should be part of. For maximum clarity, this could be part of a post button that instead of "Post" can say "Post to Bluesky" or "Post to My Community Server".