shrmpy / hello-activitypub

ActivityPub skeleton using static files and Netlify Functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hello-activitypub

Are we ActivityPub yet?

Template Key Pair

This template repo re/generates its public and private key pair. To keep the key pair:

  • you can modify the local build plugin
  • you can disable Netlify auto deploy

Requirements

  • Netlify account
  • Discord webhook (OPTIONAL)

Quickstart

  1. You should have a GitHub/GitLab account
  2. Think of a username for your instance
  3. (OPTIONAL) obtain a webhook for your Discord server
  4. Click the Netlify quick deploy button above
  5. Choose the OAuth provider that you use (see step#0)
  6. After agreeing to the permissions that Netlify will be granted, you will have 3 fields
  7. Field SELF_ACTOR is for the username you chose (see step#1)
  8. Field DISCORD_WEBHOOK is for the optional webhook you created (see step#2)
  9. Field GITHUB_AVATAR is for the optional URL of your GitHub profile
  10. Click the button to continue, and Netlify should deploy and make a random site name (adjective-noun-NNNN.netlify.app)
  11. If your webhook was configured for step#7, there should be a message delivered with the link to the new private key PEM
  12. Check that the webfinger file is responding by visiting webfinger.net and searching for your username@site-name
  13. In the webfinger response, you can find the actor URL of the form https://site-name/u/username
  14. Check that the actor URL is responding with JSON that contains properties for the inbox URL
  15. Navigate to the Functions page of the Netlify dashboard, and choose the inbox
  16. Check that a follow activity works by manually creating the request, start a terminal:
vi examples/subscribe.go
go build -o testsub examples/subscribe.go
testsub -priv $PWD/private-key.pem
  1. Look at the real time log output in the Functions page, and it should show the Accept activity returned by the remote instance that we subscribed-to
  2. Verify by visiting the instance subscribed-to and searching for username@site-name
  3. To clean up, you can make a Undo activity by using the examples/unsubscribe.go

Credits

Honk by Ted Unangst (LICENSE)

Kotori Netlify by Musakai (LICENSE)

Add ActivityPub Follows to Blog by Tom MacWright

Mastodon 6 files by Justin Garrison (LICENSE)

Reference AP Inbox by Darius Kazemi (LICENSE)

Basic AP Server by Eugen Rochko

AP Inbox by Eugen Rochko

About

ActivityPub skeleton using static files and Netlify Functions

License:Other


Languages

Language:JavaScript 38.8%Language:Astro 26.8%Language:Go 19.6%Language:CSS 11.6%Language:TypeScript 3.2%