I'm building a SaaS web app and I'm thinking about adding an integration marketplace. As an example, let's say we have a todo list app, in the marketplace we would have a slack integration and if it's install it would send a slack message every time a todo item is added.
What is the best architecture to go about it? I started with some 'IntegrationDefinition' database entity which contains an id, secret, allow scopes, description etc. And another entity with a link to the 'IntegrationDefinition', which indicates an install of a certain app. How should I go about dynamically having some integraion logic executed? Or even allowing companies in the future to create their own integrations.