Add docs
This commit is contained in:
parent
7712eb6621
commit
1534842da9
2 changed files with 154 additions and 0 deletions
51
docs/history.md
Normal file
51
docs/history.md
Normal file
|
@ -0,0 +1,51 @@
|
|||
# History
|
||||
|
||||
In order to better understand soapbox-fe, this document tells the story of how it came to be.
|
||||
|
||||
## March 2016, Mastodon
|
||||
|
||||
Mastodon, a federated microblogging platform, was released.
|
||||
Mastodon is built with Ruby on Rails and uses React.js for its frontend.
|
||||
|
||||
The React frontend uses [standardized API endpoints](https://docs.joinmastodon.org/methods/accounts/) to handle all actions.
|
||||
|
||||
## July 2019, gab.com relaunch
|
||||
|
||||
In July 2019, Gab forked Mastodon 2.8.4 and migrated to it.
|
||||
They overhauled Mastodon's user interface into a streamlined single-column UI with a prettier stylesheet.
|
||||
|
||||
Like Mastodon, Gab's fork is [open source](https://code.gab.com/gab/social/gab-social).
|
||||
|
||||
## August 2019, spinster.xyz launch
|
||||
|
||||
Spinster is a feminist platform I helped launch, forked from Gab's Mastodon version.
|
||||
|
||||
I began to heavily customize it with additional themes, integrated Stripe donations, and more.
|
||||
I created the fork early on, and did not adopt many of the features (and bugs) that Gab added later.
|
||||
|
||||
## December 2019, Soapbox
|
||||
|
||||
I decided to rebrand the Spinster codebase to be more neutral, calling it "Soapbox" (coined by `@grrrandma@spinster.xyz`).
|
||||
|
||||
I wanted Soapbox to be something others would use.
|
||||
However, Mastodon still had fundamental problems, and I began eye alternatives like Pleroma.
|
||||
|
||||
My goal with Soapbox is to attract non-technical people to the Fediverse.
|
||||
In order to do that, I need to experiment and run a lot of servers, but Mastodon makes that very expensive since it requires a lot of RAM to run.
|
||||
Meanwhile Pleroma is worlds more efficient, and would make things a lot cheaper for me in the long run.
|
||||
|
||||
## February 2020, HYDRA Social
|
||||
|
||||
I began contracting with Gab to create HYDRA Social, a Node.js Fediverse backend.
|
||||
Node.js is also more efficient than Ruby and could have solved the problem.
|
||||
|
||||
For reasons I still don't understand, I was removed from the project after only a month.
|
||||
|
||||
## March 2020, soapbox-fe
|
||||
|
||||
I was in a headspace of making big changes, and decided to take on the move of Soapbox to Pleroma.
|
||||
To do this, I would separate the frontend into its own repo to run on top of Pleroma, greatly simplifying the system.
|
||||
|
||||
This is only possible because Pleroma implements most of Mastodon's API endpoints, allowing me to re-use the majority of Soapbox's frontend code.
|
||||
|
||||
At the time of writing, I'm still getting soapbox-fe off the ground by implementing the basic features it needs to power Spinster and other sites.
|
103
docs/store.md
Normal file
103
docs/store.md
Normal file
|
@ -0,0 +1,103 @@
|
|||
# Redux Store Map
|
||||
|
||||
A big part of what makes soapbox-fe function is the [Redux](https://redux.js.org/) store.
|
||||
Redux is basically a database of everything your frontend needs to know about in the form of a giant JSON object.
|
||||
|
||||
To work with Redux, you will want to install the [Redux browser extension](https://extension.remotedev.io/).
|
||||
This will allow you to see the full Redux store when working in development.
|
||||
|
||||
Due to the large size of the Redux store in soapbox-fe, it's worth documenting the purpose of each path.
|
||||
|
||||
If it's not documented, it's because I inherited it from Mastodon and I don't know what it does yet.
|
||||
|
||||
- `dropdown_menu`
|
||||
|
||||
- `timelines`
|
||||
|
||||
- `meta` - User-specific data that is _not_ a frontend setting (see: `settings`).
|
||||
|
||||
- `pleroma` - Pleroma specific metadata about the user pulled from `/api/v1/accounts/verify_credentials` (excluding the pleroma_settings_store)
|
||||
|
||||
- `alerts`
|
||||
|
||||
- `loadingBar` - Managed by [react-redux-loading-bar](https://github.com/mironov/react-redux-loading-bar)
|
||||
|
||||
- `modal`
|
||||
|
||||
- `user_lists`
|
||||
|
||||
- `domain_lists`
|
||||
|
||||
- `status_lists`
|
||||
|
||||
- `accounts` - Data for all accounts you've viewed since launching the page, so they don't have to be downloaded twice.
|
||||
|
||||
- `accounts_counters`
|
||||
|
||||
- `statuses` - Data for all statuses you've viewed since launching the page, so they don't have to be downloaded twice.
|
||||
|
||||
- `relationships`
|
||||
|
||||
- `settings` - Any frontend configuration values that should be persisted to the backend database. This includes user preferences as well as metadata such as emoji usage counters. It uses [`pleroma_settings_store`](https://docs-develop.pleroma.social/backend/API/differences_in_mastoapi_responses/#accounts) to do it if it's available. If there's some other endpoint that handles your value, it doesn't belong here.
|
||||
|
||||
- `push_notifications`
|
||||
|
||||
- `mutes`
|
||||
|
||||
- `reports`
|
||||
|
||||
- `contexts`
|
||||
|
||||
- `compose`
|
||||
|
||||
- `search`
|
||||
|
||||
- `media_attachments`
|
||||
|
||||
- `notifications`
|
||||
|
||||
- `height_cache`
|
||||
|
||||
- `custom_emojis`
|
||||
|
||||
- `identity_proofs`
|
||||
|
||||
- `lists`
|
||||
|
||||
- `listEditor`
|
||||
|
||||
- `listAdder`
|
||||
|
||||
- `filters`
|
||||
|
||||
- `conversations`
|
||||
|
||||
- `suggestions`
|
||||
|
||||
- `polls`
|
||||
|
||||
- `trends`
|
||||
|
||||
- `groups`
|
||||
|
||||
- `group_relationships`
|
||||
|
||||
- `group_lists`
|
||||
|
||||
- `group_editor`
|
||||
|
||||
- `sidebar`
|
||||
|
||||
- `patron` - Data related to [soapbox-patron](https://gitlab.com/soapbox-pub/soapbox-patron)
|
||||
|
||||
- `soapbox` - Soapbox specific configuration pulled from `/soapbox/soapbox.json`. The configuration file isn't required and this map can be empty.
|
||||
|
||||
- `instance` - Instance data pulled from `/api/v1/instance`
|
||||
|
||||
- `me` - The account ID of the currently logged in user, 'null' if loading, and 'false' if no user is logged in.
|
||||
|
||||
- `auth` - Data used for authentication
|
||||
|
||||
- `app` - Map containing the app used to make app requests such as register/login and its access token.
|
||||
|
||||
- `user` - Map containing the access token of the logged in user.
|
Loading…
Reference in a new issue