Intro To Mastohacking: Difference between revisions

From neuromatch
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Up to: [[Part Of::Tech WG]], [[Part Of::Mastodon/Docs]]
Up to: [[Part Of::Tech WG]], [[Part Of::Mastodon/Docs]]
[[Category:Mastodon]]
[[Category:Hacking]]
[[Category:Guide]]


[[Has Description::Where to get started when looking at the mastodon's underbelly]]
[[Has Description::Where to get started when looking at the mastodon's underbelly]]


<blockquote>
<blockquote>
Here's what i'll go ahead and do is make some skeleton of the different subsystems and how to get started understanding what they do and then make this page publicly editable -jonny 2023-12-04
Here's what i'll go ahead and do is make some skeleton of the different subsystems and how to get started understanding what they do and then make this page publicly editable. Go nuts and add whatever links or writing you want. -jonny 2023-12-04
</blockquote>
</blockquote>


Line 10: Line 15:
* [[glitch-soc|Our parent fork]]: https://github.com/glitch-soc/mastodon
* [[glitch-soc|Our parent fork]]: https://github.com/glitch-soc/mastodon
* Our fork (what actually runs on neuromatch.social): https://github.com/NeuromatchAcademy/mastodon
* Our fork (what actually runs on neuromatch.social): https://github.com/NeuromatchAcademy/mastodon
** See also the rest of the wiki which describes what we gone and done, particularly [[Tech WG]],  
** See also the rest of the wiki which describes what we gone and done, particularly [[Tech WG]], [[Mastodon/Hacking]], and [[Mastodon/Docs]].


== Overview ==
== Overview ==
Line 16: Line 21:
''What are the main parts of a Mastodon''
''What are the main parts of a Mastodon''


== Subsystems ==
== Environment ==
 
''What do you need to look at the code and understand it?''
 
=== Vagrant ===
 
''Doing a development environment''
 
== Frontend ==
 
=== React ===
 
* Description: The stuff on the website you look at and click on
* Paths:
** <code>/app/javascript</code>
** <code>/app/javascript/flavours/glitch</code> - clone of <code>/app/javascript/mastodon</code> for [[glitch-soc]]


=== Frontend - React ===
''resources for getting started with react, major components and how they are composed/loaded, entrypoints, etc.''




=== Redux ===
=== Redux ===


* Description: Data provider for React Components
* Paths:
** Parallel to React paths...
** <code>./containers</code>
''Design of redux components, how they get data, mapStateToProps, mapDispatchToProps...''
=== HAML ===
* Description: HTML Templating
* Paths:
** <code>/app/views</code>
''i know this is technically serverside but hey''
== Rails ==
''general rails resources, overview of rails apps''
=== Config ===
=== API ===
''Overview of how MVC works in Rails and how it is exposed via the API''
''routes, auth, etc.''
=== Controllers ===
''how do controllers interact between the web interface, API, and models?''
=== Models ===
''what is a a model, what should it do vs. a controller do, etc.''
=== Workers & Services ===
''examples of workers, examples of services, how they interact and are called by the other things''
== ActivityPub ==
''How does mastodon implement activitypub?''
=== Serializers ===
=== Presenters ===
== Infrastructure ==
''the stuff that runs underneath masto, idk what else to call this''
=== Sidekiq ===
''job scheduling machine''
=== Redis ===
''short term queue''
=== PgHero ===
''i actually dont know what this does''
== Database ==
=== Postgres ===
''config, optimization, idk what else''
=== Schema ===
''what is actually in the database?? how does that relate to the rails models?''
=== Migrations ===
''how do we change the db when models are changed?''
== Masto Systems ==
''How the different things in masto actually work, all the above components put together''
=== Feeds ===
''home feeds, local feeds, hashtag feeds, lists...''
=== Settings ===
=== Posting ===
''What actually happens when I post? what happens when someone else on another server posts?''
=== Media ===
''Transcoding, link previews, image storage, etc.''
=== Moderation ===
''What can the admins see, what options do they have to deal with content, etc.''
=== RSS ===
''How do all these dang RSS feeds get made?''
=== Onboarding ===
* Paths:
** <code>/app/javascript/mastodon/features/onboarding</code>
''How does the onboarding flow work?''
== Etc. ==


=== ===
* [[Search]]

Latest revision as of 03:43, 5 December 2023

Up to: Tech WG, Mastodon/Docs


Where to get started when looking at the mastodon's underbelly

Here's what i'll go ahead and do is make some skeleton of the different subsystems and how to get started understanding what they do and then make this page publicly editable. Go nuts and add whatever links or writing you want. -jonny 2023-12-04

Overview

What are the main parts of a Mastodon

Environment

What do you need to look at the code and understand it?

Vagrant

Doing a development environment

Frontend

React

  • Description: The stuff on the website you look at and click on
  • Paths:
    • /app/javascript
    • /app/javascript/flavours/glitch - clone of /app/javascript/mastodon for glitch-soc

resources for getting started with react, major components and how they are composed/loaded, entrypoints, etc.


Redux

  • Description: Data provider for React Components
  • Paths:
    • Parallel to React paths...
    • ./containers

Design of redux components, how they get data, mapStateToProps, mapDispatchToProps...


HAML

  • Description: HTML Templating
  • Paths:
    • /app/views

i know this is technically serverside but hey

Rails

general rails resources, overview of rails apps

Config

API

Overview of how MVC works in Rails and how it is exposed via the API

routes, auth, etc.

Controllers

how do controllers interact between the web interface, API, and models?

Models

what is a a model, what should it do vs. a controller do, etc.

Workers & Services

examples of workers, examples of services, how they interact and are called by the other things

ActivityPub

How does mastodon implement activitypub?

Serializers

Presenters

Infrastructure

the stuff that runs underneath masto, idk what else to call this

Sidekiq

job scheduling machine

Redis

short term queue

PgHero

i actually dont know what this does

Database

Postgres

config, optimization, idk what else

Schema

what is actually in the database?? how does that relate to the rails models?

Migrations

how do we change the db when models are changed?

Masto Systems

How the different things in masto actually work, all the above components put together

Feeds

home feeds, local feeds, hashtag feeds, lists...

Settings

Posting

What actually happens when I post? what happens when someone else on another server posts?

Media

Transcoding, link previews, image storage, etc.

Moderation

What can the admins see, what options do they have to deal with content, etc.

RSS

How do all these dang RSS feeds get made?

Onboarding

  • Paths:
    • /app/javascript/mastodon/features/onboarding

How does the onboarding flow work?


Etc.