Nice to see a blogpost on the Mastodon blog about implementing a basic ActivityPub server https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/
(Though technically webfinger isn't needed for activitypub, but it is for mastodon interop!)