Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 51 additions & 48 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,55 @@
name: CI / Build and test
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
pull_request:
workflow_dispatch:
push:
branches:
- main

jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Set up config files
run: cp config/config.example.toml config/config.toml

- name: Build
run: pnpm build

- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0

- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: pnpm start
browser: chrome
env:
CYPRESS: true

- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Set up config files
run: cp config/config.example.toml config/config.toml

- name: Lint
run: pnpm lint

- name: Build
run: pnpm build

- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0

- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: pnpm start
browser: chrome
env:
CYPRESS: true

- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
20 changes: 19 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
dist
views
pnpm-lock.yaml
pnpm-lock.yaml
public/js/autosize.min.js
public/js/bootstrap.bundle.js
public/js/bootstrap.bundle.js.map
public/js/bootstrap.bundle.min.js
public/js/bootstrap.bundle.min.js.map
public/js/bootstrap.js
public/js/bootstrap.js.map
public/js/bootstrap.min.js
public/js/bootstrap.min.js.map
public/js/clipboard.min.js
public/js/generate-timezones.js
public/js/jquery-3.4.1.min.js
public/js/jquery.uploadPreview.min.js
public/js/moment-timezone.js
public/js/moment.js
public/js/password-score.js
public/js/popper.min.js
public/js/util.js
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"tabWidth": 4
"tabWidth": 2
}
60 changes: 30 additions & 30 deletions FEDERATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ This document is meant to be a reference for all the ActivityPub federation-rela

To keep things simple, sometimes you will see things formatted like `Create/Note` or `Delete/Event` or `Undo/Follow`. The thing before the slash is the Activity, and the thing after the slash is the Object inside the Activity, in an `object` property. So these are to be read as follows:

- `Create/Note`: a `Create` activity containing a `Note` in the `object` field
- `Delete/Event`: a `Delete` activity containing an `Event` in the `object` field
- `Undo/Follow`: an `Undo` activity containing a `Follow` in the `object` field
- `Create/Note`: a `Create` activity containing a `Note` in the `object` field
- `Delete/Event`: a `Delete` activity containing an `Event` in the `object` field
- `Undo/Follow`: an `Undo` activity containing a `Follow` in the `object` field

When the word "broadcast" is used in this document, it means to send an Activity to individual inbox of each of the followers of a given Actor.

This document has four main sections:

- **Federation philosophy** lays out the general model of how this is intended to federate
- **General Actor information** contains the basics of what to expect from our `Actor` objects
- **Inbox behavior** lists every incoming ActivityPub activity that the server recognizes, and tells you what it does in response to that activity, including any other ActivityPub activities it sends back out.
- **Activities triggered from the web app** tells you what circumstances on the web application cause the server to emit ActivityPub activities. (For example, when an event is updated via the web application, it lets all the ActivityPub followers know that the event has been updated.)
- **Federation philosophy** lays out the general model of how this is intended to federate
- **General Actor information** contains the basics of what to expect from our `Actor` objects
- **Inbox behavior** lists every incoming ActivityPub activity that the server recognizes, and tells you what it does in response to that activity, including any other ActivityPub activities it sends back out.
- **Activities triggered from the web app** tells you what circumstances on the web application cause the server to emit ActivityPub activities. (For example, when an event is updated via the web application, it lets all the ActivityPub followers know that the event has been updated.)

Please note: there is an unfortunate collision between the English language and the ActivityPub spec that can make this document confusing. When this document uses the word 'event' with a lowercase-e and not in monospace, it refers to the thing that is being tracked in gathio: events that are being organized. When this document uses the word `Event` with a capital E and in monospace, it refers to the [`Event` object defined in the ActivityStreams Vocabulary spec](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event).

Expand All @@ -37,29 +37,29 @@ Every event has an Actor. The Actor looks like this:

```json
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
"id": "https://DOMAIN/EVENTID",
"type": "Person",
"preferredUsername": "EVENTID",
"inbox": "https://DOMAIN/activitypub/inbox",
"outbox": "https://DOMAIN/EVENTID/outbox",
"followers": "https://DOMAIN/EVENTID/followers",
"summary": "<p><p>DESCRIPTION</p>\n</p><p>Location: LOCATION.</p><p>Starting DATETIME (human readable).</p>",
"name": "EVENTNAME",
"featured": "https://DOMAIN/EVENTID/featured",
"publicKey": {
"id": "https://DOMAIN/EVENTID#main-key",
"owner": "https://DOMAIN/EVENTID",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nOURPUBLICKEY\n-----END PUBLIC KEY-----\n"
},
"icon": {
"type": "Image",
"mediaType": "image/jpg",
"url": "https://DOMAIN/events/EVENTID.jpg"
}
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
"id": "https://DOMAIN/EVENTID",
"type": "Person",
"preferredUsername": "EVENTID",
"inbox": "https://DOMAIN/activitypub/inbox",
"outbox": "https://DOMAIN/EVENTID/outbox",
"followers": "https://DOMAIN/EVENTID/followers",
"summary": "<p><p>DESCRIPTION</p>\n</p><p>Location: LOCATION.</p><p>Starting DATETIME (human readable).</p>",
"name": "EVENTNAME",
"featured": "https://DOMAIN/EVENTID/featured",
"publicKey": {
"id": "https://DOMAIN/EVENTID#main-key",
"owner": "https://DOMAIN/EVENTID",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nOURPUBLICKEY\n-----END PUBLIC KEY-----\n"
},
"icon": {
"type": "Image",
"mediaType": "image/jpg",
"url": "https://DOMAIN/events/EVENTID.jpg"
}
}
```

Expand Down
10 changes: 5 additions & 5 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defineConfig } from "cypress";

export default defineConfig({
e2e: {
baseUrl: "http://localhost:3000",
setupNodeEvents(/*on, config*/) {
// implement node event listeners here
},
e2e: {
baseUrl: "http://localhost:3000",
setupNodeEvents(/*on, config*/) {
// implement node event listeners here
},
},
});
Loading