Pleroma's Mastodon Frontend
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sorin Davidoi c2588e503b
feat(css): Styled scrollbars in Firefox Nightly (#8653)
4 months ago
.circleci Use CircleCI workflows for ruby dependencies (#8228) 5 months ago
.github Multiple Issue templates (#7402) 8 months ago
app feat(css): Styled scrollbars in Firefox Nightly (#8653) 3 months ago
bin Add improved CLI interface for removing remote media (#8411) 4 months ago
config config/webpack/production.js: Remove caching in OfflinePlugin (introduced in 0692991b5) 3 months ago
db Add missing indices for ON DELETE CASCADE constraints (#8332) 4 months ago
docs Fix redirect link on Tuning.md (#1595) 1 year ago
lib Bump version to 2.5.0 4 months ago
log Initial commit 2 years ago
nanobox [Nanobox] Tuning Update (#6660) 10 months ago
public update twemojie to v2 (#7911) 6 months ago
spec Add preference for report notification e-mails, skip for duplicates (#8559) 4 months ago
streaming Add health endpoint to streaming API (#8441) 4 months ago
vendor/assets Initial commit 2 years ago
.babelrc Remove debug option from Babel preset env (#6852) 10 months ago
.buildpacks Add ffmpeg buildpack for scalingo (#8500) 4 months ago
.codeclimate.yml fix RuboCop error (#7442) 7 months ago
.dockerignore Add .bundle to .dockerignore (#7895) 6 months ago
.editorconfig Add final newline to locale files (#2890) 1 year ago
.env.nanobox Rename S3_CLOUDFRONT_HOST to S3_ALIAS_HOST. (#8423) 4 months ago
.env.production.sample Rename S3_CLOUDFRONT_HOST to S3_ALIAS_HOST. (#8423) 4 months ago
.env.test Add parallel test processors (#7215) 8 months ago
.env.vagrant Add a default LOCAL_DOMAIN=mastodon.dev to .env.vagrant 2 years ago
.eslintignore Dev Tooling fixes (eslint/editorconfig) (#1398) 1 year ago
.eslintrc.yml Update ESLint for Code Climate (#7696) 7 months ago
.foreman Replace sprockets/browserify with Webpack (#2617) 1 year ago
.gitattributes Add .gitattributes file to avoid unwanted CRLF (#3954) 1 year ago
.gitignore Ignore elasticsearch directory (#7070) 9 months ago
.gitlab-ci.yml Add GitLab CI config 3 months ago
.haml-lint.yml Added haml-lint and fix warnings (#2773) 1 year ago
.nanoignore Remove Storybook (#4397) 1 year ago
.nvmrc Upgrade Node.js to v8.x on nvmrc (#8023) 6 months ago
.postcssrc.yml Add object-fit polyfill for Edge (#4182) 1 year ago
.profile Add ffmpeg and dependent packages as well as LD_LIBRARY_PATHs (#3276) 1 year ago
.rspec Adding a Mention model, test stubs 2 years ago
.rubocop.yml Fix low-hanging rubocop gripes (#8458) 4 months ago
.ruby-version Update Ruby to version 2.4.4 (#6964) 9 months ago
.scss-lint.yml Enable CodeClimate SCSS Lint checks (#2886) 1 year ago
.slugignore Remove Storybook (#4397) 1 year ago
.yarnclean Reduce container size with clean yarn (#3506) 1 year ago
AUTHORS.md docs: Add AUTHORS file (#6685) 10 months ago
Aptfile Add dependencies for uWebSockets (#7466) 6 months ago
CODE_OF_CONDUCT.md Add code of conduct from GitHub generator (#5674) 1 year ago
CONTRIBUTING.md Improve “how to translate” (#7358) 8 months ago
Capfile remove capistrano/faster_assets from Capfile (#2737) 1 year ago
Dockerfile Dockerfile: run asset precompilation as a build step (#7780) 6 months ago
Gemfile Add thor to Gemfile directly (#8467) 4 months ago
Gemfile.lock Add thor to Gemfile directly (#8467) 4 months ago
LICENSE Fix #49 - License changed from GPL-2.0 to AGPL-3.0 2 years ago
Procfile More robust PuSH subscription refreshes (#2799) 1 year ago
Procfile.dev Fix Procfile on OS X (#6748) 10 months ago
README.md README.md: document deployement with build.sh 3 months ago
Rakefile Initial commit 2 years ago
Vagrantfile Fix nodejs 8.x install in vagrant (#8105) 5 months ago
app.json Change logo URL for Heroku and Scalingo (#4476) 1 year ago
boxfile.yml [Nanobox] Enable ElasticSearch support by default (#6977) 9 months ago
build.sh remove gzip on assets, add build.sh 3 months ago
config.ru Fix rubocop issues, introduce usage of frozen literal to improve performance 2 years ago
docker-compose.yml Update docker config and move some workers to different queues (#8345) 4 months ago
jest.config.js Enable coverage for Jest (#5442) 1 year ago
package.json package.json: fixup remove compression-webpack-plugin 3 months ago
priv-config TOR federation (#7875) 6 months ago
scalingo.json Add ffmpeg buildpack for scalingo (#8500) 4 months ago
yarn.lock yarn.lock: Update 3 months ago

README.md

Mastodon Tootsuite / mastofe repository

Here is a fork of mastodon. We could really just remove all of the code except for the frontend, but to easily pull the upstream repo we’ll just keep everything. This is my fork for the moment with the idea of making the mastofe just as polished as the pleromafe. If you want to get access, open an issue or hit me up at howl@social.zxq.co.

Deployement

This is what you want to do to update the mastofe bundled with pleroma.

  • Run build.sh at the root of this repo, you can set the TARGET environment variable if pleroma isn’t at ../pleroma (default value of TARGET)
  • Go to pleroma repo:
    • git add priv/static/sw.js priv/static/packs
    • git commit -m "update mastofe"

Development

I use a combination of the pleroma backend + yarn + nginx to do local development. I refuse to install Ruby. Here’s how to get it running on your own machine:

Install yarn

Yarn will be needed to set up the mastodon frontend for development. Check out https://yarnpkg.com/lang/en/docs/install/ . For Debian, it’s like this:

# import yarn pub key and repo
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install yarn

Mastodon Frontend Setup

# Install dependencies
yarn install -D
npm run dev
# check that http://localhost:3035/packs/common.css works in your browser once
# webpack is done compiling. if css shows up, then it should have worked!

nginx setup

I’ll assume that you have already fired up pleroma using the installation guide. To work on the frontend while still having the backend up, use this nginx config.

server {
    listen 80;
    server_name pleroma.testing;

    location /packs {
        add_header 'Access-Control-Allow-Origin' '*';
        proxy_http_version 1.1;
        proxy_set_header Host $http_host;

        proxy_pass http://localhost:3035;
    }

    location / {
        add_header 'Access-Control-Allow-Origin' '*';
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;

        proxy_pass http://localhost:4000;
    }
}

Change the server_name if you like. I personally like to create a new entry in /etc/hosts and add 127.0.0.1 pleroma.testing, but you do what suits you.

If you have enough luck, navigating to your <server_name>/web should show you the mastodon frontend, and should also work with all the nice things of webpack such as hot reloading. Have fun!