Mindwatch (Backend)


Regarding to the overburdened health care system and the deficit of therapy places in Germany, many mentally ill people are missing urgently needed support. The help they need is thus out of reach for many people. The ongoing initial situation has become worse due to the Corona pandemic.


The customer’s goal was to offer help to mentally ill people through an app on a smartwatch.

Users of this app will be interactively given a positive mindset in order to assist them in waiting times for therapy places and to support them in their everyday lives. Thus, better preventive patient care should be ensured in the overburdened health care system.

During the development of this app, we were responsible for the backend and the API interfaces.

1. Potential analysis

After consulting with the client about the functions of the backend, we were able to make decisions together with them about tools, technologies and architectures for it.

A backend refers to the functional part of the app. While the frontend is closer to the user, the backend is closer to the system.

2. Use case definition

Based on the process analysis, we defined the use case of the desired backend. Such a use case contains all possible scenarios that can be accomplished with the help of the system.


Mindwatch (Backend)

Brief description

Providing a system that issues positive affirmations, questions and tasks to the user.


Masasana GmbH

Markus Coenen


Affirmations, questions and tasks for the Mindwatch are available. App is developed.


The user has access to his data and statistics.

Process – normal scenario:

1. The user authenticates and accesses the system.

2. The system outputs a question about the state of mind.

3. The user indicates the state of mind “good”.

4. The system evaluates the answer and issues a positive affirmation.

5. The system issues a task or question to the user after 3 hours.

6. The user confirms the task or answers the question.

7. The system issues a motivational congratulatory text.

8. The system saves the user data and prepares statistics on the user’s state of mind and achievements based on them.

Process – alternative scenario:

1.1 The user has no access and registers.

1.1.1 The user determines a time slot for the system.

1.1.2 Continue as in step 2.

3.1 The user indicates the state of mind “medium”.

3.1.1 The system evaluates the answer and issues a positive affirmation.

3.1.2 The system issues a task or question to the user after 2 hours.

3.1.3 Continue as in step 6.

3.2 The user indicates the state of mind “bad”.

3.2.1 The system evaluates the answer and issues a positive affirmation.

3.2.2 The system issues a task or question to the user after 1.5 hours.

3.2.3 Continue as in step 6.

6.1 The user rejects the question or task.

6.1.1 The system issues an uplifting text to the user.

6.1.2 The system starts again with step 2 after 3 hours.

Process – error scenario:

8.1 The system cannot save and process the user data.

8.1.1 The system issues an error message.

3. Iterative model creation

After the concept development, we started programming the algorithm for the backend. This allows us to respond to the user’s input in the form of the customer’s requirements.

To be able to implement the necessary OpenAPI definition with the web server, in this case Flask, we used the web-based programming language Python. The required databases for this project are MongoDB databases that are particularly beneficial as they are NoSQL and can hold documents, which in turn allowed us to connect statistics more unrestricted.

Through the API, the processing and output of the mind queries, affirmations, questions and tasks, login and statistics are controlled.

4. Integration and result analysis

After integrating the backend into the app, we completed a code review and further testing. Finally, we were able to provide the customer with the working backend for their app.