We want to notify beekeeper in various cases/features. For that we need a generic way to create and list alerts. We want to store alerts in DB and display them in UI.
User story - configuring alert channels
- User goes to settings page
- Under
Alerts
- sets an alert channel from the select
Alert me via: [email]
- Mobile phone notification (in case its a mobile-app)
- Email
- SMS (Twilio?)
- Telegram bot
- Webhooks integration
- Under alert types, he can choose (as checkbox) which alert types he wants to receive (the list should be quite long)
User story - receiving a queen missing alert
- User uploads all of the hive frames
- All frames are processed
- No queen is detected
- Depending on alert channels, it is delivered to the user
- Once user has acted upon this alert, user
approves an alert
effectively hiding/deleting it
Suggested technical solution
Create new alerts
microservice
- add new DB that it will use
- add graphql API that it will expose
- add
createAlert
mutation
- add
alerts
query
- service acts as a proxy. Actual alert generation should be owned by other services that contain the business logic