Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
86aa6d6
Create examples/nuxt with Claude Opus 4.6
2chanhaeng Apr 13, 2026
a45344f
Replace `~~/server` to `#server`
2chanhaeng Apr 15, 2026
783e20c
Format files
2chanhaeng Apr 18, 2026
9e4a89b
Apply necessary reviews
2chanhaeng Apr 18, 2026
190a7b0
Move `@nuxt/kit` to peerDependencies for efficiency in `@fedify/nuxt`
2chanhaeng Apr 19, 2026
35dee11
Fix logger
2chanhaeng Apr 25, 2026
bcae97e
Guard SSE send failures and clean up stream handling
2chanhaeng Apr 25, 2026
f3f5794
Make federation activity delivery non-fatal
2chanhaeng Apr 25, 2026
b785344
Fix frontend runtime errors and navigation issues
2chanhaeng Apr 25, 2026
241a609
Minor code quality and documentation fixes
2chanhaeng Apr 25, 2026
ba4163d
Reorder imports in follow.post.ts to satisfy deno fmt
2chanhaeng Apr 25, 2026
a37a3bb
Tighten federation handling in the Nuxt example
2chanhaeng Apr 25, 2026
22eef36
Tighten typing and dedup logic in the Nuxt example
2chanhaeng Apr 25, 2026
518b777
Stabilize SSR rendering and clean up frontend bits
2chanhaeng Apr 25, 2026
7bc5c3f
Document tunnel-only dev settings and align Nuxt deps
2chanhaeng Apr 25, 2026
cae3b1a
Silence noisy WebFinger and key-generation log lines in examples
2chanhaeng Apr 25, 2026
11bcfcb
Update lockfile
2chanhaeng Apr 25, 2026
f667572
Tighten ActivityPub correctness in the Nuxt example
2chanhaeng Apr 25, 2026
68a0873
Tighten typing in Nuxt example handlers
2chanhaeng Apr 25, 2026
2bed7e2
Polish frontend lifecycle and link safety
2chanhaeng Apr 25, 2026
461b102
Reorder pnpm workspace
2chanhaeng Apr 25, 2026
003d86a
Drop unused deps from the Nuxt example
2chanhaeng Apr 26, 2026
a888000
Type readBody in follow/unfollow handlers
2chanhaeng Apr 26, 2026
8a91f8e
Tighten Nuxt example navigation and search race
2chanhaeng Apr 26, 2026
a88e611
Drop empty PostStore constructor in Nuxt example
2chanhaeng Apr 26, 2026
190da99
Harden inbox actor handling and Note dispatcher
2chanhaeng Apr 26, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ body {
background: var(--background);
color: var(--foreground);
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, sans-serif;
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
Cantarell, sans-serif;
}

a {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
var mq = window.matchMedia("(prefers-color-scheme: dark)");
const mq = globalThis.matchMedia("(prefers-color-scheme: dark)");
document.body.classList.add(mq.matches ? "dark" : "light");
mq.addEventListener("change", function (e) {
document.body.classList.remove("light", "dark");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ federation
});
},
)
.mapHandle((_, username) => username === IDENTIFIER ? IDENTIFIER : null)
.setKeyPairsDispatcher(async (_, identifier) => {
if (identifier != IDENTIFIER) {
return [];
Expand All @@ -54,9 +55,11 @@ federation
if (keyPairs) {
return keyPairs;
}
const { privateKey, publicKey } = await generateCryptoKeyPair();
keyPairsStore.set(identifier, [{ privateKey, publicKey }]);
return [{ privateKey, publicKey }];
const rsa = await generateCryptoKeyPair("RSASSA-PKCS1-v1_5");
const ed25519 = await generateCryptoKeyPair("Ed25519");
const newKeyPairs = [rsa, ed25519];
keyPairsStore.set(identifier, newKeyPairs);
return newKeyPairs;
});

federation
Expand Down
998 changes: 483 additions & 515 deletions deno.lock

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions examples/nuxt/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
dist
.output
.nuxt
.data
45 changes: 45 additions & 0 deletions examples/nuxt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!-- deno-fmt-ignore-file -->

Fedify-Nuxt integration example application
===========================================

A comprehensive example of building a federated server application using
[Fedify] with [Nuxt]. This example demonstrates how to create an
ActivityPub-compatible federated social media server that can interact with
other federated platforms like [Mastodon], [Misskey], and other ActivityPub
implementations using [Fedify] and [Nuxt].

[Fedify]: https://fedify.dev
[Nuxt]: https://nuxt.com/
[Mastodon]: https://mastodon.social/
[Misskey]: https://misskey.io/


Running the example
-------------------

~~~~ sh
pnpm dev
~~~~


Communicate with other federated servers
----------------------------------------

1. Tunnel your local server to the internet using `fedify tunnel`

~~~~ sh
fedify tunnel 3000
~~~~

2. Open the tunneled URL in your browser and check that the server is running
properly.

3. Search your handle and follow from other federated servers such as
[Mastodon] or [Misskey].

> [!NOTE]
> [ActivityPub Academy] is a great resource to learn how to interact
> with other federated servers using ActivityPub protocol.

[ActivityPub Academy]: https://www.activitypub.academy/
13 changes: 13 additions & 0 deletions examples/nuxt/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<NuxtPage />
</template>

<script setup lang="ts">
useHead({
link: [
{ rel: "stylesheet", href: "/style.css" },
{ rel: "icon", type: "image/svg+xml", href: "/fedify-logo.svg" },
],
script: [{ src: "/theme.js", defer: true }],
});
</script>
10 changes: 10 additions & 0 deletions examples/nuxt/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default defineNuxtConfig({
modules: ["@fedify/nuxt"],
fedify: { federationModule: "#server/federation" },
ssr: true,
// The settings below loosen dev-server defenses to support tunnel-based
// federation testing (e.g., `fedify tunnel`). Not recommended for general
// Nuxt projects — remove or tighten before reusing this config.
devServer: { host: "0.0.0.0" },
vite: { server: { allowedHosts: true } },
Comment thread
coderabbitai[bot] marked this conversation as resolved.
});
25 changes: 25 additions & 0 deletions examples/nuxt/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "nuxt-example",
"version": "0.0.1",
"private": true,
"type": "module",
"description": "Fedify app with Nuxt integration",
"scripts": {
"dev": "nuxt dev",
"build": "nuxt build",
"preview": "nuxt preview",
"start": "node .output/server/index.mjs"
},
"dependencies": {
"@fedify/fedify": "workspace:^",
"@fedify/nuxt": "workspace:^",
"@fedify/vocab": "workspace:^",
"@logtape/logtape": "catalog:",
"nuxt": "catalog:",
"h3": "catalog:"
Comment thread
2chanhaeng marked this conversation as resolved.
},
"devDependencies": {
"typescript": "catalog:",
"@types/node": "catalog:"
}
}
Loading
Loading