llun/activities.next
À propos
A Next.JS ActivityPub server.
Développement web et applicatifWhat you can do
- Fediverse-ready — Full ActivityPub federation with other servers
- Mastodon API compatible — Use your favorite Mastodon client apps (compatibility reference)
- OAuth 2.0 provider — Acts as a full OAuth 2.0 / OpenID Connect server
- Database options — SQLite (better-sqlite3) and PostgreSQL (pg)
Progression mesurée des étoiles
- in 24h
- -1
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalActivity.next
Activity.next is a self-hosted ActivityPub server built with Next.js and TypeScript. It enables you to run your own instance in the Fediverse — the decentralized social media network — and interact with Mastodon, Pleroma, Misskey, and other ActivityPub-compatible platforms.
✨ Highlights
- Fediverse-ready — Full ActivityPub federation with other servers
- Mastodon API compatible — Use your favorite Mastodon client apps (compatibility reference)
- OAuth 2.0 provider — Acts as a full OAuth 2.0 / OpenID Connect server
- Database options — SQLite (
better-sqlite3) and PostgreSQL (pg) - Media and fitness storage — Store image/video media and fitness files on the local filesystem, AWS S3, or S3-compatible object storage
- Fitness tracking — Upload .fit, .gpx, and .tcx activity files with route maps, stats, heatmaps, and Strava imports
- Docker-ready — Official Docker image available at
ghcr.io/llun/activities.next
See the full Features list for the current features.
🏗️ Architecture Overview
┌──────────────────────────────────────────────────────────┐
│ Client Layer │
│ Web browser, Mastodon apps, ActivityPub servers │
└────────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────────┐
│ Next.js App Router (app/) │
│ Pages/SSR, Mastodon API, ActivityPub, auth, OAuth routes │
└────────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────────┐
│ Core Services (lib/) │
│ Auth, media, fitness, federation, delivery, imports │
└────────────────────────────┬─────────────────────────────┘
▼
┌──────────────────────────────────────────────────────────┐
│ Infrastructure │
│ SQLite/PostgreSQL, local/S3 storage, QStash/sync jobs │
└──────────────────────────────────────────────────────────┘
For a more detailed architecture overview, see docs/architecture.md.
🚀 Getting Started
Prerequisites
- Node.js 26 (the repo pins
engines.nodeto26.x) - Yarn 4 via Corepack (the exact version is pinned by the
packageManagerfield inpackage.json) - A domain name (required for federation)
Quick Start
In a hurry? The Quickstart gets a local instance running with the least possible setup — SQLite and the three core settings (host, secret phrase, and a database).
Clone the repository:
git clone https://github.com/llun/activities.next.git cd activities.nextEnable Corepack (for Yarn 4 support; Node.js 26 no longer bundles
corepack):npm install -g corepack corepack enableInstall dependencies:
yarn installConfigure your instance (see the Setup Guide):
cp .env.example .env.local # Edit .env.local with your configurationA minimal local
.env.locallooks like:ACTIVITIES_HOST=localhost:3000 ACTIVITIES_SECRET_PHASE=local-dev-secret-phrase-change-me ACTIVITIES_INSECURE_AUTH=true ACTIVITIES_ALLOW_EMAILS='["[email protected]"]' ACTIVITIES_DATABASE_CLIENT=better-sqlite3 ACTIVITIES_DATABASE_SQLITE_FILENAME=./dev.sqlite3ACTIVITIES_INSECURE_AUTH=trueallows sign-in over plainhttpfor local development only — never set it in production. See the Quickstart Guide for details.Run database migrations:
yarn migrateStart the development server:
yarn devSign up at
http://localhost:3000/auth/signup(if you setACTIVITIES_ALLOW_EMAILS, your email must be in it, e.g.ACTIVITIES_ALLOW_EMAILS='["[email protected]"]'; any email works if you left it unset).
For detailed setup instructions, see the Setup Guide.
🐳 Deployment
Docker (Recommended)
docker run -p 3000:3000 \
-e ACTIVITIES_HOST=your.domain.tld \
-e ACTIVITIES_SECRET_PHASE=change-me-to-a-random-secret-at-least-32-chars \
-e ACTIVITIES_DATABASE_SQLITE_FILENAME=/opt/activities.next/data/data.sqlite \
-e 'ACTIVITIES_ALLOW_EMAILS=["[email protected]"]' \
-e ACTIVITIES_MEDIA_STORAGE_TYPE=fs \
-e ACTIVITIES_MEDIA_STORAGE_PATH=/opt/activities.next/data/uploads \
-v /path/to/data:/opt/activities.next/data \
ghcr.io/llun/activities.next:main
The official image is published with the main tag (there is no latest tag) and is a minimal build pre-configured for SQLite. Optional dependencies (such as PostgreSQL via @activities/pg, Google Cloud Tasks via @activities/cloudtasks, or Upstash QStash via @activities/qstash) are modularized into Yarn workspaces and can be included by building a custom image with --build-arg WORKSPACES="...". The production runtime rejects an ACTIVITIES_SECRET_PHASE shorter than 32 characters. Mount persistent data under /opt/activities.next/data as above — do not bind-mount /opt/activities.next itself, because that directory contains the application and a host-path mount would shadow it. The image ships a pre-migrated SQLite database at /opt/activities.next/data.sqlite; when you point ACTIVITIES_DATABASE_SQLITE_FILENAME at a mounted path instead, run yarn migrate against that file first (see the SQLite Setup guide).
For PostgreSQL or advanced Docker setups, see:
Vercel
- Fork this repository
- Connect it to your Vercel account
- Add the required environment variables (see Setup Guide)
- Deploy
Note: Vercel deployments require an external PostgreSQL database and S3-compatible storage.
📚 Documentation
| Document | Description |
|---|---|
| Quickstart | Fastest minimal local setup (SQLite, 3 core settings) |
| Setup Guide | General configuration and first-time setup |
| Architecture | System architecture, data flow, and design decisions |
| SQLite Setup | SQLite database configuration and Docker deployment |
| PostgreSQL Setup | PostgreSQL database configuration and Docker deployment |
| Environment Variables | Complete reference for all configuration options |
| Features | Current features |
| Fitness File Storage | Fitness upload, processing, Strava, and heatmap details |
| Maintenance Scripts | Admin scripts for media cleanup and user management |
| Mastodon API Compatibility | Compatibility reference, intentional divergences, and extensions |
| Contributing | Guidelines for contributors |
🤝 Contributing
Contributions are welcome! Please read our Contributing Guide for details on the development workflow, coding standards, and pull request process.
📄 License
This project is licensed under the MIT License — see LICENSE.md for details.
Explorer des projets similaires
Chargement…