hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
64 stars 35 forks source link

🪣 Convert forum actions to framework commands #7203

Open rbennettcw opened 1 month ago

rbennettcw commented 1 month ago

Child of #6802

Currently, most core functionality is implemented in controllers. We need to start refactoring the logic to conform to the DDD framework.

Create commands for the following actions:

Commands

rbennettcw commented 1 month ago

@Rotorsoft I've created this ticket to track the creation of the commands. I've prioritized the forum commands since they represent core functionality. However I recall you mentioned Mixpanel in #6802?

Rotorsoft commented 1 month ago

yes, probably most of them are already on this list, but make sure to tag them.... and don't miss any other event emitters getting tracked in mixpanel - searching the enum should help

rbennettcw commented 1 month ago

This child tickets now represent all commands that are exposed via the API. Might be others that I missed if there are cronjobs or event-driven actions.

Will flesh out the child tickets incrementally as needed.

rbennettcw commented 4 weeks ago

@Rotorsoft – Per previous discussion, we should identify which commands/entities should be prioritized for the Contest work.

Rotorsoft commented 3 weeks ago

@rbennettcw you can find the model linked to #6824. The contest worker policy will react to thread creation and voting events (initially), so you should focus on the refactoring of these two commands and publishing the events (using a reusable pattern for future commands - we discussed a sequelize hook, but maybe we can create some reusable utilities here).

In summary:

Create Thread React on Thread

You can confirm the names with the product team... I think we are using "react on thread" to represent future reactions, not just upvoting.