Channels - patchwork-hub/patchwork_dashboard GitHub Wiki
Overview
Channels are custom feeds for the open social web, connecting conversations and communities from across the decentralised open social web.
The Channels package allows you to build and host Channels locally on your server. Channel creation and management happen in the dashboard.
See examples of Channels curated by us here and made by the public here.
Channels features
Channels are:
- Customisable with an avatar, header and bio
- Curated by following contributors and muting keywords or post types like replies or reposts
- Broadcast across the open social web, including to platforms like Mastodon or Bluesky
- Followable
The Channel creation wizard in the dashboard offers a step by step guide to creating Channels.
Installation guide
You can install Patchwork Channels from source-code or using a Docker image. To install from source-code, please see the instructions on below. To install Patchwork Channels using Docker approach, please use the guides here.
1.1 Project setup
Pre-requisites
- A up & running Mastodon instance
- Ruby v3.3.0
-
Download Patchwork Channels repository:
Download the latest release of Patchwork Channels from here.
-
Create .env file by copying the .env.sample file:
cp .env.sample .env
-
Carefully read the comments in the ENV file and configure the environment accordingly, then set CHANNELS_ENABLED=true.
-
Install the gems:
bundle install
- Run database migrations:
bundle exec rails db:migrate
- Import required data and create a master admin account:
bundle exec rails db:seed
- Start your server(change the port number according to your need):
bundle exec rails s -p 3001
bundle exec sidekiq -C config/sidekiq.yml
1.2 Activate Patchwork Dashboard
To fully activate your Patchwork Dashboard, add an API key by following below steps:
-
Generate an API key
- Go to Patchwork Hub, register a new account and verify it.
- Configure your server by adding your Mastodon server URL (e.g., https://mastodon.social) and your Dashboard URL (e.g., https://dashboard.mastodon.social).
- Generate an API key, then copy the KEY and SECRET values. You'll need to add both to the API Key section in your Patchwork Dashboard.
-
Add the generated API key in your Patchwork Dashboard
- Login to your Patchwork Dashboard with the master admin account.
- On the left-side menu, click the "API key".
- In the API key page, add the Key and Secret values generated from the Patchwork Hub.
- After entering the credential, the Patchwork Dashboard is fully activated.
1.3 Plug-ins installation
In order to expand your server’s capabilities and let its unique features interface with apps, you must install the following plug-ins in your Mastodon instance. This is an essential step. If you do not do this, key features enabled by Patchwork will not be usable by users on your server.
This setup assumes that you have installed Mastodon from source. All four plug-ins are mandatory for your instance.
-
Accounts
A Ruby on Rails plugin that adds custom account management, push notifications, and authentication overrides to Mastodon instance. -
Content filters
A Ruby on Rails plugin that filters Mastodon timelines by defined keywords and hashtags. -
Conversations
A Ruby on Rails plugin that extends Mastodon conversations with custom API endpoints and mobile app functionality. -
Custom feeds
A Ruby on Rails plugin that provides customizable timeline functionality for Mastodon. -
Posts
A Ruby on Rails plugin that enhances Mastodon’s posting features with customizable character limits, draft management, quote posts, and automatic ALT text generation.
- Connect to your Mastodon instance's server, access the installation files and locate the Gemfile. Add the ruby gems below to the Gemfile:
gem "accounts", git: "https://github.com/patchwork-hub/accounts/"
gem "content_filters", git: "https://github.com/patchwork-hub/content_filters"
gem "conversations", git: "https://github.com/patchwork-hub/conversations"
gem "custom_feeds", git: "https://github.com/patchwork-hub/custom_feeds"
gem "posts", git: "https://github.com/patchwork-hub/posts"
- Run the bundle command to install the gems:
$ bundle install
- Run migration command:
$ bundle exec rails db:migrate
- Run the gem setup command for the necessary setup:
bundle exec rake content_filters:install
- Add below environment keys to your Mastodon instance:
# The unique identifier for your Google Firebase project.
FIREBASE_PROJECT_ID: "your_firebase_project_id"
# File name (with extension) of the Firebase Service Account private key.
FIREBASE_KEY_FILE_NAME: "your_firebase_private_key_file_name.json"
# Display name for outgoing push notifications.
NOTIFICATION_SENDER_NAME: "your_push_notificat_on_sender_name"
# Name shown in the "From" field of sent emails.
MAIL_SENDER_NAME: "your_mail_sender_name"
# Public URL for email logo.
MAIL_LOGO_URL: "https://example.com.s3.eu-west-2.amazonaws.com/example.png"
# iOS App Store download link.
IOS_APP_STORE_URL: "https://apps.apple.com/us/app/patchwork-your-social-media/id6749952762"
# Google Play Store download link.
ANDROID_APP_STORE_URL: "https://play.google.com/store/apps/details?id=com.patchwork.demo&hl=en"
# App privacy policy URL.
PRIVACY_POLICY_URL: "https://patchwork.io/privacy-policy"
# App terms and conditions URL.
TERMS_AND_CONDITIONS_URL: "https://patchwork.io/terms-of-service"
# Enable or disable post reblogging by channel bot.
BOOST_BOT_ENABLED: true
- After that, restart your application to load the gems.