## Inspiration

Mental health is a serious issue but also one hard to diagnose and address. In these times of our virtual environments and uncertainties, people tend to face more difficulty and strain on their mental health. We aim to help individuals become more aware and hopefully, identify signs of mental health issues.

We realized that not too many people look after their mental health until it's far too late. As such, we decided to implement a solution that motivated people to write down their thoughts so that they could track their mood over time. Other mental health tracking apps exist on the market right now, but none utilize NLP to take advantage of the actual writing part of journalling. That is how our idea of Mood was born!

## What it does

Mood is a journaling app. It allows the user to make quick daily entries about how they feel and what significant events occurred. Using this text entry, the app performs sentiment analysis to rate the current mood of the user and tracks it over time. This enables the app to identify trends in the user's mental health daily, weekly, monthly, and overall. It also calculates the most frequently occurring emotional keywords and general keywords throughout a period, on top of the top positive and negative keywords that make the user smile and cry the most.

## How we built it

We built the interface of Mood using Flutter. Our team decided that for a journaling application, it would be more accessible if it was available on mobile. The sentiment analysis is done using Python and its NLP libraries like textblob, spacy, nltk, and transformers. Since the backend is written in Python, we decided to use Flask to manage our back-end server. These are connected with a REST API.

## Challenges we ran into

We all had to learn a new technology for this project and was definitely one of the biggest challenges that we faced. Another big challenge that we ran into is creating APIs to connect our front-end to the back-end.

## Accomplishments that we're proud of

Our team has a lot to be proud of. We all learned something new and got something to take away from this Hackathon. Even though we stayed up really late, we are happy that we have something to show to the judges.

## What we learned

One of the biggest lessons that we learned from this experience is how important the initial development plan is. Running into problems later on caused our team to spend more time to find a workaround to problems that in hindsight could have been better planned for.

## What's next for Mood

Mood has lots of room for future improvement. Features such as user authentication and cloud storage would be great additions to improve the security and protect the privacy of our users. Also, notification systems on long-term and short-term abnormal trends (bipolar, depression,...) of mood would be meaningful for users to understand their emotional behaviour. Other improvements would include a more accurate and advanced model of sentimental analysis and improving accessibility of the interface (i.e. voice or image input).
An online system that learns the users’ mood patterns and responds better to changes.
## Inspiration

Our inspiration for the Mood App stemmed from a genuine concern for the emotional well-being of individuals in today's fast-paced world. We noticed the lack of platforms that prioritize emotional expression and connection in a simple and engaging way. We wanted to create a space where people could freely share their thoughts and feelings, fostering a sense of community and support.

## What it does

The Mood App is a unique platform designed to encourage users to share their emotions and current moods. It's a safe and supportive space where users are prompted to post their thoughts and feelings once a day. The app features a user-friendly feed where people can comment and react to these posts, allowing for interaction and emotional support among users. It's like "BeReal" but specifically geared towards encouraging emotional expression and connection.

## How we built it

We built the Mood App for the CalHacks 10 hackathon using a combination of technologies. We employed Reflex, a Python-based React Frontend, for the web application, and utilized Convex, a real-time backend framework based on Node.js, to ensure seamless and immediate interactions.

For the mobile version, we used Flutter to create an intuitive and responsive user experience. This combination of technologies enabled us to provide a multi-platform solution, reaching a wider audience and ensuring that anyone can use the Mood App regardless of their device preferences.

## Challenges we ran into

Developing the Mood App presented its own set of challenges. Integrating the frontend and backend seamlessly was a complex task. Ensuring real-time updates, user authentication, and maintaining a clean and responsive user interface on both web and mobile platforms required a significant amount of effort and problem-solving.

In addition, building an engaging feed while safeguarding user privacy was a delicate balance we needed to strike. We also had to contend with the technical intricacies of deploying and maintaining our app for a hackathon setting.

## Accomplishments that we're proud of

We are incredibly proud of what we've achieved with the Mood App. We successfully created a platform that encourages users to open up about their emotions and mood, fostering a sense of community and support. The combination of Python-based Reflex, Convex for real-time updates, and Flutter for a mobile app resulted in a versatile and user-friendly experience. The integration of these technologies allowed us to provide a seamless and accessible solution for our users.

