Skip to content

Application Design

Sven Loesekann edited this page Jul 25, 2020 · 6 revisions

Main Design

The main goal is was to create a chat system that has a Progressive Web Application based on Angular as client and a reactive server based on Spring Boot with a MongoDb. The chat system should work standalone what causes the decision to make a polling based system. The messages content that he client sends should be encrypted on the client in the Indexed DB of the browser and on the server in the MongoDb. -> End to End Encryption with a PWA.

Frontend

The frontend is build with the Pwa support of Angular. It uses the Dexie library to access the indexed db of the browser to store the contacts and messages. With the locally stored contacts and messages the Pwa can show the stored messages and store new messages until it is online again and the messages are delivered to the server. A message can be text or a picture of the camera. The frontend can be found in the directory: angular/messenger

Backend

The backend is build as a Spring Boot application with a MongoDb database. It stores the contacts with the encrypted keys and the encrypted messages. The contacts are used by the client to add communication partners and are stored permanently. The messages are stored until the receiver has polled them and the sender has polled the received flag of the message. After that the message is removed to save storage space. There is a limit to the maximum size of a single Message of 3 MB and a limit to the combined size of the messages of 1 user of 15 MB. Messages that are older than 30 days are removed at 0.05 o'clock each day. The backend can be found in the directory: Main

Clone this wiki locally