-
-
Notifications
You must be signed in to change notification settings - Fork 102
Add Nuxt example application #676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 a45344f
Replace `~~/server` to `#server`
2chanhaeng 783e20c
Format files
2chanhaeng 9e4a89b
Apply necessary reviews
2chanhaeng 190a7b0
Move `@nuxt/kit` to peerDependencies for efficiency in `@fedify/nuxt`
2chanhaeng 35dee11
Fix logger
2chanhaeng bcae97e
Guard SSE send failures and clean up stream handling
2chanhaeng f3f5794
Make federation activity delivery non-fatal
2chanhaeng b785344
Fix frontend runtime errors and navigation issues
2chanhaeng 241a609
Minor code quality and documentation fixes
2chanhaeng ba4163d
Reorder imports in follow.post.ts to satisfy deno fmt
2chanhaeng a37a3bb
Tighten federation handling in the Nuxt example
2chanhaeng 22eef36
Tighten typing and dedup logic in the Nuxt example
2chanhaeng 518b777
Stabilize SSR rendering and clean up frontend bits
2chanhaeng 7bc5c3f
Document tunnel-only dev settings and align Nuxt deps
2chanhaeng cae3b1a
Silence noisy WebFinger and key-generation log lines in examples
2chanhaeng 11bcfcb
Update lockfile
2chanhaeng f667572
Tighten ActivityPub correctness in the Nuxt example
2chanhaeng 68a0873
Tighten typing in Nuxt example handlers
2chanhaeng 2bed7e2
Polish frontend lifecycle and link safety
2chanhaeng 461b102
Reorder pnpm workspace
2chanhaeng 003d86a
Drop unused deps from the Nuxt example
2chanhaeng a888000
Type readBody in follow/unfollow handlers
2chanhaeng 8a91f8e
Tighten Nuxt example navigation and search race
2chanhaeng a88e611
Drop empty PostStore constructor in Nuxt example
2chanhaeng 190da99
Harden inbox actor handling and Note dispatcher
2chanhaeng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
.agents/skills/create-example-app-with-integration/example/public/theme.js
This file contains hidden or 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
This file contains hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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,5 @@ | ||
| node_modules | ||
| dist | ||
| .output | ||
| .nuxt | ||
| .data |
This file contains hidden or 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,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/ |
This file contains hidden or 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,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> |
This file contains hidden or 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,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 } }, | ||
| }); | ||
This file contains hidden or 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,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:" | ||
|
2chanhaeng marked this conversation as resolved.
|
||
| }, | ||
| "devDependencies": { | ||
| "typescript": "catalog:", | ||
| "@types/node": "catalog:" | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.