Project: Broadcasting

Problem

Communities already have their own spaces of deliberarion in other places like Whatsapp, Discord, Telegram or mailing lists. Community members deliberate there and then they consolidate their thoughts in Google Docs or MS Word. Mintter will replace Google Docs & MS Word, but communities will still be using Discord, Telegram or Mainiling list to Real-toime collaborate. Since we don't support it yet, we should integrate those deliberation apps into our workflows.

Solution

We need a Group Portal that can be accessed via the Mintter App. Depending on your role in the gorup, you can change different broadcasting settings on it

Group owners: Can import mailing list and enter notification settings (frequency of the newsletter) and credentials for any external serviceto use needed (webhooks tokens, SMTP credentials, ...)

Email

We should use an intermediary provider like mailgun. This will help us not only to send multiple emails but to deliver those emails from a trusted source and hence, preventing those emails to go to spam folder. By default, we will use our own mintter smtp credentials (The email will come ftom the mintter domain) however we should also accept the owner's credentials so that the sender is the group site (In case there is a site for that gorup)
Bulk email after the owner imports a mailing list: The email will be a newsletter-like We can either select the monst poputal changes or generate summaries using AI.
Transactional Emails: Every change on a document could be notified to the group members. Group members can uncheck this functionality even if the group owner added them to the recipient list. The group member could potentially to this at a document level (documents within the group at hand). We should also use Mailgun.

Whatsapp

The group owner must add the mintter business number (to be displayed in the Whatsapp section of the broadcasting settings) to the Whatsapp group they want. In order to get the number the owner must accept that we can read all messages in that whataspp group. The owner have to select also the group he/she wants notifications from (or maybe there is a selector of the group at a the general broadcasting settings level).
After saving the configuration, the app will post the configuration to our metering server.

Metering service

This is a service that controls the different integrations with third party apps. The source code is not open (binary available via docker).
It is a regular mintter node. It has to understand hypermedia protocol since it has to veryfy that the client its talking to has the right permissions to make changes i.e. being a group member. Note that it can be a P2P group without a site so we cannot relay on exposing the group owner in the /.well-known/hypermedia-site of the site.
This node has some funtions that can be called remotely. The node has extra tables in the database to store the configuration made by owners. Based of that configuration, the service will broadcast the necessary information to the telegram/Whatsapp groups or send emails using mailgun.
The service will listen to every new event in its feed and for each event it will evaluate all the rules to wheter or not fire a broadcast message out of that event. The downside is that this process is as fast as the regular syncing of the app. If the metering node does not receive the event (as any other peer in the network) it wont fire any action. A way to speed it up is making this metering peer a bootstrap node, so every node connects to it. Of course the metering service does not provide documents (otherwise it would spam the whole network) its just a reader.

Scope

2 week backend
1 week frontend

Rabbit Holes

No Goes