ActivityPlug provides one TypeScript contract for ActivityPub servers that expose different client APIs. Applications can use the contract directly as a library or run it behind the included GraphQL, HTTP, and browser-facing server.
The current adapters support Mastodon, Pleroma and Akkoma, Misskey, Hollo, and
HackersPub. Each adapter reports its capabilities so applications can check a
feature before presenting it. Unsupported operations fail with a typed
UNSUPPORTED_OPERATION error.
Use library mode when trusted application code can call a Fediverse server
directly. Install @activityplug/core with the adapter for that server and
provide a remote authority appropriate for the runtime.
Use server mode when several clients need one controlled API boundary. The
@activityplug/server package provides GraphQL and HTTP APIs, remote-origin
policy enforcement, and optional browser routes. @activityplug/cli runs the
same server from the command line.
Use the browser API when a web application must keep ActivityPlug session identifiers and remote credentials out of browser storage. The browser routes use an opaque, signed BFF cookie and CSRF protection.
Start with the Getting started guide, then see:
| Package | Purpose |
|---|---|
@activityplug/core |
Portable types, client services, capabilities, identifiers, errors, and transport boundaries |
@activityplug/mastodon |
Mastodon adapter |
@activityplug/pleroma |
Pleroma and Akkoma adapter |
@activityplug/misskey |
Misskey adapter |
@activityplug/hollo |
Hollo adapter |
@activityplug/hackerspub |
HackersPub adapter |
@activityplug/mastodon-base |
Shared foundation for Mastodon-compatible adapters |
@activityplug/server |
GraphQL, HTTP, and browser server surfaces |
@activityplug/cli |
Command-line server |
@activityplug/session-postgres |
PostgreSQL lifecycle stores for server deployments |
@activityplug/session-redis |
Redis short-lived stores and limits for server deployments |
examples/botdemonstrates library mode with a mention-reply bot.examples/proxy-clientdemonstrates HTTP and GraphQL clients for server mode.examples/web-clientdemonstrates the browser API and a deployable server composition.
ActivityPlug packages require Node.js 26 or newer and use ECMAScript modules. The repository uses pnpm 11.
The documentation index groups guides by task and audience. It includes capability behavior, authentication, streaming, storage, deployment, security, architecture, adapter development, testing, and migrations.
Licensed under Apache-2.0 OR MIT. See LICENSE-APACHE and LICENSE-MIT.