No description
Find a file
2026-03-25 18:55:42 +01:00
data/config/oauth Wire OAuth 2.0 routes in main.go - implementation complete 2026-03-25 07:29:49 +01:00
internal refactor: standardize function contracts across code and tests 2026-03-25 18:54:41 +01:00
.env.example Refactor: Replace GPG with AES-256 encryption and add AKT_ env prefix 2026-03-25 17:47:50 +01:00
.gitignore Update .gitignore: ignore compiled binary and gpg-keyring directory 2026-03-24 20:27:00 +01:00
api.go refactor: standardize function contracts across code and tests 2026-03-25 18:54:41 +01:00
go.mod feat: improve mastodon c2s compatibility and add regression tests 2026-03-25 18:50:05 +01:00
go.sum feat: improve mastodon c2s compatibility and add regression tests 2026-03-25 18:50:05 +01:00
main.go refactor: standardize function contracts across code and tests 2026-03-25 18:54:41 +01:00
Makefile Initial commit: GPG-based authentication system with Echo framework 2026-03-24 20:20:16 +01:00
models.go feat: Implement Mastodon follow/unfollow API with P2P federation support 2026-03-25 18:08:47 +01:00
oauth.go refactor: standardize function contracts across code and tests 2026-03-25 18:54:41 +01:00
README.md feat: improve mastodon c2s compatibility and add regression tests 2026-03-25 18:50:05 +01:00
STATUS.md feat: improve mastodon c2s compatibility and add regression tests 2026-03-25 18:50:05 +01:00

Aktor - Mastodon-compatible Federated Server

Aktor is a headless Mastodon-compatible server focused on C2S API compatibility while using filesystem storage instead of a database.

Current Direction

  • Keep compatibility with existing Mastodon clients as a hard constraint.
  • Keep dependencies up to date (latest compatible versions).
  • Keep tests in source as *_test.go files.

Implemented Today

  • File-based storage (data/maildir, data/config, data/users)
  • AES-256-GCM encrypted credential store (data/keyring/*.enc)
  • Password hashing with bcrypt
  • OAuth 2.0 endpoints:
    • POST /api/v1/apps
    • GET /oauth/authorize
    • POST /oauth/token
    • POST /oauth/revoke (single-token revocation behavior)
  • Auth endpoints:
    • POST /api/v1/accounts
    • POST /api/v1/login
    • GET /api/v1/accounts/verify_credentials
  • Accounts/follow endpoints:
    • GET /api/v1/accounts/:id
    • GET /api/v1/accounts/:id/followers
    • GET /api/v1/accounts/:id/following
    • POST /api/v1/accounts/:id/follow
    • POST /api/v1/accounts/:id/unfollow
  • Status endpoints:
    • POST /api/v1/statuses
    • GET /api/v1/statuses/:id
    • DELETE /api/v1/statuses/:id
    • POST /api/v1/statuses/:id/favourite (placeholder response)
    • POST /api/v1/statuses/:id/reblog (placeholder response)
  • Timeline endpoints:
    • GET /api/v1/timelines/home
    • GET /api/v1/timelines/public

Quick Start

# install dependencies
go mod download

# required env
export AKT_PASSPHRASE="your_secure_passphrase"

# recommended env
export AKT_STORAGE_DIR=./data
export AKT_KEYRING_PATH=./data/keyring
export AKT_INSTANCE_NAME="My Aktor"
export AKT_INSTANCE_DOMAIN="aktor.example.com"
export AKT_PORT=8080

# run
go run main.go api.go oauth.go

Configuration

Key environment variables:

  • AKT_PASSPHRASE (required)
  • AKT_STORAGE_DIR (default ./data)
  • AKT_KEYRING_PATH (default <AKT_STORAGE_DIR>/keyring)
  • AKT_INSTANCE_NAME (default aktor)
  • AKT_PORT (default 8080)
  • AKT_LIBP2P_LISTEN_PORT (default 5334)
  • AKT_LIBP2P_BOOTSTRAP_PEERS (comma-separated multiaddrs)

Testing

go test ./...

Tests are kept in source as standard Go test files (for example internal/auth/authenticator_test.go, internal/handlers/status_test.go).

Notes on Compatibility

  • API behavior is being aligned incrementally to Mastodon C2S expectations.
  • Some endpoints are still placeholders/stubs and are marked as such in code and STATUS.md.