Patchwork Dashboard - patchwork-hub/patchwork_dashboard GitHub Wiki
Overview
The dashboard makes it easier to manage your Mastodon instance, and gives you more control. It also enhances the experience of users on your server by bringing additional features.
Dashboard features
Opt users in to search
By default, Mastodon users have to opt-in to allowing their profile and public posts to be indexed during searches. Patchwork enables the admin to choose whether all new users are opted-in to Search when they join. Users can always opt out if they choose.
Custom post length
Choose the maximum number of characters you want a post to be.
Auto-Bluesky bridge
Automatically bridge new users to Bluesky via Bridgy Fed. Users can always opt out if they choose. Please note, bridging takes place two weeks after the account has been created.
Spam block
Block spam posts arriving on your server from the federated network. Filters identify keywords or phrases associated with spam in a post. Create your own list for customised filters.
Content filters
Block harmful content arriving on your server from the federated network. Filters identify keywords or phrases in lists of words for specific harms eg. NSFW, Hate speech etc. Each list can be toggled on or off. Create your own list for customised filters.
Customise email branding
Replace the Mastodon logo in automatic emails with your own. This feature allows you to add your own header image, footer image and accent colour.
Installation guide
You can install Patchwork from source-code or using a Docker image. To install from source-code, please see the instructions on below. To install Patchwork using a Docker image, please use the guides here.
1.1 Project setup
Pre-requisites
- Up & running a Mastodon instance
- Ruby v3.3.0
-
Download Patchwork Dashboard repository:
Download the latest release of Patchwork Dashboard Basic from here.
-
Create .env file by copying the .env.sample file:
cp .env.sample .env
-
Read the comments mentioned in the ENV file thoroughly and configure the environment accordingly.
-
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 3002
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.
- Once you have verified it, generate an API key on the landing page of the Patchwork Hub.
-
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 enable The Newsmast Foundation's apps to work, you need to install the following plug-ins in your Mastodon instance as required to deliver the associated features in the app. This is an essential step to deliver these features to your users. The version of the app you install needs to be matched to these Gems, to ensure that the app works as expected.
This setup assumes that you have installed Mastodon from source.
-
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. -
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 "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:
AUTO_FOLLOW_ENABLED=false
ALT_TEXT_ENABLED=false
BOOST_POST_ENABLED=false
- After that, restart your application to load the gems.