Hi all!
I’m pleased to announce the release of a project that I’ve been working on, on-and-off for a while now: an activitypub server in OCaml — OCamlot.
It’s wildly incomplete, and currently only the bare-bones minimum to be a considered an activitypub server, but it’s coming along nicely.
Currently it supports:
- profiles, custom profile pictures, about
- likes, reposts
- replies
and that’s all.
Some screenshots:
-
Feed
-
Writing replies:
-
Listing users:
-
Profile page:
-
Post replies
Now, the things that this community would care about:
- The server is implemented using dream: ocamlot/server.ml at master · Gopiandcode/ocamlot · GitHub
- The underlying database is Postgres (or Sqlite), accessed from OCaml using Caqti + Petrol: ocamlot/tables.ml at master · Gopiandcode/ocamlot · GitHub
- Ingesting and producing activitypub entities is done using the decoders library: ocamlot/types.ml at master · Gopiandcode/ocamlot · GitHub
- Rendering is all done server-side using tyxml: ocamlot/lib/view at master · Gopiandcode/ocamlot · GitHub
Seeing as there has been some interest in this community recently about activitypub integration in OCaml, I figured this might be interesting.
I have an instance running on over at https://ocamlot.xyz – as a warning, I’ve done most of my testing locally using pleroma, so there may be some slight issues interacting with other server implementations at the moment. EDIT: Issues with interacting with mastadon servers have been resolved, go wild!
Also would be happy to field any questions regarding navigating the activitypub spec as well. I plan to write up my experiences somewhere at some point in the future.