https://github.com/fedify-dev/content-sharing
Federated image sharing example using Fedify and Nuxt
https://github.com/fedify-dev/content-sharing
activitypub example fedify fediverse image-sharing nuxt pixelfed tutorial
Last synced: 21 days ago
JSON representation
Federated image sharing example using Fedify and Nuxt
- Host: GitHub
- URL: https://github.com/fedify-dev/content-sharing
- Owner: fedify-dev
- License: mit
- Created: 2026-04-26T08:14:12.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-27T11:50:13.000Z (about 2 months ago)
- Last Synced: 2026-04-28T18:41:11.456Z (about 2 months ago)
- Topics: activitypub, example, fedify, fediverse, image-sharing, nuxt, pixelfed, tutorial
- Language: TypeScript
- Homepage: https://fedify.dev/tutorial/content-sharing
- Size: 377 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Federated image sharing example using Fedify and Nuxt
=====================================================
> [!WARNING]
> This program is for educational purposes only. Do not use it for any other
> purpose, since it has not been tested for security.
This is a small Pixelfed-style federated image sharing service built with
[Fedify] and [Nuxt]. It is the companion example to the
[*Creating a federated image sharing service*][tutorial] tutorial. Each
chapter that touches the example app lands as its own commit, with a small
number of follow-up commits at the tip that fix issues spotted during the
end-to-end rehearsal.
The features of this program are:
- A single user can create an account on their own instance
- The user can be followed by other actors in the fediverse
- A follower can unfollow the user
- The user can see the list of their followers
- The user can upload image posts with captions
- Posts made by the user are visible to their followers in the fediverse
- The user can follow other actors in the fediverse
- The user can see the list of actors they are following
- The user can see posts made by actors they follow in a home timeline
- The user can like posts, and remote actors' likes are recorded
- The user can leave comments on posts, and remote replies are recorded
Since it is a small example for educational purposes, it has a lot of
limitations:
- Only one local account per instance
- One image per post (no carousels)
- The user cannot edit or delete posts
- No boosts (reposts), no direct messages, no search
- No pagination
- No authentication beyond “whoever opened the browser first owns this
instance”
[Fedify]: https://fedify.dev/
[Nuxt]: https://nuxt.com/
[tutorial]: https://fedify.dev/tutorial/content-sharing
Dependencies
------------
This program is written in TypeScript and uses [Node.js]. You need Node.js
22.0.0 or later installed on your system.
It depends on a few libraries besides [Fedify]:
- [Nuxt] for the web framework
- [`@fedify/nuxt`] for bridging Fedify with Nuxt's Nitro server
- [Drizzle ORM] with [better-sqlite3] for the database
- [UnoCSS] for styling
- A few other libraries; see *package.json* for details
[Node.js]: https://nodejs.org/
[`@fedify/nuxt`]: https://www.npmjs.com/package/@fedify/nuxt
[Drizzle ORM]: https://orm.drizzle.team/
[better-sqlite3]: https://www.npmjs.com/package/better-sqlite3
[UnoCSS]: https://unocss.dev/
How to run
----------
To run this program, install the dependencies first:
~~~~ sh
npm install
~~~~
Create the SQLite database schema:
~~~~ sh
npm run db:push
~~~~
Then start the development server:
~~~~ sh
npm run dev
~~~~
This starts the server on port 3000. You can visit
in your web browser. However, since this
program is an ActivityPub server, you probably need to expose it to the public
internet to talk to other servers in the fediverse. In that case, use
[`fedify tunnel`]:
~~~~ sh
fedify tunnel 3000
~~~~
`fedify tunnel` prints a public URL; open it in a browser to use the app, and
other fediverse servers will be able to reach your instance at the same URL.
[`fedify tunnel`]: https://fedify.dev/manual/test#exposing-a-local-server-to-the-public
License
-------
This program is licensed under the [MIT License]. See the *LICENSE* file for
details.
[MIT License]: https://minhee.mit-license.org/2026/