No description
Find a file
2026-05-12 23:36:26 +02:00
DOC Add project status and TODO notes 2026-05-12 23:36:26 +02:00
include Add OAuth app registration 2026-05-12 23:34:22 +02:00
smoketest Add OAuth app registration 2026-05-12 23:34:22 +02:00
src Add OAuth app registration 2026-05-12 23:34:22 +02:00
.gitignore Add OAuth app registration 2026-05-12 23:34:22 +02:00
README.md README updated 2026-05-12 21:53:34 +02:00
rebar.config Use p1_oauth2 for bearer token flow 2026-05-12 23:05:32 +02:00
smoketest.py Add random user WebFinger smoke test 2026-05-12 23:14:42 +02:00

Build Aktor in Erlang/Mnesia as a black-box behavioural clone of snac2 at the ActivityPub boundary.

snac2 is the oracle.

Do not port snac2 internals. Do not implement ActivityPub from the abstract specification. Imitate the observable ActivityPub behaviour of snac2.

When in doubt, prefer observed snac2 behaviour over protocol interpretation.

Aktor/Erlang must behave like snac2 when exchanging ActivityPub with the Fediverse.

This includes:

  • WebFinger discovery
  • Actor representation
  • inbox behaviour
  • outbox behaviour
  • object representation
  • followers/following collections
  • HTTP Signatures as used for ActivityPub delivery
  • remote actor fetching
  • Follow/Accept behaviour
  • Create(Note) behaviour
  • Delete behaviour
  • Like behaviour
  • Announce behaviour
  • Undo behaviour
  • replies
  • delivery to remote inboxes
  • processing of incoming remote activities
  • Mastodon API subset required by Tusky
  • Mastodon-compatible OAuth application/token flow

Local UI/admin requirements:

  • user config panel
  • instance config panel

Use Erlang/OTP, Cowboy, and Mnesia. Mnesia replaces snac2 file storage. Internal implementation may differ completely.

Use snac2 as the behavioural reference: for each ActivityPub interaction, observe what snac2 accepts, stores, emits, ignores, rejects, or delivers, then reproduce the same externally visible ActivityPub behaviour in Aktor/Erlang.

Use curl smoke tests as compatibility gates. Use EAL5+ discipline:

  • small steps
  • explicit fixtures
  • no broad rewrites
  • no speculative protocol interpretation
  • no improvements that change ActivityPub-visible behaviour

Do not implement full Mastodon. Do not generalise beyond the snac2 ActivityPub compatibility surface.

Success: Aktor/Erlang shows the same practical ActivityPub behaviour as snac2: remote servers can discover users, follow them, receive posts, send replies, likes and boosts, and Tusky can log in, read timelines, and create posts.

Testing and runtime rules

The project is tested inside a Docker container, so a working Dockerfile is required.

Runtime configuration must be read entirely from environment variables. Do not require interactive setup, local config files, or manual post-install steps for tests.

For every implemented API or protocol endpoint, add a dedicated curl-based smoke test script in the appropriate test folder.

Smoke tests are used to verify externally visible behaviour and to prevent regressions during development.

Rules:

  • every new API endpoint must have a matching smoke test
  • every protocol-facing change must update or add smoke tests
  • smoke tests must be runnable against the Docker container
  • tests should validate observable behaviour, not internal implementation details
  • keep smoke tests simple, explicit, and reproducible

Use snac2 as behavioural reference: https://codeberg.org/grunfink/snac2

Codex may clone it read-only as reference:

git clone https://codeberg.org/grunfink/snac2.git /tmp/snac2-reference