forked from gabek/fedidocs
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from armelgeek/main
Added documentation for Communecter federation.
- Loading branch information
Showing
19 changed files
with
1,116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
id: communecter | ||
title: Communecter | ||
tags: | ||
- Event | ||
- News | ||
- Projects | ||
- Social Networking | ||
- Federation | ||
--- | ||
|
||
|
||
## What is Communecter ActivityPub? | ||
|
||
Communecter ActivityPub is an implementation of the ActivityPub protocol tailored for the Communecter platform. It enables federation and interaction between users on different instances of Communecter, as well as with other federated platforms. | ||
|
||
## Functionality | ||
|
||
Communecter ActivityPub provides the following functionality: | ||
|
||
### Notes | ||
|
||
Notes are short, text-based messages that users can create to share their thoughts, updates, or announcements. They can include hashtags to categorize the content and make it more discoverable. Users can: | ||
|
||
- Create a new note by sending a `Create` activity with the `Note` object. | ||
- Like or react to a note by sending a `Like` activity. | ||
- Reply to a note by sending a `Create` activity with the `Note` object as the reply's `inReplyTo` field. | ||
- Share or repost a note by sending a `Create` activity with the `Note` object and adding their own commentary. | ||
|
||
### Events | ||
|
||
Events represent specific occurrences or gatherings that users can create and share with others. Users can: | ||
|
||
- Create a new event by sending a `Create` activity with the `Event` object. | ||
- Join an event by sending a `Join` activity to indicate their participation or interest in attending. | ||
- Follow an event by sending a `Follow` activity to receive updates and notifications about the event. | ||
- Intercept events using the event interception feature, especially with platforms like Mobilizon, allowing users to discover and import events from other platforms into Communecter. | ||
- Leave an event by sending a `Leave` activity to withdraw their participation or interest. | ||
- Delete an event by sending a `Delete` activity to indicate the removal of the event from Communecter. | ||
|
||
Events can have various details, such as the date, time, location, description, and associated tags or categories. Users can search for events based on their interests or browse through events happening in their community or network. | ||
|
||
|
||
### Projects | ||
|
||
Projects represent collaborative initiatives or tasks that users can create and manage within Communecter. Users can: | ||
|
||
- Create a new project by sending a `Create` activity with the `Project` object. | ||
- Update an existing project by sending an `Update` activity to modify its details or progress. | ||
- Delete a project by sending a `Delete` activity to indicate its removal from Communecter. | ||
- Invite other users to join a project by sending an `Invite` activity, requesting their participation. | ||
- Join a project by sending a `Join` activity, expressing their interest in contributing to the project. | ||
- Offer specific roles or privileges to users within a project by using the `instrument` field, such as `asadmin` or `contributor`. | ||
- Leave a project by sending a `Leave` activity to withdraw their participation or contribution. | ||
- Accept or reject an invitation to join a project by sending an `Accept` or `Reject` activity, respectively. | ||
|
||
Projects can have various attributes, such as a description, goals, milestones, associated members, and related resources. Users can search for projects based on their interests or browse through existing projects in their community or network. | ||
|
||
> **Please note that project federation is currently under experimentation and development in Communecter, aiming to enable the exchange and collaboration of projects across federated instances. This feature is being actively worked on to enhance the federation capabilities of projects in the future.** | ||
> | ||
|
||
## Interoperability | ||
|
||
Communecter ActivityPub supports interoperability with other federated platforms implementing ActivityPub. This enables users to interact with users on other platforms, including: | ||
|
||
- **Mastodon** | ||
- **Mobilizon** | ||
- **PeerTube** | ||
|
||
Users can follow accounts from these platforms, receive their updates, and interact with their content. | ||
|
||
|
||
Supported Activities | ||
|
||
- [**Create**](activities/create) | ||
- [**Accept**](activities/accept) | ||
- [**Follow**](activities/follow) | ||
- [**Undo**](activities/undo) | ||
- [**Update**](activities/update) | ||
- [**Delete**](activities/delete) | ||
- [**Invite**](activities/invite) | ||
- [**Join**](activities/join) | ||
- [**Leave**](activities/leave) | ||
- [**Undo**](activities/undo) | ||
- [**Remove**](activities/remove) | ||
- [**Reject**](activities/reject) | ||
- [**Offer**](activities/offer) | ||
|
||
Supported Objects | ||
|
||
- [**Note**](objects/note) | ||
- [**Event**](objects/event) | ||
- [**Project**](objects/project) |
4 changes: 4 additions & 0 deletions
4
content/projects/server-apps/communecter/activities/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: "Activities" | ||
description": "Supported Activities" | ||
--- |
136 changes: 136 additions & 0 deletions
136
content/projects/server-apps/communecter/activities/accept.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
--- | ||
id: accept | ||
title: Accept | ||
tags: | ||
- Accept | ||
--- | ||
|
||
The `Accept` activity is used to indicate the acceptance of various actions in Communecter, such as accepting a `Follow` request, an invitation to join a project, or an offer to contribute with specific roles. | ||
|
||
### Reference | ||
|
||
- **Activity**: [Accept](https://www.w3.org/TR/activitypub/#accept-activity-inbox) | ||
- **Object**: A Communecter object | ||
|
||
### Internal Logic | ||
|
||
The behavior of the `Accept` activity can vary based on the context in which it is used. Here are some examples: | ||
|
||
- Accepting a `Follow` request | ||
- Accepting an invitation to join a project with specific roles | ||
- Accepting an offer to contribute to a project as an admin or with specific roles | ||
|
||
### Examples | ||
|
||
#### Accepting a Project Invitation as Admin | ||
|
||
In this example, **Hajavololona** accepts an invitation from **Armel Wanes** to join a project as an admin. The `target` field specifies the URL of the project, and the `instrument` field indicates the role as "admin". | ||
|
||
```json | ||
{ | ||
"@context" : "https://www.w3.org/ns/activitystreams", | ||
"type" : "Accept", | ||
"object" : "https://instance.communecter.org/api/activitypub/activity/id/649d346cabfdd", | ||
"id" : "https://communecter.org/api/activitypub/activity/id/649d3521aef18", | ||
"actor" : "https://communecter.org/api/activitypub/users/u/Hajavololona", | ||
"target" : "https://communecter.org/api/activitypub/projects/p/04bf00e9-c7a1-4268-909a-25fdd794b43d", | ||
"instrument" : "admin", | ||
"to" : [ | ||
"https://www.w3.org/ns/activitystreams#Public" | ||
], | ||
"cc" : [ | ||
"https://instance.communecter.org/api/activitypub/users/u/ArmelWanes" | ||
] | ||
} | ||
|
||
``` | ||
#### **Accepting a Project Invitation with Specific Roles** | ||
|
||
In this example, Hajavololona accepts an invitation from Armel Wanes to join a project with the roles of "Partenaire" and "Directeur". The target field specifies the URL of the project, and the instrument field indicates the roles using the as parameter and the rules parameter. | ||
|
||
|
||
```json | ||
{ | ||
"@context" : "https://www.w3.org/ns/activitystreams", | ||
"type" : "Accept", | ||
"object" : "https://instance.communecter.org/api/activitypub/activity/id/649cb07c4a21b", | ||
"id" : "https://communecter.org/api/activitypub/activity/id/649cb26001300", | ||
"actor" : "https://communecter.org/api/activitypub/users/u/Hajavololona", | ||
"target" : "https://instance.communecter.org/api/activitypub/object/id/649c9e7ae4135", | ||
"instrument" : { | ||
"as" : "adminandrole", | ||
"rules" : "Partenaire,Directeur" | ||
}, | ||
"to" : [ | ||
"https://www.w3.org/ns/activitystreams#Public" | ||
], | ||
"cc" : [ | ||
"https://instance.communecter.org/api/activitypub/users/u/ArmelWanes" | ||
] | ||
} | ||
``` | ||
|
||
In this example, the instrument field specifies the roles using the as parameter with the value "adminandrole" and the rules parameter containing the specific roles ("Partenaire" and "Directeur"). This allows for accepting the invitation with the given roles. | ||
|
||
Note: The possible roles are "Financeur", "Sponsor", "Organisateur", "President", "Directeur", "Conferencier", and "Intervenant". | ||
|
||
#### Accepting a Contribution Offer | ||
|
||
In this example, Hajavololona accepts an offer from Armel Wanes to contribute to an object. The target field specifies the URL of the object being contributed to, and the instrument field indicates the acceptance of the offer with the as parameter set to "contributor". | ||
|
||
|
||
```json | ||
{ | ||
"@context": "https://www.w3.org/ns/activitystreams", | ||
"type": "Accept", | ||
"object": "https://instance.communecter.org/api/activitypub/activity/id/649cb07c4a21b", | ||
"id": "https://communecter.org/api/activitypub/activity/id/649cb26001300", | ||
"actor": "https://communecter.org/api/activitypub/users/u/Hajavololona", | ||
"target": "https://instance.communecter.org/api/activitypub/object/id/649c9e7ae4135", | ||
"instrument": { | ||
"as": "withRules", | ||
"rules": "Partenaire,Directeur" | ||
}, | ||
"to": [ | ||
"https://www.w3.org/ns/activitystreams#Public" | ||
], | ||
"cc": [ | ||
"https://instance.communecter.org/api/activitypub/users/u/ArmelWanes" | ||
] | ||
} | ||
``` | ||
|
||
#### Accept Following | ||
|
||
In this example, the object field specifies the URL of the object (e.g., a Follow activity) being accepted. | ||
|
||
```json | ||
|
||
{ | ||
"@context" : "https://www.w3.org/ns/activitystreams", | ||
"type" : "Accept", | ||
"object" : "https://mastodon.top/4333d889-9623-4366-be29-220caa43a72a", | ||
"id" : "https://communecter.org/api/activitypub/activity/id/6303371a4b0fa", | ||
"actor" : "https://communecter.org/api/activitypub/users/u/oceatoon" | ||
} | ||
|
||
``` | ||
|
||
|
||
|
||
#### Instrument Description | ||
|
||
- **admin**: Indicates acceptance of administrative privileges. | ||
|
||
- **becomeadmin**: Indicates acceptance of a request to become an admin. | ||
|
||
- **asadmin**: Indicates acceptance of becoming an admin. | ||
|
||
- **inviteWithRules**: Indicates acceptance of an invitation with specific roles using the rules parameter. | ||
|
||
- **contributor**: Indicates acceptance of a contribution request. | ||
|
||
- **withRules**: Indicates acceptance of an offer to contribute with specific roles using the rules parameter. | ||
|
||
**Note:** The possible roles are "Financeur", "Sponsor", "Organisateur", "President", "Directeur", "Conferencier", and "Intervenant". | ||
|
37 changes: 37 additions & 0 deletions
37
content/projects/server-apps/communecter/activities/create.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
id: create | ||
title: Create | ||
tags: | ||
- Create | ||
--- | ||
The `Create` activity is used to create new objects in Communecter, such as `Note`, `Event`, or `Project`. | ||
|
||
### Reference | ||
|
||
- **Activity**: [Create](https://www.w3.org/TR/activitypub/#create-activity-inbox) | ||
- **Object**: A Communecter object | ||
|
||
### Internal Logic | ||
|
||
When Communecter receives a `Create` activity with an object, it processes the activity based on the type of object being created. This can include `Note`, `Event`, or `Project`, among others. | ||
|
||
## Example | ||
|
||
In this example, **Hajavololona** creates a new `Event` in Communecter and sends it to the public audience with a carbon copy (cc) to **ArmelWanes**. | ||
|
||
```json | ||
{ | ||
"@context" : "https://www.w3.org/ns/activitystreams", | ||
"type" : "Create", | ||
"object" : "https://communecter.org/api/activitypub/object/id/649d514ebb9fa", | ||
"id" : "https://communecter.org/api/activitypub/activity/id/649d514eba30c", | ||
"actor" : "https://communecter.org/api/activitypub/users/u/Hajavololona", | ||
"published" : "2023-06-29T09:39:26+0000", | ||
"summary" : "Created a new Event: 'Community Meetup'", | ||
"to" : [ | ||
"https://www.w3.org/ns/activitystreams#Public" | ||
], | ||
"cc" : [ | ||
"https://instance.communecter.org/api/activitypub/users/u/ArmelWanes" | ||
] | ||
} |
63 changes: 63 additions & 0 deletions
63
content/projects/server-apps/communecter/activities/delete.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
id: delete | ||
title: Delete | ||
tags: | ||
- Delete | ||
--- | ||
|
||
The `Delete` activity is used to indicate the deletion of objects in Communecter, such as `Note`, `Event`, or `Project`. | ||
|
||
### Reference | ||
|
||
- **Activity**: [Delete](https://www.w3.org/TR/activitypub/#delete-activity-inbox) | ||
- **Object**: A Communecter object | ||
|
||
### Internal Logic | ||
|
||
When Communecter receives a `Delete` activity, it processes the activity based on the type of object being deleted. This can include `Note`, `Event`, or `Project`, among others. | ||
|
||
## Example 1: Withdrawal from Project | ||
|
||
In this example, **Armel Wanes** decides to withdraw his contribution from the "EcoSmart Homes Initiative" project. The `target` field specifies the URL of the project that is being deleted. | ||
|
||
```json | ||
{ | ||
"@context" : "https://www.w3.org/ns/activitystreams", | ||
"type" : "Delete", | ||
"object" : "https://instance.communecter.org/api/activitypub/users/u/Hajavololona", | ||
"id" : "https://communecter.org/api/activitypub/activity/id/649caf628366d", | ||
"actor" : "https://communecter.org/api/activitypub/users/u/ArmelWanes", | ||
"target" : "https://communecter.org/api/activitypub/object/id/649c9e7ae4135", | ||
"published" : "2023-06-28T22:08:34+0000", | ||
"to" : [ | ||
"https://www.w3.org/ns/activitystreams#Public" | ||
], | ||
"cc" : [ | ||
"https://instance.communecter.org/api/activitypub/users/u/Hajavololona" | ||
] | ||
} | ||
``` | ||
|
||
## Example 2: Simple Deletion | ||
In this example, an object (such as a Note, Event, or Project) is deleted without any additional details. | ||
|
||
```json | ||
{ | ||
"@context" : "https://www.w3.org/ns/activitystreams", | ||
"type" : "Delete", | ||
"object" : "https://communecter.org/api/activitypub/object/id/6260f515bd856", | ||
"id" : "https://communecter.org/api/activitypub/activity/id/6260f54e8e2c5", | ||
"actor" : "https://communecter.org/api/activitypub/users/u/ArmelWanes", | ||
"published" : "2023-04-21T06:10:22+0000", | ||
"to" : [ | ||
"https://www.w3.org/ns/activitystreams#Public" | ||
], | ||
"cc" : [ | ||
"https://instance.communecter.org/api/activitypub/users/u/yorre" | ||
] | ||
} | ||
``` | ||
|
||
In both examples, the summary field provides a brief description of the deletion, such as "Armel Wanes has decided to withdraw his contribution from the 'EcoSmart Homes Initiative' project" or "Object has been deleted". This gives an overview of the deletion activity. | ||
|
||
In the summary field, you can specify a description of the deletion action. For example, "Armel Wanes has decided to withdraw his contribution from the 'EcoSmart Homes Initiative' project" or simply "Object has been deleted". This provides a summary of the deletion activity. |
39 changes: 39 additions & 0 deletions
39
content/projects/server-apps/communecter/activities/follow.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
id: follow | ||
title: Follow | ||
tags: | ||
- follow | ||
--- | ||
|
||
## Follow | ||
|
||
The `Follow` activity enables actors to access and retrieve content from other actors as soon as it updates. | ||
|
||
### Request | ||
|
||
| Reference | | | ||
| --------- | ------------------------------------------------------------------ | | ||
| Activity | [Follow](https://www.w3.org/TR/activitypub/#follow-activity-inbox) | | ||
| Object | Communecter object or ActivityPub actor | | ||
| ID | A unique Follow request IRI | | ||
|
||
### Internal Logic | ||
|
||
When Communecter receives a follow activity on an object, it performs the following actions: | ||
|
||
- Sends a notification to the followed actor. | ||
- The followed actor can choose to accept or ignore the follow request. | ||
- If the request is accepted, the follower will receive updates from the followed actor in their activity feed. | ||
|
||
### Example | ||
|
||
In this example, **Alice** sends a follow activity to follow **Bob** on Communecter: | ||
|
||
```json | ||
{ | ||
"@context": "https://www.w3.org/ns/activitystreams", | ||
"type": "Follow", | ||
"object": "https://communecter.org/api/activitypub/users/u/Bob", | ||
"id": "https://communecter.org/api/activitypub/activity/id/Follow123", | ||
"actor": "https://communecter.org/api/activitypub/users/u/oceatoon" | ||
} |
Oops, something went wrong.