Skip to main content

PieFed

PieFed is a link aggregator for the Fediverse, similar to Reddit.

Overview

PropertyValue
LanguagePython
DatabasePostgreSQL
LicenseAGPL-3.0
Repositorycodeberg.org/rimu/pyfedi
Documentationjoin.piefed.social/docs

ActivityPub Implementation

Actor Types

PieFed uses multiple actor types:

Person (User):

{
"type": "Person",
"id": "https://piefed.social/u/alice",
"preferredUsername": "alice",
"inbox": "https://piefed.social/u/alice/inbox"
}

Group (Community):

{
"type": "Group",
"id": "https://piefed.social/c/programming",
"name": "!programming@piefed.social",
"preferredUsername": "programming",
"inbox": "https://piefed.social/c/programming/inbox",
"followers": "https://piefed.social/c/programming/followers",
"attributedTo": ["https://piefed.social/u/moderator"],
"publicKey": { ... }
}

Content Types

Page (Post):

{
"type": "Page",
"id": "https://piefed.social/post/12345",
"attributedTo": "https://piefed.social/u/alice",
"to": ["https://piefed.social/c/programming"],
"name": "Post Title",
"content": "<p>Post body</p>",
"url": "https://external-link.com",
"commentsEnabled": true,
"sensitive": false
}

Note (Comment):

{
"type": "Note",
"id": "https://piefed.social/comment/67890",
"attributedTo": "https://piefed.social/u/bob",
"inReplyTo": "https://piefed.social/post/12345",
"content": "<p>Great post!</p>"
}

Supported Activities

ActivityContextNotes
CreatePage, NotePosts and comments
UpdatePage, NoteEditing
DeletePage, NoteRemoval
LikePage, NoteUpvotes
DislikePage, NoteDownvotes
UndoLike, DislikeRemove vote
FollowGroupJoin community
AnnouncePageCross-posting
BlockPersonUser blocks
Add/RemoveModeratorMod actions

Community Federation

Communities federate when users from other instances:

  1. Search for the community
  2. Subscribe (Follow the Group)
  3. Posts sync to subscribers
┌─────────────────┐                  ┌─────────────────┐
│ piefed.social │◄──── Follow ─────│ lemmy.world │
│ /c/programming │ │ (subscriber) │
└────────┬────────┘ └────────▲────────┘
│ │
└──── Announce(Create(Page)) ────────┘

Custom Extensions

PropertyTypeDescription
commentsEnabledBooleanAllow comments
stickiedBooleanPinned post
languageStringContent language
sensitiveBooleanNSFW content

API Endpoints

Actor Endpoints

GET /u/{username}     # Person
GET /c/{community} # Group
GET /post/{id} # Page
GET /comment/{id} # Note

Collections

GET /c/{community}/followers
GET /c/{community}/outbox

Voting System

Unlike Mastodon's Like-only system, PieFed supports both upvotes and downvotes:

Upvote:

{
"type": "Like",
"actor": "https://piefed.social/u/alice",
"object": "https://piefed.social/post/12345"
}

Downvote:

{
"type": "Dislike",
"actor": "https://piefed.social/u/alice",
"object": "https://piefed.social/post/12345"
}

Compatibility Notes

Interoperability

  • Posts from Mastodon appear as top-level posts
  • PieFed comments federate as Notes
  • Groups work with platforms supporting Group actors

Known Limitations

  • Images hosted on PieFed, not embedded in AP
  • Markdown converted to HTML for federation
  • Some vote synchronization delays

See Also