Developer Resources
A comprehensive collection of libraries, tools, and resources for building ActivityPub and Fediverse applications.
Libraries by Language
JavaScript / TypeScript
| Library | Description | License |
|---|---|---|
| Fedify | Full ActivityPub server framework | MIT |
| ActivityPub Express | Express.js middleware for ActivityPub | MIT |
| express-activitypub | Simple reference implementation | MIT |
| activitystreams-2 | ActivityStreams 2.0 library | Apache-2.0 |
| http-signature | HTTP Signatures implementation | MIT |
| one-page-pub | Minimal ActivityPub server | Apache-2.0 |
// Example: Using Fedify
import { createFederation } from '@fedify/fedify';
const federation = createFederation({
kv: new DenoKvStore(await Deno.openKv()),
});
federation.setActorDispatcher('/users/{handle}', async (ctx, handle) => {
// Return actor object
});
Python
| Library | Description | License |
|---|---|---|
| federation | Multi-protocol social web library | BSD-3 |
| little-boxes | Minimal ActivityPub framework | ISC |
| bovine | Fediverse application library | MIT |
| pyfed | Type-safe ActivityPub library | MIT |
| Takahē | Multi-domain AP server | BSD-3 |
# Example: Using federation library
from federation.entities import base
from federation.outbound import handle_create
entity = base.Post(
raw_content="Hello from Python!",
id="https://example.com/posts/1"
)
Rust
| Library | Description | License |
|---|---|---|
| activitypub-federation | High-level AP framework (from Lemmy) | AGPL-3.0 |
| activitystreams | Traits and types for AS/AP | GPL-3.0 |
| megalodon-rs | Mastodon/Pleroma API client | Apache-2.0 |
// Example: Using activitypub-federation
use activitypub_federation::config::FederationConfig;
let config = FederationConfig::builder()
.domain("example.com")
.app_data(data)
.build()?;
Go
| Library | Description | License |
|---|---|---|
| go-fed/activity | Full AS/AP implementation | BSD-3 |
| astreams | ActivityStreams 2.0 library | AGPL-3.0 |
| Hannibal | ActivityPub library | Apache-2.0 |
| go-activitypub | AP service implementation | ISC |
// Example: Using go-fed/activity
import "github.com/go-fed/activity/streams"
note := streams.NewActivityStreamsNote()
note.GetActivityStreamsContent().Set(/* ... */)
PHP
| Library | Description | License |
|---|---|---|
| ActivityPub-PHP | ActivityPub implementation | MIT |
| FediText | Text processing for Fediverse | MIT |
Ruby
| Library | Description | License |
|---|---|---|
| activitypub | Reference (Mastodon codebase) | AGPL-3.0 |
Elixir
| Library | Description | License |
|---|---|---|
| activity_pub | ActivityPub library | AGPL-3.0 |
| Pleroma | Full implementation reference | AGPL-3.0 |
Tools
Testing & Debugging
| Tool | Description |
|---|---|
| activitypub-testsuite | W3C conformance tests |
| FediDB | Fediverse network statistics |
| Fediverse Observer | Instance monitoring |
Development Utilities
| Tool | Description |
|---|---|
| HTTP Signature Tester | Verify signature implementation |
| JSON-LD Playground | Test JSON-LD processing |
| WebFinger Tester | Test WebFinger discovery |
Instance Management
| Tool | Description |
|---|---|
| Fediblock | Moderation blocklists |
| The Federation | Network statistics |
Reference Implementations
Full Servers
┌────────────────────────────────────────────────────────────┐
│ REFERENCE IMPLEMENTATIONS │
├────────────────────────────────────────────────────────────┤
│ │
│ Microblogging │
│ ├── Mastodon (Ruby) - mastodon/mastodon │
│ ├── Pleroma (Elixir) - pleroma/pleroma │
│ └── Misskey (TS) - misskey-dev/misskey │
│ │
│ Link Aggregation │
│ └── Lemmy (Rust) - LemmyNet/lemmy │
│ │
│ Photo Sharing │
│ └── Pixelfed (PHP) - pixelfed/pixelfed │
│ │
│ Video │
│ └── PeerTube (TS) - Chocobozzz/PeerTube │
│ │
│ Blogging │
│ ├── WriteFreely (Go) - writefreely/writefreely │
│ └── Plume (Rust) - Plume-org/Plume │
│ │
└────────────────────────────────────────────────────────────┘
Minimal Examples
| Project | Language | Purpose |
|---|---|---|
| one-page-pub | Node.js | Single-file AP server |
| express-activitypub | Node.js | Reference implementation |
| microblog.pub | Python | Single-user server |
Specifications
Core Standards
| Specification | URL |
|---|---|
| ActivityPub | w3.org/TR/activitypub |
| ActivityStreams 2.0 Core | w3.org/TR/activitystreams-core |
| ActivityStreams 2.0 Vocabulary | w3.org/TR/activitystreams-vocabulary |
| JSON-LD | w3.org/TR/json-ld |
| WebFinger | RFC 7033 |
De Facto Standards
| Specification | Documentation |
|---|---|
| HTTP Signatures | docs.joinmastodon.org/spec/security |
| NodeInfo | nodeinfo.diaspora.software |
| Mastodon Extensions | docs.joinmastodon.org |
Learning Resources
Tutorials
| Resource | Description |
|---|---|
| ActivityPub Rocks | Official resource site |
| How to Implement ActivityPub | Mastodon blog tutorial |
| Building an ActivityPub Server | SocialHub discussion |
Video Content
| Resource | Description |
|---|---|
| FediForum Recordings | Past session recordings |
| PeerTube Instances | Various developer tutorials |
Books
| Resource | Description |
|---|---|
| Move Slowly and Build Bridges | Robert W. Gehl's book on Mastodon |
Community Resources
Forums & Discussion
| Resource | Description |
|---|---|
| SocialHub | Developer community forum |
| Lemmy Communities | Fediverse discussions |
| Matrix/Discord | Real-time chat |
News & Updates
| Resource | Description |
|---|---|
| We Distribute | Fediverse news |
| Fediverse Report | Weekly updates |
| This Week in Matrix | Related protocol news |
Curated Lists
| Resource | URL |
|---|---|
| Delightful AP Development | codeberg.org/fediverse/delightful-activitypub-development |
| Awesome ActivityPub | github.com/BasixKOR/awesome-activitypub |
| Fediverse.Party Tools | fediverse.party/en/tools |
API Documentation
Platform APIs
| Platform | Documentation |
|---|---|
| Mastodon | docs.joinmastodon.org/api |
| Lemmy | join-lemmy.org/docs |
| Pixelfed | docs.pixelfed.org |
| PeerTube | docs.joinpeertube.org/api-rest-reference |
Library Documentation
| Library | Documentation |
|---|---|
| Fedify | fedify.dev/docs |
| go-fed/activity | go-fed.org |
| activitypub-federation-rust | docs.rs/activitypub_federation |
Quick Reference
Essential URLs
┌────────────────────────────────────────────────────────────┐
│ ESSENTIAL URLS │
├────────────────────────────────────────────────────────────┤
│ │
│ Specifications │
│ ├── w3.org/TR/activitypub │
│ ├── w3.org/TR/activitystreams-core │
│ └── w3.org/TR/activitystreams-vocabulary │
│ │
│ Community │
│ ├── socialhub.activitypub.rocks │
│ ├── activitypub.rocks │
│ └── codeberg.org/fediverse/fep │
│ │
│ Tools │
│ ├── json-ld.org/playground │
│ ├── webfinger.net/lookup │
│ └── fedidb.org │
│ │
└────────────────────────────────────────────────────────────┘
Common Namespaces
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
{
"toot": "http://joinmastodon.org/ns#",
"schema": "http://schema.org#",
"PropertyValue": "schema:PropertyValue",
"value": "schema:value"
}
]
}
Getting Help
Where to Ask Questions
- SocialHub Forum - Best for implementation questions
- Matrix Rooms - Real-time help
- GitHub Issues - Library-specific questions
- Stack Overflow - Tag with
activitypub
Debugging Tips
// Log incoming activities
app.post('/inbox', (req, res) => {
console.log('Received activity:', JSON.stringify(req.body, null, 2));
// Process activity...
});
// Verify HTTP signatures
const isValid = await verifySignature(req);
console.log('Signature valid:', isValid);
Next Steps
- Getting Started - Begin development
- ActivityPub Protocol - Learn the protocol
- Implementation Guides - Step-by-step guides