# Avise

Avise is a convenient and powerful platform for people who consume
substances to do so in an informed and responsible way.

## How it works!

Avise was created to help inform users of the effects substances have on
their health. This is achieved through

* integrating bots on popular messaging services to conventiently track
user data
* providing real-time visualizations of users' consumption of
potentially harmful substances
* citing research tailored to the users' personal usage patterns

Avise provides a convenient and powerful platform for people who consume
substances to do so in an informed and responsible way.

## nwHacks 2020!

Avise was created in 24 hours during the nwHacks 2020 hackathon.
The team was

[**Juno Kim**](https://github.com/junokims)

* worked on health research and the Discord bot

[**Jayden McPhedrain**](https://github.com/Cloud7831)

* worked on parsing natural language for the Discord bot

[**Tyler Trinh**](https://github.com/bvtrinh)

* worked on front end design and implementation

[**Matt Wiens**](https://github.com/mwiens91)

* worked on the back end, REST API, and cloud server

## Technologies

* [django](https://www.djangoproject.com/)
* [django-rest-framework](https://www.django-rest-framework.org/)
* [PostgreSQL](https://www.postgresql.org/)
* [NGINX](https://www.nginx.com/)
* [Google Compute Engine](https://cloud.google.com/compute/)
* [domain.com](https://www.domain.com/)
* [React](https://reactjs.org/)
* [Bootstrap](https://getbootstrap.com/)
* [Rechart.js](http://recharts.org/)
* [discord.io](https://discord.io/)
## Inspiration

Our inspiration for this project comes from our own experiences as University students. As students, we understand the importance of mental health and the role it plays in one's day to day life. With increasing workloads, stress of obtaining a good co-op and maintaining good marks, people’s mental health takes a big hit and without a good balance can often lead to many problems. That is why we wanted to tackle this challenge while also putting a fun twist.

Our goal with our product is to help provide users with mental health resources, but that can easily be done with any google search so that is why we wanted to add an “experience” part to our project where users can explore and learn more about themselves while also aiding in their mental health.

## What it does

Our project is a simulation where users are placed in a very calm and peaceful world open to exploration. Along their journey, they are accompanied by an entity that they can talk to whenever they want. This entity is there to support them and is there to demonstrate that they are not alone. As the user walks through the world, there are various characters they can meet that can provide the user with resources such as links, articles, etc. that can help better their mental health. When the user becomes more comfortable and interested, they have the choice to learn more and provide more information about themselves. This allows the user to have more personal resources such as local support groups in their area, etc.

## How we built it

We divided ourselves into two separate teams where one team works on the front end and the other on the back end. For our front end, we used unity to develop our world and characters. For the back end, we used openai’s chat API in order to generate our helpful resources with it all being coded in python. To connect our backend with our front end, we decided to use flask and a server website called Pythonanywhere.

## Challenges we ran into

We ran into multiple challenges during our time building this project. The first challenge was really nailing down on how we would want to execute our project. We spent a lot of time discussing how we would want to make our project unique while still achieving our goals. Furthermore, another challenge came with the front end as building the project on unity was challenging itself. We had to figure out how to receive input by the user and make sure that our back end gives us the correct information.

Finally, to adhere to all types of accessibility, we also decided to add a VR option to our simulation for more immersion so that the user can really feel like they are in a safe space to talk and that there are people to help them. Getting the VR setup was very difficult but also a super fun challenge.

For our back end, we encountered many challenges, especially getting the exact responses we wanted. We really had to be kinda creative on how we wanted to give the user the right responses and ensure they get the necessary resources.

## Accomplishments that we're proud of

We are very proud of the final product that we have come up with, especially our front end as that was the most challenging part. This entire project definitely pushed all of us past our skill level and we most definitely learned a lot.

## What we learned

We learnt a lot during this project. We most definitely learnt more about working as a team as this was our second official time working together. Not only that, but in terms of technical skills, we all believe that we had learnt something new and definitely improved the way we think about certain aspects of coding

## What's next for a conversation…

While we could not fully complete our project in time as we encountered many issues with combining the front end and back end, we are still proud
## Inspiration

In today's fast-paced world, highly driven individuals often overwork themselves without regard for how it impacts their health, only experiencing the consequences *when it is too late*. **AtlasAI** aims to bring attention to these health issues at an early stage, such that our users are empowered to live their best lives in a way that does not negatively impact their health.

## What it does

We realized that there exists a gap between today's abundance of wearable health data and meaningful, individualized solutions which users can implement. For example, many smart watches today are saturated with metrics such as *sleep scores* and *heart rate variability*, many of which actually mean nothing to their users in practice. Therefore, **AtlasAI** aims to bridge this gap to finally **empower** our users to use this health data to enhance the quality of their lives.

Using our users' individual health data, **AtlasAI** is able to:

* suggest event rescheduling
* provide *targeted*, *actionable* feedback
* recommend Spotify playlists depending on user mood

## How we built it

Our frontend was built with `NextJS`, with styling from `Tailwind` and `MaterialUI`.

Our backend was built with `Convex`, which integrates technologies from `TerraAPI`, `TogetherAI` and `SpotifyAPI`.

We used a two-phase approach to fine-tune our model. First, we utilized TogetherAI's base models to generate test data (a list of rescheduled JSON event objects for the day). Then, we picked logically sound examples to fine-tune our model.

## Challenges we ran into

In the beginning, our progress was extremely slow as **AtlasAI** integrates so many new technologies. We only had prior experience with `NextJS`, `Tailwind` and `MaterialUI`, which essentially meant that we had to learn how to create our entire backend from scratch.

**AtlasAI** also went through many integrations throughout this weekend as we strove to provide the best recommendations for our users. This involved long hours spent in fine-tuning our `TogetherAI` models and testing out features until we were satisfied with our product.

## Accomplishments that we're proud of

We are extremely proud that we managed to integrate so many new technologies into **AtlasAI** over the course of three short days.

## What we learned

In the development realm, we successfully mastered the integration of several valuable third-party applications such as Convex and TogetherAI. This expertise significantly accelerated our ability to construct lightweight prototypes that accurately embody our vision. Furthermore, we honed our collaborative skills through engaging in sprint cycles and employing agile methodologies, which collectively enhanced our efficiency and expedited our workflow.

## What's next for AtlasAI

Research indicates that health data can reveal critical insights into health symptoms like depression and anxiety. Our goal is to delve deeper into leveraging this data to furnish enhanced health insights as proactive measures against potential health ailments. Additionally, we aim to refine lifestyle recommendations for the user's calendar to foster better recuperation.