Home

Awesome

Minidon

Minimal implementation of ActivityPub with Cloudflare Workers and D1.

What can we do?

Screencast

output

Requirements

Installation

yarn install

Configuration

cp wrangler.sample.toml wrangler.toml

Fill the values:

Pick up the value of PRIVATE_KEY from the files generated by ssh-keygen:

ssh-keygen -b 4096 -m PKCS8 -t rsa -N '' -f id_rsa

You can also use the value as "Secret variables" in Cloudflare Workers.

Setup D1

wrangler d1 create minidon

database_id will be shown on your console. Copy it and paste into the value of database_id and preview_database_id in wrangler.toml.

Create tables:

wrangler d1 execute minidon --file minidon.sql

Development

yarn dev

Deploy

yarn deploy

Usage

@{name}@{minion.username.workers.dev} will be your account id. Paste it on such a Mastodon URL input, the account will be shown.

To post the message, access https://minion.username.workers.dev/ui.

Author

Yusuke Wada

License

MIT

And using a lot of code in Matchbox and inspired by Express ActivityPub Server.

Matchbox https://gitlab.com/acefed/matchbox Copyright (c) 2022 Acefed MIT License

Express ActivityPub Server https://github.com/dariusk/express-activitypub Copyright (c) 2018 Darius Kazemi. Licensed under the MIT license.