GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fedify-dev/threadiverse: Federated threadiverse example using Fedify and Next.js

BranchesTags
Open more actions menu

Latest commit

 

History

36 Commits
36 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
app
app
 
 
db
db
 
 
federation
federation
 
 
lib
lib
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CLAUDE.md
CLAUDE.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
biome.json
biome.json
 
 
drizzle.config.ts
drizzle.config.ts
 
 
logging.ts
logging.ts
 
 
middleware.ts
middleware.ts
 
 
next.config.ts
next.config.ts
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Federated threadiverse example using Fedify and Next.js

Warning

This program is for educational purposes only. Do not use it for any other purpose; it has not been tested for security or scale.

This is a small threadiverse-style community platform written against Fedify (the ActivityPub server framework) and Next.js (the web framework). It pairs with the Building a threadiverse community platform tutorial on fedify.dev—the commits in this repository correspond one-to-one with the tutorial's sections so you can git checkout any commit and see the state of the project at that step.

Features:

  • Users can sign up and log in with a username + password.
  • Local users are federated as Person actors with per-user key pairs.
  • Local users can create communities, federated as Group actors with per-community key pairs, an inbox/outbox, and a followers collection.
  • Users can follow and unfollow any threadiverse-compatible community (local or remote) using Follow/Undo(Follow)/Accept(Follow).
  • Users can post text threads (Create(Page)) and replies (Create(Note)). Communities re-distribute everything they receive to their followers as Announce.
  • Users can up-vote (Like) and down-vote (Dislike) threads and replies; the community re-announces those too.
  • The home page is a subscribed feed of threads from every community the viewer follows.

As with any small educational example, many features of real threadiverse servers (Lemmy, Mbin, NodeBB) are left out intentionally:

  • No thread or reply editing or deletion (Update(Page)/Delete(Page)/Update(Note)/Delete(Note)/Tombstone).
  • No link threads, just text threads.
  • No moderation (mod roles, removals, bans, reports).
  • No ranking algorithms (hot/active/scaled), just reverse chronological.
  • No private communities, no media uploads, no DMs.
  • No Lemmy-specific extensions (attributedTo, moderators, featured, postingRestrictedToMods). Lemmy can dereference the community actor and follow it, but it won't treat it as a full Lemmy community.

Dependencies

This project is written in TypeScript and runs on Node.js. You need Node.js 22.0.0 or later. Besides Fedify and Next.js, the runtime dependencies are:

  • Drizzle ORM for database access.
  • better-sqlite3 for the SQLite driver.
  • x-forwarded-fetch for honouring reverse-proxy headers.

See package.json for the full list.

How to run

Install dependencies:

npm install

Create the SQLite database:

npm run db:push

Start the Next.js development server:

npm run dev

Visit http://localhost:3000/ in your browser.

To federate with the rest of the fediverse, expose the server to the public internet. The quickest way is a tunnel:

npx @fedify/cli tunnel 3000

See the tunneling-services section of Fedify's manual for alternatives.

License

This program is licensed under the MIT License. See the LICENSE file for details.

About

Federated threadiverse example using Fedify and Next.js

fedify.dev/tutorial/threadiverse

Topics

activitypubexamplefedifyfediversenextjsthreadiverse

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.