ActivityPub Checklist
I said I'd do it. Here it is. This is a checklist for a "publish-only" ActivityPub client (i.e., an account that you can view, follow, and receive posts from — it cannot receive messages, create threads, or do anything much complicated)
https://github.com/leepeuker/movary/compare/main...add/activitypub
- GET endpoints
- [ ] ActivityPub (AP) Actor (e.g., /activitypub/users/
) ("should" be pretty HTML or JSON based on Accept header) (e.g., https://ramblingreaders.org/user/alifeee/) - .well-known URLs
- [x] webfinger (
/.well-known/webfinger?resource=acct:<user>@<domain>)- [ ] add new "link" to user homepage (see mastodon response)
- [ ] add "aliases" here to link to text/html user homepage (see mastodon response)
- [x] hostmeta (
.well-known/host-meta) - [x] nodeinfo meta (
.well-known/nodeinfo) - [x] nodeinfo (
/nodeinfo/2.1)- [ ] add "localPosts" (see http://nodeinfo.diaspora.software/ns/schema/2.1)
- [x] webfinger (
- [x] AP Object for Movie (e.g., /activitypub/movies/
or /activitypub/users/ /movies/ ) - [ ] add attribute in "movie" object linking to "movies collection" see
- [ ] add attribute in "movie" object linking to "plays collection"
- [x] AP Activity/Object for Movie Watch (e.g., /activitypub/users/
/movies/ /plays/ ) - [ ] add attribute in "play" object linking to "plays collection" see
- [x] AP Activity/Object for Watchlist Item (e.g., /activitypub/users/
/ - [ ] AP following to list followers of this account (e.g., /activitypub/users/
/followers) - [ ] AP following to list following of this account (e.g., /activitypub/users/
/following) (shouldn't do anything as it's "view-only" at the moment) - [x] AP outbox for other servers to see "posts" (e.g., /activitypub/users/
/outbox)
- [ ] ActivityPub (AP) Actor (e.g., /activitypub/users/
- POST endpoints
- [ ] AP inbox for other servers to post messages (i.e., follow requests) (e.g., /activitypub/users/
/inbox)
- [ ] AP inbox for other servers to post messages (i.e., follow requests) (e.g., /activitypub/users/
- database changes
- [ ] potentially more columns for users (public/private key, "birth" date) movies/watchlist
- [ ] new "notes" table for notes (reviews/watchlist additions) published about movies (linking to user by id?)
- [ ] new "followers" table for ActivityPub (linking back to "users" table by ID?)
- new worker functions
- [ ] AP send message – POST message to follower inboxes
- [ ] writer function to create an HTML message from a user, movie, play/watchlist, comment
- misc
- [ ] update nginx config to automatically add
/activitypub/ifAccept:isapplication/ld+jsonorapplication/activity+json(see https://gitlab.com/edent/activity-bot/-/blob/main/README_nginx.md) - [ ] add util to cryptographically sign headers (AP requires this)
- [ ] add
Federation.mdfile
- [ ] update nginx config to automatically add
- frontend
- [ ] AP section on user profile (dashboard)
- [ ] "follow on @
@ " or similar call-to-action - [ ] "N followers"
- [ ] "follow on @
- [ ] checkbox on "review" or "add to watchlist" for "post to fediverse?"
- [ ] AP section on user profile (dashboard)
- tests
- Movary profile is viewable on Mastodon/AP clients
- [ ] profile information
- [ ] "posts" (notes)
- [ ] followers
- [ ] profile information
- [ ] check endpoint permissions sync with profile permissions
- [ ] check signed headers
- Movary profile is viewable on Mastodon/AP clients
So to be clear, you'd be able to log, review and so on but not interact with the rest of the ActivityPub? It makes sense, maybe being able to interact with BookWyrm would be nice but not a high priority. This is a huge thing, thank you very much!
So to be clear, you'd be able to log, review and so on but not interact with the rest of the ActivityPub? It makes sense, maybe being able to interact with BookWyrm would be nice but not a high priority. This is a huge thing, thank you very much!
effectively, from a Movary POV, not much will change (you will still just log and watchlist movies). but if the profile is public, it will be viewable and followable from other ActivityPub clients, yeah.
Bookwyrm does have a nice "feed" feature but… I don't use it, so I don't care to implement it (it also seems a lot more complex… — I should probably just look for an AP library anyway)
see examples of other AP implementations here:
https://github.com/alifeee/activitypub-examples
added 4 working activitypub routes, see branch https://github.com/leepeuker/movary/tree/add/activitypub
-
.well-known/host-meta -
.well-known/webfinger -
.well-known/nodeinfo -
nodeinfo/2.1
also tried to add a development/activitypub.md file to the documentation, but can't figure out how to "reload" the documentation docker container to make it show. maybe I did something wrong here.
links to keep:
- https://github.com/w3c-social/activitystreams-validator
- https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection
- https://socialhub.activitypub.rocks/t/modeling-a-movie-review-in-activitystreams/3822/5
new endpoints:
-
/activitypub/users/<user> -
/activitypub/users/<user>/movies -
/activitypub/users/<user>/movies?p=<page> -
/activitypub/users/<user>/movies/<id> - (not properly)
/activitypub/users/<user>/plays/<id>/<date>
to-do:
- add birthdate to Actor object
- add public key to Actor object
- rename "movies" to "plays" or similar (maybe they should be separate — play could have an "object" of movie, and "movie" could have collection of plays of some kind)
- separate out OrderedCollection code to be even more generic, to be usable in several places
Interoperability with NeoDB?
Interoperability with NeoDB?
hi @crse. there are not really enough words in your question for me to understand it enough to write a decent reply. thanks.
NeoDB (https://github.com/neodb-social/neodb) is another TV/show tracker that already have support for ActivityPub. It would be cool that Movary interoperable with it :)
Movary already has the ability to perform actions. "Adding ActivityPub (AP)" means that each of these will be turned into a AP note, published to a Movary AP account's followers, and be visible as an AP note on the account, effectively triggering actions A3 and A5 below. These Movary actions are:
- tag a film as played
- add a film to watchlist
Below, I list the parts of ActivityPub that I am implementing, where these acronyms mean:
- SS – Server<->Server
- CS – Client<->Server
A: implementing
- (SS) respond to follow request
- (SS) respond to request for profile information
- (SS) respond to request for list of notes
- (SS) respond to request for list of followers
- (SS) notify other servers of a new published note
B: not implementing:
- (SS) respond to any non-follow-request message (like/repost/reply)
- (CS) post new notes
- (CS) choose accounts to follow
- (CS) read notes from following accounts
- (CS) get notifications for follow requests/likes/reposts
In summary, you'll be able to:
- using Mastodon, follow a Movary account and get updates when new films are played or added to watchlist
You will not be able to:
- use Movary to follow ActivityPub accounts on other platforms on the Fediverse.
So, you would be able to use Mastodon to follow a Movary account and a NeoDB account… but there's no interoperability past that. Do you have any suggestions @crse ?
(this last comment would be good for a Federation.md file)
added a note to the description, but …
I am not working on this. I was happy with just adding Mastodon API access in https://github.com/leepeuker/movary/pull/706