No description
| data/config/oauth | ||
| internal | ||
| .env.example | ||
| .gitignore | ||
| api.go | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| Makefile | ||
| models.go | ||
| oauth.go | ||
| README.md | ||
| STATUS.md | ||
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.gofiles.
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/appsGET /oauth/authorizePOST /oauth/tokenPOST /oauth/revoke(single-token revocation behavior)
- Auth endpoints:
POST /api/v1/accountsPOST /api/v1/loginGET /api/v1/accounts/verify_credentials
- Accounts/follow endpoints:
GET /api/v1/accounts/:idGET /api/v1/accounts/:id/followersGET /api/v1/accounts/:id/followingPOST /api/v1/accounts/:id/followPOST /api/v1/accounts/:id/unfollow
- Status endpoints:
POST /api/v1/statusesGET /api/v1/statuses/:idDELETE /api/v1/statuses/:idPOST /api/v1/statuses/:id/favourite(placeholder response)POST /api/v1/statuses/:id/reblog(placeholder response)
- Timeline endpoints:
GET /api/v1/timelines/homeGET /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(defaultaktor)AKT_PORT(default8080)AKT_LIBP2P_LISTEN_PORT(default5334)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.