Skip to content

This soloproject is a mood tracker made using HTML/CSS/Javascript frontend and Python/Flask/Jinja backend, with a PostgresQL database.

License

Notifications You must be signed in to change notification settings

ssarahs-lab/project2-moodtracker

Repository files navigation

Mood Tracker: a user writes their story

Live site: Mood Tracker app

Note the live site is currently being migrated from Heroku to Render, hence some bugs might appear and require ironing out, bear with me ;)

A user wants to track their mood to know what variables affect it, and use it to find out what correlates with mood. This may include:

  • Diet
  • Exercise
  • Sleep
  • Past stressors bothering them now
  • Future stressors bothering them now
  • Past activities elevating their mood
  • Future scheduled activities elevating their mood
  • User-added variables
  • Thinking styles that affect their mood

This tracker would help a user understand themselves better, and increase self awareness / emotional intelligence and the causes behind a high mood or low mood. They can then adjust their lifestyle based on this data.

Languages used:

  • HTML/CSS/Javascript
  • Python/Flask/Jinja
  • PostgresQL

Features included in this version:

  • Login page and sign up page

enter image description here

  • Form for user to log their moods, saved onto the live server database

enter image description here

  • Mood history page

enter image description here

  • Mood history visualised in graph

enter image description here

Instructions for installing

Add .DS_Store to the .gitignore file.

Add, commit and push as per usual.

If the local database (schema.sql) has been edited, connect database with Heroku:

heroku psql

Reset database:

heroku pg:reset

Copy local database to Heroku:

heroku pg:push moodtracker DATABASE_URL

Code snippets

Sign up form (Flask/Python)

signup form

Login form

enter image description here

Logging your mood

enter image description here

Showing your mood history

enter image description here

To be included in future versions:

  • Input for user's medications and associated symptoms

  • Input for any unhelpful thinking styles

  • “Day with the highest mood”, like a high score factor

  • What they ate, exercised, how much they slept

  • Events that have occurred in the day of the user

  • Main panel displaying mood and lifestyle variables on graphs - think "data is beautiful" styles

Issues to work on:

  • Deployment issues with Heroku, page load takes a while on Render, to be investigated; potential move to fly.io (?)
  • Improve security measures for users,
    1. auth0
    2. add validation measures to backend
  • Form needs a better flow
  • Make it responsive, i.e. mobile friendly

About

This soloproject is a mood tracker made using HTML/CSS/Javascript frontend and Python/Flask/Jinja backend, with a PostgresQL database.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published