🧠 MindfulBot: Your AI Mental Health Companion

🌟 Inspiration

Mental health often goes unnoticed until it's too late. With the growing burden of stress, anxiety, and depression—especially in underserved communities—we wanted to create a solution that offers accessible emotional support at all times. MindfulBot is designed to be a non-judgmental, always-available companion that encourages mental well-being and offers comfort, resources, and active listening.


🤖 What it does

MindfulBot is an AI-powered mental health assistant that:

  • Offers empathetic, conversational support to users who feel stressed, anxious, or low.
  • Uses NLP to detect emotional tone and suggest calming exercises like breathing, journaling, or reaching out to professionals.
  • Generates encouraging and mindful responses based on user inputs.
  • Provides motivational quotes and CBT-inspired affirmations.
  • Ensures privacy and avoids storing any sensitive user data.

🏗️ How we built it

  • Frontend: Built with React and TypeScript, featuring a clean chat interface.
  • Backend/API: Utilized Google’s @google/generative-ai (Gemini or text-bison-001 fallback) for generating conversational responses.
  • Prompt Engineering: Custom prompts designed for empathetic tone, mindfulness, and user safety.
  • Environment Handling: Used Vite for fast builds, environment variables for API key management.
  • Deployment: Can be deployed on Vercel or Netlify with minimal config.

🧱 Challenges we ran into

  • Model Compatibility: Gemini Pro threw 404s in some API versions — fallback model integration was necessary.
  • Maintaining empathy: Tuning prompts to avoid robotic or clinical responses while staying appropriate was a balancing act.
  • Error handling: Ensuring graceful fallback if the AI service failed mid-conversation.
  • Mental health ethics: Ensuring we're supportive without making clinical claims was critical.

🏆 Accomplishments that we're proud of

  • Delivered a fully functional MVP with a responsive UI and emotionally aware AI in under the hackathon timeframe.
  • Managed to create a consistent and comforting tone through thoughtful prompt design.
  • Built a solution with a real potential to help people feel heard—even if just a little.

📚 What we learned

  • Prompt engineering has an outsized impact in conversational AI—tiny changes, big results.
  • AI should complement, not replace, human support in mental health contexts.
  • Model and API version mismatches are a common but solvable issue with AI SDKs.
  • Less is more: a focused MVP with fewer features but high polish resonates more.

🚀 What's next for MindfulBot

  • Voice & Multilingual Support: Expand to speech input/output and add regional languages for broader access.
  • Mood Tracking: Visual dashboards for tracking mood trends over time.
  • Professional Escalation: Partner with real therapists for emergency handoffs.
  • Mobile App: Native mobile experience with push notifications and offline support.
  • Data Privacy Audit: Implement strict local storage-only architecture for full privacy compliance.

“It’s okay to not be okay — and MindfulBot is here to remind you of that.”

Share this project:

Updates