CapyCare – Your Capybara Mood Companion •⩊•

A friendly AI-powered mental health companion app featuring Capy, an empathetic capybara chatbot that offers emotional support, mood tracking, music therapy, and crisis intervention.


🐾 Inspiration

Mental health awareness is more important than ever, but many people struggle to find accessible, judgment-free support. Traditional therapy can be expensive and intimidating, while many mental health apps feel clinical and impersonal.

We wanted to create something different—a warm, friendly companion that combines the healing power of music therapy with AI-driven emotional support.

The capybara, known as the world’s friendliest animal, became our perfect mascot. Their calm, social nature and gentle demeanor represent the kind of care we wanted to provide. We envisioned an AI that feels like a caring friend—not a clinical tool.


💬 What It Does

CapyCare is an AI-powered mental health companion featuring Capy, a chatbot that provides 24/7 emotional support and personalized music therapy through natural conversations.

🌟 Core Features

  • 🤖 AI Chatbot Companion: Natural conversations powered by Google Gemini AI.
  • 🧠 Automatic Mood Detection: Detects emotions from conversation (happy, sad, anxious, calm, energized).
  • 🎵 Music Therapy: Mood-matched music recommendations via YouTube & Spotify.
  • 🌙 Dark Mode: Toggleable dark theme across all pages.
  • 💬 Chat Persistence: Private chat history saved and restored across sessions/devices.
  • 🆘 Crisis Support: Detects distressing language and offers helpline resources.
  • 🔐 User Authentication: Secure login and session management via Firebase.

🧑‍💻 User Experience Flow

  1. Users log in with Firebase.
  2. Start chatting with Capy.
  3. AI detects mood and responds empathetically.
  4. Music suggestions appear automatically when appropriate.
  5. Conversations are saved for continuity across sessions.

🛠️ How I Built It

👩‍💻 Frontend Technologies

  • HTML5/CSS3: Responsive UI with mood-based styling and dark mode.
  • JavaScript (ES6+): Core logic, AI integration, UI interactivity.
  • localStorage: Session and preference persistence.

🔧 Backend & APIs

  • Firebase Authentication: Secure login and session handling.
  • Google Gemini AI: NLP for emotional analysis and chat interaction.
  • YouTube & Spotify APIs: Embedded music recommendations and links.

🧩 Key Components

  • Chat Interface: Mood-styled messages, real-time updates, and memory.
  • Music Player Integration: Embedded YouTube + Spotify links based on detected emotion.
  • Authentication System: User registration, session tracking.
  • Private Chat History: User-specific chat memory stored via localStorage.

⚙️ Architecture

  • Pure client-side app with Firebase backend.
  • Modular JS architecture for scalability.
  • Fully responsive design.
  • Local storage used for secure, private user session continuity.

🚧 Challenges I Faced

  • 🤖 AI Integration: Prompt design and context handling for mood accuracy.
  • 🎧 Music API Reliability: Resolved CORS/rate-limiting by using curated, direct links.
  • 💾 Chat Persistence: Made user-specific localStorage logic to keep conversations private.
  • ⚖️ Tone Balancing: Designed Capy to be warm while handling mental health seriously.
  • 🌐 Cross-Browser Compatibility: Ensured consistent behavior across browsers/devices.

🏆 Accomplishments I’m Proud Of

  • 🐹 Capy Personality: Created a lovable capybara AI with emotional intelligence.
  • 🎵 Seamless Music Integration: Real-time mood-based song recommendations.
  • 🔐 Secure, Persistent Experience: Each user’s chats are private and remembered.
  • 🆘 Crisis Support Integration: Empathetic tone with built-in resources.
  • 📱 Accessible Design: Mobile-friendly, responsive, and visually calming.

📚 What I Learned

As an Electrical and Electronic Engineering (EEE) student with limited prior coding experience, this project was a huge learning milestone.
I learned to:

  • Build a full-stack web app from scratch.
  • Use APIs and integrate AI tools.
  • Design for real-world users and emotional sensitivity.

This project pushed me beyond my comfort zone and showed me how tech can meaningfully support mental health.


🚀 What’s Next for CapyCare

  • 🗣️ Voice Interaction: Add voice-based conversations.
  • 📊 Mood Analytics: Visual mood trend tracking and insights.
  • 🎵 Expanded Music Therapy: Apple Music, Amazon Music, and collaborative playlists.
  • 👥 Community Features: Anonymous group chat, peer support, moderated discussions.
  • 🧑‍⚕️ Professional Tools: Therapist dashboards, session tracking, and bookings.
  • 📱 Mobile & Wearables: iOS/Android apps, offline support, push notifications.
  • 🌍 Global Expansion: Multi-language support, cultural customization, full accessibility.
  • 🔬 Research Partnerships: Validate impact via clinical trials and academic collaborations.

CapyCare is here to support you — one conversation, one song, and one mood at a time. 🦫💙

Built With

Share this project:

Updates