Inspiration
Being a student at university today is no easy task; as our contemporary world advances, it becomes increasingly competitive in many domains, especially those revolving around technology. Many times, it is easy to lose ourselves in such a competitive and academically-minded world—Mental Map strives to solve that. By enabling its users to track their mental health in methodical ways and interact with a sympathetic chatbot, Mental Maps reminds us that there’s more to life than academics and stress; it’s okay to have a little bit of fun at times, too.
Recognizing the prevalence of mental health challenges and the reluctance many face in seeking help, Mental Map was created as a tech-savvy solution to promote self-reflection, emotional awareness, and a sense of companionship, contributing to a more mentally healthy society. By providing a digital friend that encourages users to engage with their emotions and life events, Mental Map aims to reduce the stigma surrounding mental health and offer a user-friendly platform for individuals to enhance their emotional well-being.
What it does
Mental Map is all about helping users navigate their emotional journeys in a modern and user-friendly way. This app serves as a digital diary with an AI chatbot that checks in on your feelings and experiences. The AI chatbot periodically initiates spontaneous conversations with users throughout the day, encouraging them to discuss their current emotional state and ongoing life events if they haven't engaged with it recently. Each interaction is subject to sentiment analysis, enabling the app to extract the user's prevailing mood over the course of a week. At the end of each week, the application compiles a comprehensive report and generalized summary, offering users a detailed overview of their week, with a particular focus on the dominant emotions experienced during that time. It analyzes your emotions, generates weekly summaries, and helps you gain a better understanding of your mental well-being—all in an effort to foster self-awareness and promote better mental health.
How we built it
The app's codebase can be divided into two main components: the frontend and the server.
Server
The server utilizes a variety of tech stacks and APIs from CalHacks's sponsors to deliver an efficient set of HTTP endpoints that can respond to the frontend application in real-time.
We use Hume API for text-based sentiment analysis, enabling Mental Map to gauge the user's emotional responses to the chat interface each day. We use the sentiments from each diary entry to carefully and precisely create a weekly summary at the end of the week that both encourages the user to dwell on their highlights, and provides a more positive outlook on the lower points of their week.
To enhance the user experience, we leveraged the BERT Hugging Face model to convert user responses into high-dimensional vector embeddings, facilitating similarity checks between responses, which were efficiently stored using the Milvus vector database. The vector database enabled us to store information of high-dimensionality without great overhead during retrieval and entry creation.
For a more general data management system, we chose to utilize CockroachDB's robust serverless data cluster platform. We stored our sentiment classifications, user diary entries, and other pieces of relevant information in two different tables on CockroachDB.
Frontend
For the frontend, we utilized React Native's powerful UI interface to build an iOS application that is both aesthetic and efficient in terms of runtime. We seamlessly linked our frontend to our Flask REST server using "axios", a popular React library for sending HTTP requests. We controlled the navigation of our application with database navigation routers, which securely store user sessions.
Challenges we ran into
During the app development process, we encountered several hurdles. Initially, our intention was to have the chatbot pose spontaneous questions to the user at various intervals during the day. Yet, we found this approach somewhat trivial from our core objective of fostering user-initiated self-expression on their own merit. Furthermore, the logistical feasibility of implementing random question prompts throughout the day within our time constraints appeared quite impossible.
We also ran into a good amount of troubles getting CockroachDB set up. None of us had experience with such a serverless database before, and we were proud of how we were able to overcome this learning curve by carefully reading CockroachDB's comprehensive API.
Accomplishments that we're proud of
We are very proud of the app we managed to put together in somewhat of a rather tight timeframe. We got the entire frontend up and running with the magic of React Native and hooked it up to our backend routes, which connect to CockroachDB. What we are really proud of is how well our sentiment analysis feature works--it can accurately pinpoint the emotion tied to any input text, making our app functional and enabling us to delve into data analysis from various angles, all neatly integrated into the app.
What we learned
Throughout this project, we have learned a lot about the tools that we leveraged. For starters, we learned how to use the CockroachDB SQL database management system. Additionally, we learned how to use the Hume API to generate sentiment analysis scores for each of 53 emotions for every input text, which we condensed into the 10 most popular sentiments. Lastly, we learned how to seamlessly connect the React Native frontend to the backend database components.
We enjoyed interacting with the APIs of several of CalHacks's sponsors this year. We were excited to learn something new, and were glad with the way were able to integrate a lot of the functionality with the goals and constraints of our application.
What's next for Mentalmaps
One of the next steps for Mental Map is to further incorporate our Milvus vector embeddings within the pipeline of our application, enabling us to make full use of the high-dimensionality capabilities that the database comes with.
We would like to expand our application such that it allows users to connect with one another; once "friends," users will be able to see similar diary entries from their friends, enabling connection and fostering closer relationships to bolster mental health.
Another potential next step is to utilize the vector embeddings and sentiment data to recommend relevant resources, articles, or activities to users based on their emotional state and experiences. Additionally, we could provide users with personalized insights and tips based on their emotional responses and activities. This could include self-care suggestions, stress-relief techniques, or mindfulness exercises.
Built With
- bert
- cockroachdb
- hume
- mulvis
- openai-davinci
- python
- react-native
Log in or sign up for Devpost to join the conversation.