Inspiration

This is a playful application that I wanted to build as a tiny mental health and mindfulness helper. For many of us, it's easy to get stuck on dwelling negative things that are happening around us, and don't reflect much about the positive things that are passing by. A lot of us also would wish to have a mentor figure who can help us gain an insight into our own day, and help us see how things are interconnected and something bad can be made into something good.

I imagined a character for this task, Celestius, a benevolent and wise wizard who has been living on the mountains for decades. He can see how the worst thing that happened today can also be interconnected to the best thing that's happened, and helps the user to have another perspective about their day.

What it does

The user provides inside a form what they think as the best and worst highlights of the day, and "Celestius" gives a response connecting the two events, in a bit flowery (or wizardly) tone.

This is not a chat application, so instead you have to think about specific two things. Reflecting about your day and putting things in perspective can be very beneficial for mindfulness and overall mental health, so this step is necessary and I think very useful.

How I built it

Next.js was used to create the frontend and the API route. Huggingface.js (the inference library) was used for text generation with the large language model Meta-Llama-3-8B-Instruct.

Challenges I ran into

The most challenging part was finishing the project during the time period given for the hackathon which was running during the same time period as the sponsor hackathon challenge, so time management was the most difficult part.

Accomplishments that I'm proud of

The great thing about this project is that it not only gives an output for the connection between two things, but it does it in an uplifting way. For example, failing a class and having a terrible headache might be the worst part of an ordinary day, but if you think that the best thing that happened was just that you had a great dinner, Celestius reminds you that even in the face of such disturbances, you were still able to appreciate a mundane and routine thing: how savory the food was.

What I learned

Even for a simple project, a proper planning is required. Also, simplifying and isolating the problem helps a lot during debugging. Breaking the problem into simpler components also very useful in figuring out the reasons for it.

What's next for Celestius

A proper validation for the inputs as well as the generated output can be done. Also, it can be gamified, keeping track of daily "streaks" of users, and perhaps displaying it with a heatmap which requires a robust backend implementation.

Built With

  • huggingface.js
  • meta-llama-3-8b-instruct
  • next.js
Share this project:

Updates