Inspiration

I've always been drawn to the idea of using tech for good, especially in mental wellness. Seeing how many people struggle to find a safe space to express their emotions, I wanted to build something that felt like a supportive friend, not just a tool. That's where EmoAI came in – an AI companion that truly listens, understands, and helps you navigate your feelings.

What it does

EmoAI is my take on an AI-powered personal mental wellness companion. Here's what it offers:

  1. AI Companion Chat: You can chat with three different AI personalities – an Empath, an Advisor, or a Neutral listener. They're there to listen and respond, creating a judgment-free zone for you to open up.
  2. Emotion Diary & Analysis: The app automatically tracks your emotional ups and downs. Each day, it generates an AI report with mood keywords, trend analysis, observations, healing exercises, and a supportive message from your AI.
  3. Crisis Intervention: Safety first! If the AI detects signs of severe distress, it'll immediately pop up with crisis support info, like hotlines.
  4. Data Visualization: See your emotional journey unfold with clear charts and keywords, helping you spot patterns and understand your mood better.

How we built it

Building EmoAI was a journey, and we opted for a modern stack to keep things scalable and secure:

  1. Frontend (The User-Facing Part):

    • Framework: Nuxt.js 3 + Vue.js 3 for a snappy, responsive app.
    • UI: Tailwind CSS and Nuxt UI for a clean, consistent look.
    • State Management: Pinia keeps all our data (chats, user info, diary) organized.
    • Language: TypeScript (strict mode!) was a must for robust code.
    • Build: Vite made development super fast.
  2. Backend (The Brains Behind the AI):

    • Proxy Layer: Nuxt.js Server Routes act as a secure bridge between the frontend and our AI, handling CORS and keeping API keys safe.
    • Core AI: Python-powered, using NVIDIA API for chat and emotion analysis.
    • Smart Retrieval: FAISS helps our AI pull relevant info from a knowledge base, making conversations more contextual.

Challenges we ran into

Of course, it wasn't all smooth sailing. Here are some hurdles we tackled:

  1. Real-time Streaming: Getting that smooth, real-time chat experience with SSE (Server-Sent Events) and parsing embedded data was tricky. Our useChatStream composable was key here.
  2. Security & Privacy: Handling sensitive user data and API keys securely was paramount. The Nuxt server-side proxy was our solution to keep everything locked down.
  3. Empathetic AI: Making the AI sound genuinely empathetic, not robotic, was a big one. We experimented with different personas, prompt engineering, and RAG to get it right.
  4. Strict TypeScript: Embracing TypeScript's strict mode meant more upfront work defining types, but it paid off big time in preventing bugs down the line.

Accomplishments that we're proud of

Looking back, these are the things that really make us proud:

  1. Building a fully functional, real-time AI chat app that feels great to use.
  2. Creating an insightful emotion analysis and diary system that genuinely helps users.
  3. Implementing robust crisis detection – user safety was always our top priority.
  4. Developing a secure and efficient tech architecture that delivers powerful features.
  5. Maintaining high code quality throughout the project with strict standards and clear docs.

What we learned

Every project is a learning experience, and EmoAI taught us a lot:

  1. Tech Deep Dive: We got to dive deep into Nuxt.js, Vue 3 Composition API, TypeScript, and the intricacies of real-time data streams. Plus, hands-on experience with LLM APIs was invaluable.
  2. Product Empathy: Designing for mental wellness really hammered home that empathy, trust, and security are the absolute core – even more than just features.
  3. Project Discipline: Detailed guidelines (Agents.md) and API docs were crucial for keeping our complex project consistent and collaborative.

What's next for EmoAI

We're super excited about EmoAI's future and have a few ideas brewing:

  1. Deeper Personalization: Imagine the AI remembering your long-term preferences and experiences for even more tailored support.
  2. Voice Interaction: Adding voice input/output for a more natural, conversational feel.
  3. More Wellness Tools: Integrating scientifically-backed exercises like guided meditations or CBT techniques.
  4. Mobile Apps: Bringing EmoAI to iOS/Android so you can access it anywhere.
  5. Community & Experts: Potentially adding an anonymous community feature or connecting users with professional counselors (with consent, of course!).

Built With

Share this project:

Updates