- JavaScript 82.8%
- SCSS 12.4%
- TypeScript 4.7%
- HTML 0.1%
|
|
||
|---|---|---|
| .woodpecker | ||
| app/javascript | ||
| config | ||
| public | ||
| .browserslistrc | ||
| .dockerignore | ||
| .editorconfig | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc.js | ||
| .yarnclean | ||
| .yarnrc.yml | ||
| app.json | ||
| AUTHORS.md | ||
| babel.config.js | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| Dockerfile | ||
| eslint.config.js | ||
| jest.config.js | ||
| jsconfig.json | ||
| LICENSE | ||
| nginx.conf | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| stylelint.config.js | ||
| tsconfig.json | ||
| yarn.lock | ||
Masto-FE (🦥 flavour)
This is a fork of Iceshrimp's Masto-FE Standalone repository, which is itself a fork of Mastodon Glitch Edition, which in turn forks Mastodon. Phew!
The goal of this repository is to make it possible to smoothly and intuitively use the Mastodon frontend with a GoToSocial instance as the backend.
This mostly means making changes to the frontend to allow it to work with GoToSocial-specific features, making it slightly less Mastodon-y by changing some of the branding, wording, iconography, etc, and fixing other small issues.
There's a version running here that you can try:
https://masto-fe.superseriousbusiness.org
The application doesn't gather or store any information that you give it, including access tokens or passwords, everything just happens in your browser's local storage.
Building
Not Docker
You need Node and Yarn installed for this. To avoid fuckery, Node Version Manager is highly recommended: https://github.com/nvm-sh/nvm.
Once you've installed Node + Yarn, you can build the whole thingy by running:
yarn && yarn build:production
Docker (don't need to have Node or Yarn installed)
You can build a docker container for the whole thingy by running (for example):
docker build -t superseriousbusiness/masto-fe-standalone:0.1.0 .
Deploying
Not Docker
Serve all the stuff in public behind an nginx or whatever you want! See the included nginx.conf for one example of how to do this, it's not too bad.
Docker (definitely the easiest way)
The Docker container is based on Nginx, and serves over port 80. Just deploy it and listen on that port, preferably with a reverse proxy at some point (Traefik? Caddy? Another Nginx perhaps?) handling https.
Testing locally, linting, etc
See CONTRIBUTING.md!
Forced Instance Configuration
You can configure Masto-FE to automatically use a specific Mastodon instance without requiring users to enter it manually. This is useful for deployments where you want to restrict users to a specific instance.
Configuration Options
-
Using config.js file:
- Edit the
public/config.jsfile and setforceInstanceDomainto your desired instance domain. - Example:
const forceInstanceDomain = "mastodon.social";
- Edit the
-
Using Docker:
- Create a custom
config.jsfile based on the providedpublic/config.js. - Mount this file when running the Docker container:
docker run -v "/path/to/custom/config.js:/usr/share/nginx/html/config.js:ro" ... [other options] [image]
- Create a custom
How It Works
When forceInstanceDomain is set to a non-null value:
- The instance field will be automatically filled with the specified domain
- The authentication process will start immediately
- Users will be redirected to the authorization page of the specified instance
When forceInstanceDomain is null (default):
- The application behaves normally, requiring users to enter their instance manually
- After authentication, the instance is stored in localStorage for future use