Skip to content

bhaveshpatil093/MindBridge

Repository files navigation

🧠 MindBridge - AI-Powered Mental Health Companion

Your compassionate AI companion for mental health support, designed specifically for college students.

React TypeScript Tailwind CSS Google Gemini AI

✨ Features

πŸ€– AI-Powered Mental Health Support

  • Google Gemini AI Integration: Advanced AI companion using Google's latest language model
  • Real-time Mood Analysis: AI analyzes your text input to understand emotional state
  • Personalized Insights: Get tailored recommendations based on your mood patterns
  • Crisis Detection: Intelligent crisis assessment with immediate resource provision
  • Context-Aware Conversations: AI remembers your history and provides personalized support

πŸ’¬ Smart Chat System

  • 24/7 AI Companion: Always-available mental health support
  • Mood-Aware Responses: AI adapts responses based on your current emotional state
  • Topic Detection: Automatically identifies conversation themes (academic stress, social anxiety, etc.)
  • Crisis Intervention: Immediate crisis detection with emergency resources
  • Conversation History: Track your mental health journey over time

πŸ“Š Advanced Mood Tracking

  • AI-Powered Analysis: Get insights from your mood entries using natural language processing
  • Pattern Recognition: Identify mood trends and triggers
  • Personalized Recommendations: AI suggests activities based on your current state
  • Streak Tracking: Build healthy habits with daily mood logging
  • Visual Analytics: Beautiful charts showing your emotional journey

🎯 Personalized Dashboard

  • Real-time Insights: AI-generated insights based on your data
  • Smart Recommendations: Personalized activities and techniques
  • Progress Tracking: Monitor your mental health journey
  • Trend Analysis: Visual representation of mood patterns
  • Quick Actions: Easy access to support tools

πŸ“š AI-Curated Resources

  • Dynamic Content: Resources adapt based on your needs
  • Personalized Categories: AI-recommended resources based on your situation
  • Difficulty Levels: Activities tailored to your current capacity
  • Benefit Tracking: Understand how each resource helps you
  • Smart Filtering: Find exactly what you need when you need it

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Google Gemini API key

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/mindbridge.git
    cd mindbridge
  2. Install dependencies

    npm install
  3. Set up Google Gemini AI

    • Get your API key from Google AI Studio
    • The API key is already configured in the code (for demo purposes)
    • Note: In production, use environment variables for security
  4. Start the development server

    npm run dev
  5. Open your browser Navigate to http://localhost:8080 (or the port shown in terminal)

πŸ—οΈ Architecture

Frontend Stack

  • React 18 with TypeScript for type safety
  • Vite for fast development and building
  • Tailwind CSS for modern, responsive design
  • Shadcn/ui for beautiful, accessible components
  • React Router for client-side routing

AI Integration

  • Google Gemini 1.5 Flash for natural language processing
  • Custom AI Service for mental health-specific prompts
  • Context Management for personalized responses
  • Safety Protocols for crisis detection and intervention

Data Management

  • Local Storage for user data persistence
  • Real-time Updates for immediate AI insights
  • Secure Handling of sensitive mental health information

οΏ½οΏ½ Configuration

Environment Variables

Create a .env.local file in the root directory:

VITE_GEMINI_API_KEY=your_google_gemini_api_key_here

AI Service Configuration

The AI service is configured in src/lib/ai-service.ts:

// Initialize Google Gemini AI
const genAI = new GoogleGenerativeAI(process.env.VITE_GEMINI_API_KEY);
const model = genAI.getGenerativeModel({ model: 'gemini-1.5-flash' });

πŸ“± Pages & Features

🏠 Home Page

  • Welcome introduction to MindBridge
  • Quick access to all features
  • Crisis support information
  • Beautiful, engaging design

πŸ’¬ AI Chat

  • Real-time AI responses using Google Gemini
  • Mood analysis of your messages
  • Crisis detection with immediate resources
  • Topic identification for better support
  • Conversation history tracking

πŸ“Š Mood Tracker

  • AI-powered mood analysis from text input
  • Visual mood calendar with 30-day view
  • Streak tracking for motivation
  • AI insights based on patterns
  • Personalized recommendations

πŸ“ˆ Dashboard

  • Real-time statistics (streaks, averages, progress)
  • AI-generated insights and tips
  • Personalized recommendations for activities
  • Mood trend charts and analytics
  • Quick action buttons for support

πŸ“š Resources

  • AI-curated content based on your needs
  • Dynamic recommendations that adapt to your situation
  • Difficulty levels and time estimates
  • Benefit tracking for each resource
  • Smart filtering by category

πŸ€– AI Features Deep Dive

Natural Language Understanding

  • Analyzes your messages for emotional content
  • Identifies crisis indicators automatically
  • Provides context-aware responses
  • Remembers conversation history

Personalized Recommendations

  • Suggests activities based on your mood
  • Adapts difficulty levels to your capacity
  • Considers your available time
  • Tracks what works for you

Crisis Detection & Response

  • Monitors for crisis indicators in real-time
  • Provides immediate crisis resources
  • Offers grounding techniques
  • Connects to emergency services

Mood Pattern Analysis

  • Identifies trends in your emotional state
  • Suggests interventions based on patterns
  • Tracks progress over time
  • Provides predictive insights

🎨 Design System

Modern UI/UX

  • Glass morphism effects with backdrop blur
  • Gradient backgrounds for visual appeal
  • Smooth animations and transitions
  • Responsive design for all devices
  • Accessibility-first approach

Color Palette

  • Primary: Blue to purple gradients
  • Success: Green to emerald
  • Warning: Orange to red
  • Neutral: Slate variations
  • Accent: Purple to pink

Typography

  • Modern fonts with excellent readability
  • Hierarchical sizing for clear information architecture
  • Gradient text effects for emphasis
  • Responsive scaling across devices

πŸ”’ Privacy & Security

Data Protection

  • All data stored locally on your device
  • No personal information sent to external servers
  • AI responses generated in real-time without storage
  • Crisis detection runs locally for privacy

Crisis Support

  • Immediate access to crisis hotlines
  • Emergency contact information
  • Grounding techniques and coping strategies
  • Professional resource recommendations

🚨 Crisis Support

MindBridge includes comprehensive crisis support:

  • 988 Suicide & Crisis Lifeline
  • Crisis Text Line (Text HOME to 741741)
  • Emergency Services (911)
  • Campus Counseling resources
  • Immediate coping strategies

Important: MindBridge is a supportive AI companion, not a replacement for professional therapy. If you're in immediate crisis, please contact emergency services or a crisis hotline.

🀝 Contributing

We welcome contributions to make MindBridge better for all students!

How to Contribute

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Areas for Improvement

  • Additional AI models and integrations
  • More crisis detection algorithms
  • Enhanced analytics and insights
  • Additional language support
  • Accessibility improvements

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Google Gemini AI for providing the AI capabilities
  • Shadcn/ui for beautiful component library
  • Tailwind CSS for the utility-first CSS framework
  • React Team for the amazing frontend framework
  • Mental Health Community for guidance and support

πŸ“ž Support


Made with ❀️ for students, by students

MindBridge - Your AI-powered mental health companion

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages