-
Notifications
You must be signed in to change notification settings - Fork 7
Installation guide
Patchwork is a framework to add a suite of plug-ins to a Mastodon server, creating layers between the underlying plumbing of Mastodon and the frontend app used by a user to access it (usually also Mastodon).
Before running Patchwork, please ensure you have set up a Mastodon server and it is running properly.
You can find the instructions to set up a Mastodon server here.
Patchwork begins with the Dashboard.
Once your Mastodon server is up and running, please begin with this repository to set up the Patchwork Dashboard.
This is the core of Patchwork’s frame, introducing new features itself to make your server more powerful, and allowing you to install additional Patchwork plug-ins with ease.
Pre-requisites
- Up & running a Mastodon instance
- Ruby v3.3.0
- Clone this repository (Patchwork Dashboard) in your server:
git clone git@github.com:patchwork-hub/patchwork_dashboard.git- 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 3002To 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.
Next, expand your server's capabilities by installing following plug-ins in your Mastodon instance. Below setup assumes that you have setup your Mastodon instance from source. All the four plug-ins are mandatory to install in your Mastodon instance.
-
Accounts
Filter timelines with defined hashtags & keywords. -
Content filters
Filter timelines with defined hashtags & keywords. -
Conversations
Filter timelines with defined hashtags & keywords. -
Posts
Filter timelines with defined hashtags & keywords.
- Add the ruby gems in the Gemfile of your Mastodon instance:
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 the gem setup command for the necessary setup:
bundle exec rake content_filters:install- After then, restart your application to load the gems.