## What we learned

Throughout the development process, we gained valuable insights into real-time backend frameworks, multi-platform development with Flutter, and the intricacies of creating a user-friendly and engaging feed. We also learned about the importance of prioritizing user privacy and data security while maintaining a transparent and supportive atmosphere for emotional expression.

## What's next for Mood App

Our journey doesn't end with the hackathon; we see great potential for the Mood App beyond this event. In the future, we plan to refine the app's features and user experience based on user feedback. We aim to enhance our real-time features, implement user customization, and potentially introduce sentiment analysis to provide even more valuable insights to users about their emotional well-being.

Additionally, we intend to expand our user base and community, promoting the Mood App as a valuable resource for emotional expression and support. We're also exploring possibilities for partnerships and collaborations that can help us grow and improve the app even further. The Mood App's journey is just beginning, and we're excited about the potential it holds for making emotional well-being a top priority for people everywhere.
## 💡Inspiration

* 2020 US Census survey showed that adults were 3x more likely to screen positive for depression or anxiety in 2020 vs 2019
* A 2019 review of 18 papers summarized that wearable data could help identify depression, and coupled with behavioral therapy can help improve mental health
* 1 in 5 americans owns wearables now, and this adoption is projected to grow 18% every year
* Pattrn aims to turn activity and mood data into actionable insights for better mental health.

## 🤔 What it does

* Digests activity monitor data and produces bullet point actionable summary on health status
* Allows users to set goals on health metrics, and provide daily, weekly, month review against goals
* Based on user mood rating and memo entry, deduce activities that correlates with good and bad days
[![Screen-Shot-2022-10-16-at-1-09-40-PM.jpg](https://i.postimg.cc/MZhjdqRw/Screen-Shot-2022-10-16-at-1-09-40-PM.jpg)](https://postimg.cc/bd9JvX3V)

[![Fire-Shot-Capture-060-Pattrn-localhost.png](https://i.postimg.cc/zBQpx6wQ/Fire-Shot-Capture-060-Pattrn-localhost.png)](https://postimg.cc/bDQQJ6B0)

## 🦾 How we built it

* Frontend: ReactJS
* Backend: Flask, Google Cloud App Engine, Intersystems FHIR, Cockroach Labs DB, Cohere

## 👨🏻‍🤝‍👨🏽 Challenges / Accomplishments

* Ideating and validating took up a big chunk of this 24 hour hack
* Continuous integration and deployment, and Github collaboration for 4 developers in this short hack
* Each team member pushing ourselves to try something we have never tried before

## 🛠 Hack for Health

* Pattrn currently is able to summarize actionable steps for users to take towards a healthy lifestyle
* Apart from health goal setting and reviewing, pattrn also analyses what activities have historically correlated with "good" and "bad" days

## 🛠 Intersystems Tech Prize

* We paginated a GET and POST request
* Generated synthetic data and pushed it in 2 different time resolution (Date, Minutes)
* Endpoints used: Patient, Observation, Goals, Allergy Intolerance
* Optimized API calls in pushing payloads through bundle request

## 🛠 Cockroach Labs Tech Prize

* Spawned a serverless Cockroach Lab instance
* Saved user credentials
* Stored key mapping for FHIR user base
* Stored sentiment data from user daily text input

## 🛠 Most Creative Use of GitHub

* Implemented CICD, protected master branch, pull request checks

## 🛠 Cohere Prize

* Used sentiment analysis toolkit to parse user text input, model human languages and classify sentiments with timestamp related to user text input
* Framework designed to implement a continuous learning pipeline for the future

## 🛠 Google Cloud Prize

* App Engine to host the React app and Flask observer and linked to Compute Engine
* Hosted Cockroach Lab virtual machine

## What's next for Pattrn

* Continue working on improving sentiment analysis on user’s health journal entry
* Better understand pattern between user health metrics and daily activities and events
* Provide personalized recommendations on steps to improve mental health
* Provide real time feedback eg. haptic when stressful episode are predicted

Temporary login credentials:
Username: [norcal2@hacks.edu](mailto:norcal2@hacks.edu)
Password: norcal