A revolutionary social media platform built on Mastodon's open-source foundation, designed to empower communities and organizations with their own branded social media experience.
Patchwork is a powerful, white-label social media app that puts control back in the hands of communities. Built around your content and community, Patchwork connects you with a global movement working for positive social change.
- π Modern Tech Stack: Next.js 15, TypeScript, Tailwind CSS v4
- β‘ Lightning Fast: Turbopack for instant development builds
- π Security First: CodeQL scanning, automated security updates
- π Global Ready: Multi-language support (8 languages)
- π Federated: Connect with Mastodon, Pixelfed, Bluesky, and more
- π§ͺ Well Tested: Comprehensive test suite with 39+ tests
This project requires three main components to be set up:
- Mastodon Instance - The federated social network backend
- Patchwork Dashboard - Admin dashboard for managing the platform
- Patchwork Web App - This frontend application
- Node.js 18.x or 20.x
- Package Manager: npm, yarn, or pnpm
- Docker (for Patchwork Dashboard)
- Git for version control
Patchwork requires a Mastodon instance as the backend. You have two options:
- Use a public instance like
mastodon.socialorchannel.org - Create an account and proceed to OAuth setup
Follow the official Mastodon documentation:
# Follow the complete installation guide
# https://docs.joinmastodon.org/admin/install/Key steps:
- Server Setup: Ubuntu 22.04 LTS with at least 2GB RAM
- Dependencies: Install Ruby, Node.js, PostgreSQL, Redis, Nginx
- Mastodon Installation: Clone and configure Mastodon
- Domain Configuration: Set up SSL certificates
- Admin Account: Create initial admin user
π Official Guide: Mastodon Installation Documentation
The Patchwork Dashboard provides admin functionality for managing your platform.
# Pull the latest Patchwork Dashboard image
docker pull patchworkhub/patchwork-dashboard:latest
# Run the dashboard container
docker run -d \
--name patchwork-dashboard \
-p 8080:80 \
-e API_URL=https://your-mastodon-instance.com \
-e DASHBOARD_SECRET=your-secret-key \
patchworkhub/patchwork-dashboard:latestπ Dashboard Repository: patchwork-hub/patchwork_dashboard
Create an OAuth application in your Mastodon instance:
- Log in to your Mastodon instance
- Go to: Preferences β Development β New Application
- Configure:
- Application name:
Patchwork Web App - Website:
https://your-domain.com - Redirect URI:
https://your-domain.com/auth/sign-in - Scopes:
read write follow push
- Application name:
- Save and note the Client ID and Client Secret
# Clone this repository
git clone https://github.com/patchwork-hub/patchwork-web-app.git
cd patchwork-web-app
# Install dependencies (choose one)
npm install
# or
yarn install
# or
pnpm install
# Copy environment template
cp .env.sample .env.local
# Edit environment variables (see configuration below)
nano .env.local
# Start development server
npm run dev
# or
yarn dev
# or
pnpm dev# Clone and install
git clone https://github.com/patchwork-hub/patchwork-web-app.git
cd patchwork-web-app
# Install dependencies
npm ci --production
# or
yarn install --production
# or
pnpm install --production
# Copy and configure environment
cp .env.sample .env
nano .env
# Build the application
npm run build
# or
yarn build
# or
pnpm build
# Start production server
npm start
# or
yarn start
# or
pnpm startCopy the sample environment file:
cp .env.sample .env.local # For development
# or
cp .env.sample .env # For production| Command | Description |
|---|---|
npm run dev / yarn dev / pnpm dev |
Start development server |
npm run build / yarn build / pnpm build |
Build for production |
npm start / yarn start / pnpm start |
Start production server |
npm run lint / yarn lint / pnpm lint |
Run ESLint |
npm test / yarn test / pnpm test |
Run test suite |
npm run type-check / yarn type-check / pnpm type-check |
TypeScript checking |
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Patchwork β β Mastodon β β Patchwork β
β Web App βββββΊβ Instance βββββΊβ Dashboard β
β (Frontend) β β (Backend) β β (Admin) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
- Patchwork Web App: Next.js frontend application (this repository)
- Mastodon Instance: Federated social network backend
- Patchwork Dashboard: Admin interface for platform management
# Start all services locally
npm run dev # Web app on :3000
# Mastodon on :3000 (if self-hosted)
# Dashboard on :8080npm i -g vercel
vercel --prod# docker-compose.yml
version: '3.8'
services:
web-app:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=production
dashboard:
image: patchworkhub/patchwork-dashboard:latest
ports:
- "8080:80"# Build and deploy manually
npm run build
npm start# Run all tests
npm test
# or
yarn test
# or
pnpm test
# Run tests with ui
npm run test:ui
# or
yarn test:ui
# or
pnpm test:uiWe welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and add tests
- Run the test suite:
npm test - Commit your changes:
git commit -m 'feat: add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Patchwork is an open source project, licensed under AGPL-3.0. Have fun!
- Mastodon: For the federated social network foundation
- Next.js Team: For the incredible React framework
- Open Source Community: For the amazing tools and libraries
Built with β€οΈ by the Patchwork Community
Website β’ Dashboard Repo β’ Documentation β’ Community