A social media frontend with a focus on custom branding and ease of use. https://soapbox.pub
 
 
 
 
 
Go to file
Alex Gleason 1334241873
CHANGELOG: add i18n notes
2022-12-18 12:37:07 -06:00
.github Move FUNDING.yml to .github/FUNDING.yml 2022-04-18 16:20:40 -05:00
.gitlab Add default MR template 2022-08-08 16:02:25 -04:00
.husky Use lint-staged with Husky to only lint changed files 2021-09-15 11:00:50 -05:00
.vscode soapbox-pub/soapbox-fe --> soapbox-pub/soapbox 2022-09-04 15:15:54 -05:00
app Fix demo mode 2022-12-18 12:29:31 -06:00
custom Revert "Replace 'send' icon from Tabler" 2022-12-05 13:09:23 -05:00
docs These instructions are outdated with a 1.3.0 install. 2022-12-02 00:33:54 +00:00
installation Docker: open fallback backend at :4444 2022-09-04 15:02:12 -05:00
jest Upgrade Jest to v28 2022-07-05 11:30:08 -05:00
tailwind Remove unused sea-blue color 2022-12-17 11:47:18 -06:00
types translationRunner: convert to TypeScript 2022-11-08 13:01:39 -06:00
webpack Revert "Remove 'show on map' for now" 2022-12-08 16:30:48 +01:00
.dockerignore dockerignore: .git 2022-09-04 12:54:41 -05:00
.editorconfig Add .editorconfig 2020-04-11 15:02:30 -05:00
.env.example Patron updates 2020-06-30 17:33:21 -05:00
.eslintignore eslintignore: /custom/** 2022-05-16 10:08:50 -05:00
.eslintrc.js Fix conflict between eslint / typescript 2022-09-27 09:59:01 -04:00
.gitattributes Add .gitattributes, prevent conflicts on CHANGELOG.md 2022-12-14 17:44:16 -06:00
.gitignore Produce a junit.xml during test:coverage 2022-06-13 13:26:51 -05:00
.gitlab-ci.yml GitLab CI: let deps job be interrupted 2022-12-17 16:25:28 -06:00
.lintstagedrc.json Revert "Merge branch 'revert-f59d977a' into 'develop'" 2022-02-27 00:13:35 +00:00
.stylelintrc.json Start adding dark mode 2022-03-23 19:18:37 -05:00
.tool-versions Upgrade to Node 18 2022-06-01 13:22:49 -05:00
CHANGELOG.md CHANGELOG: add i18n notes 2022-12-18 12:37:07 -06:00
COFE_OF_CONDUCT.md Replace code of conduct with cofe of conduct 2020-05-29 00:57:07 -05:00
Dockerfile Docker: open fallback backend at :4444 2022-09-04 15:02:12 -05:00
Dockerfile.dev Support Docker local development 2022-10-27 12:09:12 -05:00
LICENSE Add LICENSE and README 2020-03-28 16:06:29 -05:00
README.md Adding a link to Weblate in our project's homepage 2022-12-17 03:05:47 +00:00
app.json Add app.json 2022-09-01 17:11:57 -05:00
babel.config.js Remove @ decorators 2022-11-03 15:33:51 -05:00
compose-dev.yaml Support Docker local development 2022-10-27 12:09:12 -05:00
dangerfile.ts Danger: don't warn about changelog for docs, CI, etc 2022-12-17 10:42:05 -06:00
heroku.yml Add heroku.yml so it uses the Dockerfile 2022-09-01 17:21:05 -05:00
jest.config.js Delete custom locale-data 2022-12-15 14:57:19 -06:00
jsdoc.conf.js Rename files (14): cleanup misc v2 2022-11-16 08:35:35 -05:00
package.json Revert "Remove 'show on map' for now" 2022-12-08 16:30:48 +01:00
postcss.config.js Add Tailwind 2022-03-19 13:24:16 -05:00
renovate.json Renovate: add GitHub access token for release notes 2020-10-05 15:51:58 -05:00
soapbox-screenshot.png README: update screenshot 2022-11-16 19:15:41 -06:00
tailwind.config.js Remove unused sea-blue color 2022-12-17 11:47:18 -06:00
translationRunner.ts translationRunner: improve types 2022-11-08 15:33:47 -06:00
tsconfig.json Remove @ decorators 2022-11-03 15:33:51 -05:00
webpack.config.ts Convert Webpack configuration to TypeScript 2022-10-14 15:32:26 -05:00
yarn.lock Revert "Remove 'show on map' for now" 2022-12-08 16:30:48 +01:00

README.md

Soapbox

Soapbox Screenshot

Soapbox is a frontend for Mastodon and Pleroma with a focus on custom branding and ease of use.

Try it out

Visit https://fe.soapbox.pub/ and point it to your favorite instance.

🚀 Deploy on Pleroma

Installing Soapbox on an existing Pleroma server is extremely easy. Just ssh into the server and download a .zip of the latest build:

curl -L https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/develop/download?job=build-production -o soapbox.zip

Then unpack it into Pleroma's instance directory:

busybox unzip soapbox.zip -o -d /opt/pleroma/instance

That's it! 🎉 Soapbox is installed. The change will take effect immediately, just refresh your browser tab. It's not necessary to restart the Pleroma service.

For OTP releases, unpack to /var/lib/pleroma instead.

To remove Soapbox and revert to the default pleroma-fe, simply rm /opt/pleroma/instance/static/index.html (you can delete other stuff in there too, but be careful not to delete your own HTML files).

🐘 Deploy on Mastodon

See Installing Soapbox over Mastodon.

How does it work?

Soapbox is a single-page application (SPA) that runs entirely in the browser with JavaScript.

It has a single HTML file, index.html, responsible only for loading the required JavaScript and CSS. It interacts with the backend through XMLHttpRequest (XHR).

Here is a simplified example with Nginx:

location /api {
  proxy_pass http://backend;
}

location / {
  root /opt/soapbox;
  try_files $uri index.html;
}

(See mastodon.conf for a full example.)

Soapbox incorporates much of the Mastodon API, Pleroma API, and more. It detects features supported by the backend to provide the right experience for the backend.

Running locally

To get it running, just clone the repo:

git clone https://gitlab.com/soapbox-pub/soapbox.git
cd soapbox

Ensure that Node.js and Yarn are installed, then install dependencies:

yarn

Finally, run the dev server:

yarn dev

That's it! 🎉

It will serve at http://localhost:3036 by default.

You should see an input box - just enter the domain name of your instance to log in.

Tip: you can even enter a local instance like http://localhost:3000!

Troubleshooting: ERROR: NODE_ENV must be set

Create a .env file if you haven't already.

cp .env.example .env

And ensure that it contains NODE_ENV=development. Try again.

Troubleshooting: it's not working!

Run node -V and compare your Node.js version with the version in .tool-versions. If they don't match, try installing asdf.

Local Dev Configuration

The following configuration variables are supported supported in local development. Edit .env to set them.

All configuration is optional, except NODE_ENV.

NODE_ENV

The Node environment. Soapbox checks for the following options:

  • development - What you should use while developing Soapbox.
  • production - Use when compiling to deploy to a live server.
  • test - Use when running automated tests.

BACKEND_URL

URL to the backend server. Can be http or https, and can include a port. For https, be sure to also set PROXY_HTTPS_INSECURE=true.

Default: http://localhost:4000

PROXY_HTTPS_INSECURE

Allows using an HTTPS backend if set to true.

This is needed if BACKEND_URL is set to an https:// value. More info.

Default: false

Yarn Commands

The following commands are supported. You must set NODE_ENV to use these commands. To do so, you can add the following line to your .env file:

NODE_ENV=development

Local dev server

  • yarn dev - Run the local dev server.

Building

  • yarn build - Compile without a dev server, into /static directory.

Translations

  • yarn manage:translations - Normalizes translation files. Should always be run after editing i18n strings.

Tests

  • yarn test:all - Runs all tests and linters.

  • yarn test - Runs Jest for frontend unit tests.

  • yarn lint - Runs all linters.

  • yarn lint:js - Runs only JavaScript linter.

  • yarn lint:sass - Runs only SASS linter.

Contributing

We welcome contributions to this project. To contribute, see Contributing to Soapbox.

Translators can help by providing translations through Weblate. Native speakers from all around the world are welcome!

Customization

Soapbox supports customization of the user interface, to allow per-instance branding and other features. Some examples include:

  • Instance name
  • Site logo
  • Favicon
  • About page
  • Terms of Service page
  • Privacy Policy page
  • Copyright Policy (DMCA) page
  • Promo panel list items, e.g. blog site link
  • Soapbox extensions, e.g. Patron module
  • Default settings, e.g. default theme

More details can be found in Customizing Soapbox.

License & Credits

Soapbox is based on Gab Social's frontend which is in turn based on Mastodon's frontend.

Soapbox is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Soapbox is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with Soapbox. If not, see https://www.gnu.org/licenses/.