Student dev making the first steps with ActivityPub and doing a video

Hello !

I’m new here, so let me introduce myself quickly. I’m Samuel Roland, a student developer (finishing the 4th class in an IT school). My mother tongue is French, so excuse me for my errors in English. I’m interested in the federation since a few months. I’m passionate about developing Free Software, my languages are mostly around the web: PHP and JavaScript (with the following frameworks Laravel, Livewire, VueJS, AlpineJS). I really like teaching things to other people, especially in the technical world. My precedent passion was photography and videos, so I realized a bunch of videos but never published them publicly.

I developed several web applications projects in the past, but I’m a beginner in the world of federation. I’d like to learn how I can implement federation in productivity apps (such as tasks management, for example).

As I’m on vacation, I’m spending 1 week on ActivityPub to discover the protocol, play with it, implement the federation of tasks for a minimalist todolist app in PHP (with Laravel). I’m following the article A highly opinionated guide to learning about ActivityPub to read the most important sections of the needed specs. I saw the Guide for implementers, too.

I’m filming myself and my screen to edit a video of the week and try to explain basics of AP in a practical oriented way (concepts are discovered via the practice and theory is added to it). As 1 week is pretty short, and I’m a beginner, I will probably not cover a lot. The video will be around 15 minutes (in English).

The target audience: developers interested in implementing federation in their apps and already knowing what is possible with AP in terms of usage, but not how it technically works (this is my case currently). One of the goal is to share the fun of this experience and help other people to approach the protocol.

(For reference, I announced the project on Mastodon here)

So that’s it, I just wanted to let you know about this little project. If you have any advice on what I could do and show in this video, please let me know! I will maybe post here the next days to share a bit of the progress.

And by the way, is there a tool or a way to debug AP requests (I mean to see their exact content, endpoints, HTTP headers, …) to be able to visualize requests between 2 servers ? The idea is to show and understand the workflow of requests (discovery, HTTP signature validation, activity, sometimes accept activity sent back, …).

5 Likes

It is wonderful that you are doing this, and the kind of onboarding content you create is much needed to pave the path of more and more developers to enter into their own fediverse adventure. Welcome to the SocialHub @samuelroland :wave:

2 Likes

Very cool @samuelroland. Let us know how the project goes!

1 Like

Hello, sorry for taking so much time to give some news.

The video itself is not advanced, it will take at least 1.5 month to produce it. But I built 2 tools that will definitely help to teach ActivityPub concepts, explain by example and play with requests.
I’m pretty busy now (I have some exams soon) and the project is moving forward by irregular jumps. I struggled a few hours with HTTP signature, but that’s finally working (it’s apparently a pain point for a lot of people) !
The more I read forums or the fediverse with activitypub tag, the more I see dozens of people who are trying to learn and understand ActivityPub and that’s very encouraging for me. (And for a lot of things, I struggle with them too).

For reference, a few threads with the latest news on Mastodon and a few screenshots.


Here are the big advancements:

I’m developing APdebug, an interface to debug, inspect and write ActivityPub requests. It took me some effort to build, but it starts now to be usable and useful. I use pagekite to make the server publicly accessible (so that remote servers can send requests to APdebug). This is released under AGPLv3 and available here (still in beta, I hope to release a “production” version when this will be mature in a few months). Maybe I should create a separated post to introduce this properly when it will be more polished ?

The first page is Sender: the place to write custom requests (it discovers a remote actor with webfinger and http signature is handled.

The second page is Flow which displays the flow in “real time” (polling to refresh every 2s) of incoming and outgoing requests on this server.

Another idea about this project would be to host an instance and open registrations to make it very fast and easy to start playing with requests and using features of APdebug (and maybe even “sharing” requests the same way we can do it with code snippets on certain services). I talked shortly about this on Mastodon, and I would like to have your feedback on this idea !


I developed a very small CLI (called rq now) that just combines Curl, Jq and Bat to be able to do HTTP requests with nice JSON colorized output in the terminal (works with HTML too).


I’m making schemas on Excalidraw to explain network structure and a few concepts.

One of them is about HTTP (another similar one is in preparation for POST request):

Another schema about the high level working of federation. This is in complement of my voice, so this will be displayed in parts and a bit clearer to understand what is what.

Any feedbacks or errors on these schemas ? (Btw, making federation schemas are pretty hard).

That’s it for the work and thinking achieved for the moment. Now that the tools and the code are ready, I can start to design and film the video…

2 Likes

Awesome.
I think it is supernice to develop things which everybody in the community can use.
Be it debugging tools or building blocks … Thank You!
:sparkling_heart: Loving it.

Forgive me for starting with a Feature Request :

For example :
[correct me if wrong, might have changed or been fixed meanwhile]
In mastodon, a common misconception occured frequently, it was probably hard to get it by just looking at the @context and comparing anything to the json object.
mastodon uses PropertyValue - Schema.org Type (whyever, ActivityPub recommends Relationship) …
There you have a name and value pair. Now people think, PropertyValue is what is described at schema.org, but it is not.
It is (whyever) as:name and schema:value which is not valid in schema.org (e.g. you need then a different @context to display it for “search engines” on your website) …

An expanded object with the full url (or even with prefix) would be easier to debug.


Flow is just supernice, I guess (need coffee first :slight_smile: ).


Just a remark regarding the CI and Graphics:
The original font family used was “PT Sans” and we could give users the faces from yet used Personas.

a_m_Alyssa b_m_Ben q_m_User
Find them here (also an icon font one folder above) activitypub-origami/webfont/svg at master · sebilasse/activitypub-origami · GitHub


See also my last posts, the machine readable file provides all the meanings of properties in different languages and also the domain and the range/datatype etc.

3 Likes