Description

Messages are the main resources in Twake (you didn't saw it coming right?). In order to migrate more and more to an asynchronous messaging system, Twake messages works a bit differently from a classing channel-based app. First of all every message must belongs to a thread in the future, of course we know that this is not yet fully possible to impose this to the user. Second, a thread can belong to one ore more users and or channels, for instance the thread "There is a bug here in Twake" can belongs to this list of users and channels: (@theCTO, #Twake, #twake-dev, @theDeveloperThatDidThisCode). Again, this will not be fully used in frontend yet.

Messages in Twake are End-2-End encrypted by default using thread, channels and user asymmetric keys. This part will not be yet put into practice until we find time in our roadmap. We currently did a working proof of concept though.

Messages can be tagged a lot of different way to find them after on. For instance we can set a message as "pinned", as "containing a file", as "thread start message", but also with custom user-defined tags.

Deleted and updated messages are sent as a special message type: type: "event", it allows to detect changes from a date to a given view of messages.

Wording

Message: a simple or complex set of words, buttons, images and files (see Blocks later). Every message belongs to a thread.

Thread: a group of messages.

Block: a specific type of surface that can be used to build messages (ex. attachment, section, iframe, etc) Blocks are differents from "Elements" an element goes into some blocks (ex. button, input, text, image).

E2EE: End to end encryption, it means client (browser or device) encode and decode the messages. Every keys needed for decoding message are never stored or accessible in the server.

Database

Database models

Micro-service APIs

Rest APIs

Blocks and Elements

Blocks and Elements (WIP)

E2EE

E2EE (WIP)

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/03da6ae3-205d-4bc7-8ec8-70ab5bf8eb44/Screenshot_2021-04-08_at_17.17.49.png