helgekrueger / bovine Goto Github PK
View Code? Open in Web Editor NEWModular ActivityPub/Fediverse Server
License: MIT License
Modular ActivityPub/Fediverse Server
License: MIT License
The goal of this issue is to create a better separation between "ActivityPub Server", i.e. bovine, and "ActivityPub Client, e.g. Mastodon. This will be done by "forwarding" activities to the "ActivityPub Client", so it can process the activity through its internal ActivityPub Server.
If one can succesfully implemented this, one should be able to separate the ActivityPub Actors from the user accounts on Mastodon. This means one can create a setup where a Pixelfed, Mastodon account result in the same Fediverse handle, e.g. [email protected]. Similarly, this Fediverse handle can then be used to send encrypted messages ...
Running Mastodon in the vagrant box generated a lot of CPU load / network traffic. This seemed unnecessary. I lack the knowledge of Mastodon to fix this.
The posts appearing in the federated timeline do not create the experience, I expect ... So it was not fun to work on. I don't think getting the posts into the home screen would help, as I'm used to seeing full conversations by now.
There should be a way for an ActivityPub Client to authenticate against Bovine and request access to an Actor's data. Something like OAuth is probably necessary.
The package bovine_process handles the task a server has to do to satisfy the requirements set out in Sections 6 and 7 of https://www.w3.org/TR/activitypub/. The pattern should be pretty straightforward: One method for each Subsection.
The entire processing chain is defined in the variables default_inbox_process
and default_outbox_process
in bovine_process.process
(I might want to move this to bovine_process
).
Implementing the methods themselves should be "easy". Thinking of appropriate test cases will probably not be.
Issue if bovine is restarted and oven (https://codeberg.org/helge/oxen/src/branch/main/event_loop.py) is not, oxen will not reconnect.
It should be possible to adapt the tests in /tests to do actual HTTP. A few things will be necessary for this:
It should not be necessary to actually touch the tests. At least once bovine 0.1.0 is released.
The main goal of this would be to be able to run this test suite against any valid ActivityPub implementation (it replaces bovine.local) and the suite should pass.
Of course, this assumes that bovine flavored Client To Server is implemented. E.g. the eventSource test only works if an eventSource is implemented.
The setup:
This example does:
This should demonstrate how bovine can be used for things beyong "yay, it's the best Fediverse server in my humble opinion".
A common complaint about the FediVerse are missing replies. Here is how to implement a "reply fetcher" in an ActivityPub Client. Usage will require a server supporting ActivityPub Client 2 Server.
Here's how to implement this:
from bovine.activitypub import actor_from_file
actor = actor_from_file('you.toml', aiohttp.ClientSession())
# the following is awkward and should be fixed
response = await actor.proxy_element(original_url)
element = json.loads(await response.text)
The element then has a replies collection. Fetch it ... getting it with actor.get_ordered_collection
might be currently possible. As the credentials used to connect to the Bovine ActivityPub Server are the same as used to other hosts. However, it would be cleaner to also proxy the elements.
Then repeat this for all the replies.
Once this is done build a display. It might be possible to reuse Buffalo in particular:
https://codeberg.org/helge/Buffalo/src/branch/main/src/components/timeline/DisplayConversation.js
Implement automatic rotation of the public key pair used for ActivityPub Server 2 Server communication after say a month:
Automatic rotation will probably implemented as part of Moo-Auth-1 as the key is part of the header there, rotation should be unproblematic.
User should be able to
This could be done for example through a web form. Also disabling the account might be a possibility to add.
Maybe also consider some type of admin role.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.