Skip to content

Supriyadasari04/EmpathIQ

Repository files navigation

🌌 EmpathIQ: An Emotion-Aware AI Companion for Proactive Mental Wellness

Next.js 14 AI Models Database License

EmpathIQ is a "Soul-First" AI companion application designed to bridge the gap between deterministic data tracking and empathetic human-like companionship. Unlike traditional wellness apps that act as passive logs, EmpathIQ uses a Unified Emotion Pipeline to monitor your "Emotional Pulse" across all interactions—journaling, chatting, and activity—providing proactive validation and preventive mental health support.


🚀 The "Soul-First" Vision

EmpathIQ is built on the philosophy that AI should be more than a chatbot; it should be an Empathetic Sentinel.

  • Proactive: Aura (your buddy) notices when you haven't checked in and reaches out.
  • Validating: Instead of offering generic advice, Aura uses high-precision sentiment analysis to justify and validate your feelings first.
  • Deeply Visual: The entire UI (themes, buddy's face, charts) adapts in real-time to your detected emotional state.

✨ Key Features

🧩 1. Multi-Step Onboarding

Sets up your personalized sanctuary by collecting your name, age group (to suggest themes), goals, and your buddy's name. It initializes the AI persona based on whether you prefer a "Wise Mentor" or a "Young Friend."

🏠 2. The Dashboard (The Sanctuary)

  • Heart Momentum: A pulsing orb reflecting your care streak.
  • Aura’s Discovery: Curated wellness news and articles based on your current detectedEmotion.
  • Predictive Pulse: AI identifies historical "heavy days" based on your past patterns and alerts you to take it easy.

🧠 3. AI Coach: Aura’s Space

  • Deep Conversation: A dedicated chat space for long-form venting.
  • Speech-to-Text: Voice input via Web Speech API.
  • Crisis Detection: A rule-based parser that scans for self-harm keywords to trigger immediate clinical support.
  • PDF Export: Save your breakthroughs as a beautifully formatted document.

💖 4. Heart Journal: Reflections

  • Sentiment Analysis: Every entry is analyzed to find 1 of 6 core emotions.
  • Distortion Detection: Identifies 5 cognitive biases (e.g., Catastrophizing, Should Statements).
  • Instant Validation: Aura gives a "Bubble Response" immediately after you save an entry.

📈 5. Emotional Pulse: Analytics

  • Bézier Wave Chart: A custom-coded smooth wave that renders your emotional journey over time.
  • Interactive Pindrops: Hover over the wave to see exactly what you wrote on that emotional day.
  • Pixel Grid: A 90-day heatmap of your mood intensity.

🧘 6. Wellness Journey: Activities

  • 5 Guided Exercises: Breathing Conservatory, Grounding sensory tool, Gratitude Log, Heart Release (Declutter), and Focus Sprints.
  • Gamification: Earn XP and Level Up your buddy through active participation.

🧠 AI Model Engine & Architecture

EmpathIQ utilizes a Multi-Layered Transformer Architecture to ensure intelligence and availability.

1. Emotion Classification (The Tracking Kernel)

2. Generative LLM Cluster (The Conversation Kernel)

To ensure the buddy is never "busy," we use a Cascaded Failover Pipeline. If the primary model fails, the system automatically jumps to the next:

  1. Primary: Phi-3 Mini (MMLU Logic: 68.8%)
  2. Level 2: Zephyr-7B Beta (Human Preferred Dialogue)
  3. Level 3: Mistral-7B-Instruct-v0.3 (High Reasoning)
  4. Level 4: Qwen-2.5-7B (Premium Logic: 70.5%)

🔬 Technical Validation (Google Colab Experiments)

I performed rigorous testing on the core AI components using Google Colab's T4 GPUs. The logic and benchmarking scripts are included in the repository as ai_validation_lab.ipynb.

Results from the Experiments:

  • Emotion Recognition: Achieved a 96.66% F1-Accuracy on Twitter-based first-person text.
  • Clinical Logic: Phi-3 Mini scored 68.8% on the MMLU-Clinical knowledge base.
  • Empathy Resonance: Qwen-2.5 scored 88/100 on the EmpatheticDialogues resonance test.

Note: You can run these benchmarks yourself by opening the provided notebook in Google Colab.


🛠️ Installation & Local Setup

Follow these steps to run EmpathIQ on your local machine:

1. Clone the Repository

git clone https://github.com/Supriyadasari04/EmpathIQ.git
cd EmpathIQ

2. Install Dependencies

npm install

3. Setup Environment Variables

Create a .env.local file in the root directory and add your keys:

NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
HUGGING_FACE_TOKEN=your_hf_inference_api_token

4. Run the Development Server

npm run dev

The application will be live at http://localhost:3000.


🗄️ Database Schema (Supabase)

EmpathIQ uses a real-time PostgreSQL database with the following primary tables:

  • buddy_stats: Level, XP, Aura Name, and Onboarding JSON.
  • reflections: User entries, detected mood labels, and identified distortions.
  • mood_pixels: Daily intensity values (1-5).
  • habits: Daily tracking Boolean arrays and streaks.
  • chat_messages: Persisted history for the Coach page sessions.

🗺️ Roadmap & Future Scope

  • Wearable Sync: Linking HRV data to Aura’s face.
  • Voice Sanctuary: Hands-free mode for accessibility.
  • VR Space: A 3D ambient forest for the Breathing activity.
  • Group Sync: Anonymized wellness sharing for close-knit groups.

🤝 Contributors & License

  • Lead Developer: Supriya Dasari
  • License: MIT License

EmpathIQ — Because your AI should have a heart.

About

EmpathIQ: A "Soul-First" proactive AI wellness companion. Powered by Next.js 14, Supabase, and a cascaded Hugging Face failover pipeline (Phi-3, Mistral, Zephyr). Features 96.6% accurate DistilRoBERTa emotion classification, organic Bézier-curved analytics, and real-time sentimental journaling.

Topics

Resources

Stars

Watchers

Forks

Contributors