How to set up database for a mental health app

Hi fellow Adalo users :slight_smile:
I am working on an app that is going to help people with building better mental health.
It’s based on something called ABC - Act Belong Commit.

The Act-Belong-Commit guidelines for positive mental health provide a simple approach you can adopt to become more mentally healthy: Act - Do something, Belong - Do something with someone, Commit - Do Something Meaningful.

The app is supposed to give the user a set of different activities, in three different categories (Act, Belong, Commit). And by doing 1 of each activity each day, you are building better mental health.

The goal for each user is to do 21 activities in a week. (7 Act activities, 7 Belong activities and 7 Commit activities)

I have my app set up with a top tab, where you can select between the three different categories and a “your favorites”.

When a user press the “+” the current activity is registered in a separate database called “challenges_completed”

This gives me the possibility to count the challenges (activities) each user has completed, and present it like this (very wip):

Here the user can see that they have completed 6 ACT activities, 4 BELONG activities and 5 COMMIT activities. That gives a total of 15 activities. The progress bar is counting toward 21 activities, which is the target of the week.

Now I am stuck. Maybe you can help me with some of the questions below?

  1. The user should try to complete 7 activities of each category each week. How can I track how many activities the user has done the last seven days and give a positive notification when the user has reached its target of 7 activities in 7 days?

  2. The progress bar is counting toward 21 completed activities. But how can I make sure that it is counting the progress toward 7 Act activities + 7 Belong activities + 7 Commit activities? Today you could just complete 21 ACT activities and the progress bar would show 100% complete.

  3. How can I reset the stats for a new week? But also record the great achievement done by the user? The user should be able to see a history of weeks.

  4. How can I show your completed streak for the last week/month/year? I.e the user completes 1 Act activity, 1 Belong activity, and 1 Commit activity during the day. That should constitute a “completed day”. If the user does the same number of activities the following day, then the user has a streak. How could I track this and report it to the user in a nice fashion?

Thank you to everyone that could shed some light on this :slight_smile:
Tor Martin

Hi @Tor_Martin ,

This looks like business requirements and need special attention which can be paid service.

Some of your needs should use batch processing, which Adalo can do but tricky, meaning not in straight ways.

Adalo do not provide Do…While loop out of the box, which is similar to backend workflow in other no code tool, so to do that we need to have chained actions using countdown components that will act similar to backend workflow.

Whenever you are ready, we can have private discussion.