actnforchildren / mental_health_app

Tiffany Tang's mental health app working with Dwyl.com
https://actnforchildren.herokuapp.com/
7 stars 0 forks source link

Action for Children Mental Health App

Why?

To improve children’s resilience in coping with change at a particularly difficult transitionary time in their lives (10-13 years of age), by using a tool that is already part of their daily lives (phones and mobile apps).

What?

Action for Children application allow users to record their emotions, analyse the reasons for them, review their emotions over a period of time and share them with their trusted adult.

The application is currently in prototype and user testing stages, with a specific set of alpha users. Google Analytics, Redash and Hotjar are being used to analyse the test data. At this stage a number of metrics are being tracked with an aim to refine which are used in the future. See this issue for more info on this.

Landing screen:

The daily, weekly and monthly views allow the user to see a record of their previously logged emotions.

Daily view:

Weekly view:

How?

You will need to have Docker and Docker Compose installed to run the application

Run the application

You can define the value of LOGIN_ENABLE to false when you want to block users to access the application

Deploy on Heroku

To create a new heroku app you can follow the Phoenix guide https://hexdocs.pm/phoenix/heroku.html

Check that the heroku remote is defined git remote -v. For more information you can read the heroku deployment guide: https://devcenter.heroku.com/articles/git#creating-a-heroku-remote

To deploy a new branch you can run: git push heroku your_branch:master.

Create users

As the application was being tested with a specific set of alpha users all the users accounts were manually created. There is no way to create users in app.

To create a user, go to priv/repo/create_users.exs. Update the following line

users = [
      {"USER1234", 1234},
      ]

with the username and pin you would like to use. These can be sourced from an env variable if you want to keep them secret.

Once you have added your variables, in your terminal run the command mix run priv/repo/create_users.exs.