@the I've only touched the subject lightly, but it depends on how far you want to go; it's a pubsub system with "mailboxes" that have pub/priv key used for authorisation. When you post you have to push your message to all the followers, rather than them pulling it, so you need some active job queue system that handles that too. Beyond that I'm unsure but that appears to be the basics of it. There are also many extensions, specific to Mastodon, Misskey, etc, that aren't part of the official spec.