Skip to content

Latest commit

 

History

History
214 lines (154 loc) · 7.13 KB

File metadata and controls

214 lines (154 loc) · 7.13 KB
MindMate

🧠 MindMate

AI-Powered Mental Wellness Companion

Talk. Track. Heal. Grow.

Your 24/7 mental wellness partner — combining a high-fidelity Claude 3.5 Sonnet AI companion, mood analytics, guided meditation, clinical assessments, and real-time community support in a single privacy-first platform.


[Live Demo License: MIT Next.js TypeScript Supabase


⚠️ MindMate is a wellness support tool — not a substitute for professional medical care. If you are in crisis, please call iCall: 9152987821 or Vandrevala Foundation: 1860-2662-345 (India) immediately.


📖 Table of Contents


🌟 Overview

Mental wellness tools are often fragmented, expensive, or culturally disconnected. MindMate is built to fix that.

It combines an Emotionally Intelligent AI powered by Claude 3.5 Sonnet, a mood tracking engine with longitudinal insights, a guided meditation library with real audio, validated clinical screenings (PHQ-9, GAD-7), and a CBT journaling tool — all wrapped in a privacy-first architecture with Supabase Row Level Security at its core.

MindMate is designed for students and young adults to build resilience and manage mental health in a safe, judgment-free space.

The goal of MindMate is not to keep you on the app.
It's to help you build enough resilience that you need it less.

✨ Features

🤖 AI Companion

  • High-Fidelity Intelligence: Conversations powered by OpenRouter (Claude 3.5 Sonnet) with a Groq (Llama 3) fallback layer for 100% uptime.
  • Context-aware persistence: AI remembers your history and references previous conversations to provide tailored support.
  • Mood-aware responses: AI factors in your recent emotional patterns and assessments before responding.
  • Deterministic crisis detection: Hardcoded safety layer for crisis indicators, bypassing LLM logic for instant emergency resource routing.

📊 Mood Tracking & Insights

  • Daily Check-ins: Log moods with activity correlation tags.
  • Visual Analytics: 7-day and 30-day interactive charts powered by Recharts.
  • Smart Insights: Automated patterns detection linking activities to emotional states.

🧘 Wellness Toolkit

  • Guided Breathing: Interactive animations for Box Breathing, 4-7-8, and more.
  • Audio Sessions: Real, high-quality audio sessions for Sleep, Meditation, and Nature Sounds.
  • CBT Journaling: Structured cognitive reframing tool to help challenge negative thought patterns.

🩺 Clinical Tools

  • PHQ-9 & GAD-7: Validated clinical assessments with automated scoring and historical tracking.
  • Progress Export: Generate PDF clinical summaries of your progress to share with therapists.

🔒 Privacy & Security

  • Supabase RLS: Row Level Security ensures only you can access your data.
  • No Data Training: Your personal conversations are never used to train AI models.
  • Secure Auth: Industry-standard Google OAuth and Email/Password integration.

🛠 Tech Stack

Layer Technology
Framework Next.js 14 (App Router)
Language TypeScript 5
Styling Emotion/Styled Components + Tailwind CSS
Animations GSAP + Framer Motion
Backend & DB Supabase (Postgres + Auth + Realtime)
AI / LLM OpenRouter (Claude 3.5 Sonnet) / Groq Llama 3
Charts Recharts
PWA Next-PWA for offline and mobile installation
Deployment Vercel

📁 Project Structure

MindMate/
│
├── mindmate-next/                  # ✅ Active codebase (Next.js 14)
│   ├── app/                        # App Router — pages and API routes
│   │   ├── chat/                   # AI companion ( Claude 3.5 Sonnet)
│   │   ├── mood/                   # Mood tracking & Recharts dashboard
│   │   ├── relax/                  # Meditation library with Audio
│   │   ├── learn/                  # Content library + CBT journal
│   │   ├── assessments/            # PHQ-9 and GAD-7
│   │   └── api/                    # AI & Database Proxy routes
│   ├── components/                 # Styled Components library
│   ├── lib/                        # Supabase & OpenRouter/Groq clients
│   └── theme/                      # Design system tokens
│
├── legacy-v1/                      # 📦 Archived vanilla prototype
├── SECURITY.md                     # RLS policy documentation
└── README.md                       # You are here

🚀 Getting Started

Prerequisites

1. Clone & Install

git clone https://github.com/RandomAssassin-rgb/MindMate.git
cd MindMate/mindmate-next
npm install

2. Set Up Environment Variables

cp .env.example .env.local

3. Initialize Database

Apply the SQL migration scripts found in the root directory via the Supabase SQL Editor:

  • supabase_forum_posts.sql
  • supabase_cbt_journal.sql
  • supabase_assessments.sql
  • supabase_chat_history.sql

4. dev

npm run dev

🔑 Environment Variables

# Supabase
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_key

# AI Providers
OPENROUTER_API_KEY=your_openrouter_key
GROQ_API_KEY=your_groq_key

# App Settings
NEXT_PUBLIC_APP_URL=http://localhost:3000

🗺 Roadmap

  • AI companion with Claude 3.5 Sonnet
  • Persistent chat history (Supabase)
  • Mood tracking with Recharts
  • Meditation library with actual Audio
  • Clinical Assessments (PHQ-9/GAD-7)
  • CBT Journaling Tool
  • Mobile PWA Support
  • Community Forum Feed
  • Voice journaling with Whisper transcription
  • Weekly Insight Report email delivery
  • Therapist marketplace integration
  • Multilingual support (Tamil, Hindi, Telugu)

📄 License

MIT License — see LICENSE for details.


Built with care for mental wellness 🌿

(https://mindmate-production.vercel.app/)