Extend Existing Controller?

If you do need to add features, you want to create a plugin or theme component, not fork discourse.

You can do that in a theme component, so you don’t need a plugin for that, but if you are making a plugin, you can include the front end changes in the plugin too. Developing Discourse Plugins - Part 1 - Create a basic plugin. Looking for plugins that add similar functionality is also a good way to go. There is a Discourse repo called all-the-plugins that you can use to be able to search for examples.

Having public vs private versions of those fields as suggested seems like a good solution, but you can also add user fields in a plugin and control how and whether those fields are added to the serializer to display them.

This is what theme components do. Theme Developer Quick Reference Guide could be a start.

2 Likes