Files
indiekit-endpoint-activitypub/views/migrate.njk
Ricardo da625592fd feat: ActivityPub federation endpoint for Indiekit
Implements full ActivityPub federation as an Indiekit plugin:
- Actor document (Person) with RSA key pair for HTTP Signatures
- WebFinger discovery (acct:rick@rmendes.net)
- Inbox: handles Follow, Undo, Like, Announce, Create, Delete, Move
- Outbox: serves published posts as ActivityStreams 2.0
- Content negotiation: AS2 JSON for AP clients, passthrough for browsers
- JF2-to-AS2 converter for all Indiekit post types
- Syndicator integration (pre-ticked checkbox for delivery to followers)
- Mastodon migration: alias config, CSV import for followers/following
- Admin UI: dashboard, followers, following, activity log, migration page
- Data retention: configurable TTL on activities, optional raw JSON storage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 22:13:51 +01:00

68 lines
2.2 KiB
Plaintext

{% extends "document.njk" %}
{% from "heading/macro.njk" import heading with context %}
{% from "input/macro.njk" import input with context %}
{% from "button/macro.njk" import button with context %}
{% from "checkboxes/macro.njk" import checkboxes with context %}
{% from "file-input/macro.njk" import fileInput with context %}
{% from "details/macro.njk" import details with context %}
{% from "notification-banner/macro.njk" import notificationBanner with context %}
{% from "prose/macro.njk" import prose with context %}
{% block content %}
{{ heading({ text: title, level: 1, parent: { text: __("activitypub.title"), href: mountPath } }) }}
{% if result %}
{{ notificationBanner({ type: result.type, text: result.text }) }}
{% endif %}
{# Step 1 — Actor alias #}
{{ heading({ text: __("activitypub.migrate.step1Title"), level: 2 }) }}
{{ prose({ text: __("activitypub.migrate.step1Desc") }) }}
<form method="post" novalidate>
<input type="hidden" name="action" value="alias">
{{ input({
name: "aliasUrl",
label: __("activitypub.migrate.aliasLabel"),
hint: __("activitypub.migrate.aliasHint"),
type: "url"
}) }}
{{ button({ text: __("activitypub.migrate.aliasSave") }) }}
</form>
<hr>
{# Step 2 — Import CSV #}
{{ heading({ text: __("activitypub.migrate.step2Title"), level: 2 }) }}
{{ prose({ text: __("activitypub.migrate.step2Desc") }) }}
<form method="post" enctype="multipart/form-data" novalidate>
<input type="hidden" name="action" value="import">
{{ checkboxes({
name: "importTypes",
items: [
{ value: "following", text: __("activitypub.migrate.importFollowing") },
{ value: "followers", text: __("activitypub.migrate.importFollowers") }
],
values: ["following"]
}) }}
{{ fileInput({
name: "csvFile",
label: __("activitypub.migrate.fileLabel"),
hint: __("activitypub.migrate.fileHint"),
accept: ".csv,.txt"
}) }}
{{ button({ text: __("activitypub.migrate.importButton") }) }}
</form>
<hr>
{# Step 3 — Instructions #}
{{ heading({ text: __("activitypub.migrate.step3Title"), level: 2 }) }}
{{ prose({ text: __("activitypub.migrate.step3Desc") }) }}
{% endblock %}