Alternative frontend for Akkoma
Find a file
2020-04-21 12:35:37 -05:00
app Fall back to page title 2020-04-21 12:04:00 -05:00
docs Add docs 2020-04-18 17:06:51 -05:00
public Obliterate initial-state nonsense 2020-04-17 18:25:36 -05:00
webpack Proxy to HTTPS with webpack dev server 2020-04-21 12:35:37 -05:00
.editorconfig Add .editorconfig 2020-04-11 15:02:30 -05:00
.eslintignore Copy in Mastodon's Yarn scripts and linter configs 2020-04-14 12:30:26 -05:00
.eslintrc.js Enforce no mixed tabs and spaces 2020-04-18 14:04:18 -05:00
.gitignore Copy in Mastodon's Yarn scripts and linter configs 2020-04-14 12:30:26 -05:00
.gitlab-ci.yml Invalidate CI cache based on yarn.lock instead of package.json 2020-04-17 13:18:33 -05:00
.sass-lint.yml Copy in Mastodon's Yarn scripts and linter configs 2020-04-14 12:30:26 -05:00
babel.config.js Building succeeds 2020-03-27 19:35:00 -05:00
jest.config.js Ignore avatar tests for now due to #34 2020-04-18 14:02:13 -05:00
LICENSE Add LICENSE and README 2020-03-28 16:06:29 -05:00
package.json Fix NODE_ENV issue on yarn start 2020-04-16 18:50:41 -05:00
postcss.config.js Building succeeds 2020-03-27 19:35:00 -05:00
README.md Add back yarn dev for convenience 2020-04-14 16:50:42 -05:00
yarn.lock Allow switching theme, fixes #5 2020-04-14 22:09:59 -05:00

soapbox-fe

This is the frontend for Soapbox. It is based on Gab Social's frontend which is in turn based on Mastodon's frontend.

Running locally

To get it running, just clone the repo:

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

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

yarn

Finally, run the dev server:

yarn start

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

It will proxy requests to the backend for you. For Pleroma no other changes are required, just start Pleroma and it should begin working.

Using with Mastodon

For Mastodon you will need to edit webpack/development.js and change the proxy port to 3000: const backendUrl = 'http://localhost:3000'; then restart the soapbox-fe dev server.

Streaming will not work properly without extra effort.

Due to Mastodon not supporting authentication through the API, you will also need to authenticate manually. First log in through the Mastodon interface, view the source of the page, and extract your access_token from the markup. Then open soapbox-fe, open the console, and insert the following code:

window.localStorage.setItem('soapbox:auth:user', JSON.stringify({access_token: "XXX"}));

Replace XXX with your access token. Finally, refresh the page, and you should be logged in.

Yarn Commands

The following commands are supported.

Local dev server

  • yarn start - Run the local dev server. It will proxy requests to the backend for you.

  • yarn dev - Exact same as above, aliased to yarn start for convenience.

Building

  • yarn build:development - Build for development.

  • yarn build:production - Build for production.

Translations

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

Tests

  • yarn test - Runs all tests.

  • yarn test:lint - Runs all linter tests.

  • yarn test:lint:js - Runs only JavaScript linter.

  • yarn test:lint:sass - Runs only SASS linter.

  • yarn test:jest - Frontend unit tests.

License

soapbox-fe 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-fe 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-fe. If not, see https://www.gnu.org/licenses/.