Skip to content

Add Nuxt example application#676

Merged
dahlia merged 26 commits into
fedify-dev:mainfrom
2chanhaeng:pr/example-nuxt
Apr 26, 2026
Merged

Add Nuxt example application#676
dahlia merged 26 commits into
fedify-dev:mainfrom
2chanhaeng:pr/example-nuxt

Conversation

@2chanhaeng
Copy link
Copy Markdown
Contributor

@2chanhaeng 2chanhaeng commented Apr 13, 2026

Add Nuxt example application

Depends on #675.

Changes

New example: examples/nuxt/

A comprehensive Nuxt example app demonstrating @fedify/nuxt
integration with ActivityPub federation, following the standard
Fedify example architecture.

Features

  • Federation: Actor dispatcher, inbox listeners (Follow, Undo),
    object dispatcher for Notes, followers collection, NodeInfo, and
    key pair management via server/federation.ts.
  • Vue pages: Home page with post creation, follower/following
    lists, user search, and SSE-powered live updates (pages/index.vue);
    actor profile page (pages/users/[identifier]/index.vue); post
    detail page (pages/users/[identifier]/posts/[id].vue).
  • Server API routes: RESTful endpoints under server/api/ for
    home data, posting, follow/unfollow, search, profile lookup, post
    detail, and SSE events.
  • Static assets: Fedify logo, demo profile image, CSS stylesheet,
    and dark/light theme toggle script in public/.
  • Nuxt config: SSR enabled, @fedify/nuxt module wired with
    federation module path, open host/vite config for tunnel
    compatibility.

@fedify/nuxt bugfix

  • Replaced addTemplate() with addServerTemplate() in
    packages/nuxt/src/mod.ts to ensure the generated federation
    middleware module is available in the Nitro server bundle rather
    than only in the client build output.

Test integration

  • Added Nuxt example to examples/test-examples/mod.ts with
    pnpm build + pnpm start workflow and 30-second ready timeout.

Co-Authored-By: Claude Opus 4.6

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/build Build system and packaging component/federation Federation object related component/integration Web framework integration component/testing Testing utilities (@fedify/testing)

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants