Here:
This is just like Jazz Music … the best practices are usually already out there in the existing open-source plugin landscape, just like all the records. Don’t expect a perfect guide on how to do everything, you have to get into the swing (ahem) of learning from prior art much of the time.
Find a plugin from Customization > Plugin that does something functionally similar, or an element of what you want to do and inspect the code, see how it’s achieving things. Same goes for the Discourse source code, which you can use as a source of ultimate ‘best practice’, esp. wrt Discourse.
Clone an existing plugin locally and try to change a few things, experiment.
Serializers are just filtering what is sent from the Controllers/Models and they can do some basic manipulation too.