Description

Notifications are everything related to push notification on mobile, in-app push notification, keeping notification badges updated and managing the "inbox" of notifications.

This is a very important and difficult part of Twake because a lot of processing is asynchronous, there is also need to share notifications between multiple Linagora products, there is multiple outputs (mail, mobile etc) and this is a critical feature.

See the user stories (and a schema) here:

Wording

Push notification: notification on mobile

Mail notification: notification or group of notification sent by email

Web notification: or "in-app" notification, or web-socket notification, notifications sent on the web app via web-socket

Notifications preferences: user notification preferences, they can be in a channel or global to the workspace or company (or even user in all Twake).

To understand the routing please read **"**Collections based rest api:" in "Wording and formating"

Wording and formatting

What it does

Notifications micro-service take in input an event coming only from channels discussions. An event is then a message in a channel.

In output the service must deliver a notification to mobile, mail or/and web.

The notification service can receive requests to mark something as read / unread etc.

Architecture schema

The notification micro-service is divided in 2 main modules, one to update the platform state and one to send notification to external devices.

The first part (platform state) contain a part where we choose is the notification is kept or not, and two parts to persist this information (badges and inbox).

The second part is mainly done in frontend (we always send mobile and web notifications and the client will choose to display it or ignore it. There still remain two big parts: one part to detect the user state (connected or not) in Twake and one other part to manage the email digest.