Skip to content

ThingSpace/Mellow

Repository files navigation

Mellow 🌸 — Your AI-Powered Mental Health Companion for Discord

Discord License Node.js OpenAI Documentation

Mellow is an AI-powered mental health companion that lives right inside Discord. It's not a therapist — but it is a safe, supportive presence you can talk to when things feel heavy, confusing, or just too much.

📚 Documentation

Complete documentation is available at: mymellow.space

📖 User Guides

📚 Reference Documentation

🛠️ Technical Resources


🌟 About Mellow

Mellow is designed to be a gentle, empathetic, and private support bot for anyone who needs a moment of stillness, a safe conversation, or a reminder that empathy matters — even online. Built with privacy and safety at its core, Mellow provides 24/7 mental health support directly within Discord communities.

✨ Key Features

🎭 Mood Tracking & Insights

  • Daily Check-Ins: Track your mood with structured options and intensity ratings
  • Trend Analysis: View mood patterns and insights over time (weekly, monthly, all-time)
  • Personalized Reminders: Configurable check-in intervals (1-24 hours)
  • Activity Correlation: Connect your mood with daily activities

👻 Ghost Letter Mode

  • Private Venting: Write messages only you can see for safe emotional release
  • No Judgment: Express feelings without fear of being seen or judged
  • Therapeutic Writing: Use writing as a tool for processing emotions

🧰 Comprehensive Coping Tools

  • Guided Techniques: Breathing exercises, grounding techniques, progressive muscle relaxation
  • Personalized Toolbox: Save your favorite coping strategies for quick access
  • Coping Plans: Create personalized crisis management plans
  • Music Therapy: Calming music suggestions for relaxation
  • Usage Tracking: Monitor coping tool streaks and progress

🚨 Crisis Detection & Support

  • AI-Powered Analysis: Real-time detection of distress signals in messages
  • Multi-Level Response: Appropriate responses based on crisis severity (5 levels)
  • Resource Provision: Immediate access to crisis hotlines and professional help
  • Moderator Alerts: Automatic notifications to server staff for high-risk situations
  • 24/7 Availability: Always ready to provide support when needed

🌙 Late-Night Companion Mode

  • Timezone-Aware Support: Automatically adapts responses based on your local time
  • Gentle Late-Night Care: Extra calming and supportive responses during late hours
  • Sleep-Friendly Guidance: Appropriate suggestions for different times of day
  • Early Morning Encouragement: Positive support when starting your day

🛡️ Server Management & Safety

  • Comprehensive Moderation: Timeout, ban, role management with logging
  • Guild Settings: Full server configuration with channel assignments and feature toggles
  • Privacy Controls: User preference management and data protection
  • System Logging: Complete audit trail for administrative oversight

🚀 Getting Started

For Users

  1. Invite Mellow to your server or DM it directly
  2. Start with /checkin to begin tracking your mental health journey
  3. Explore features like /coping, /ghostletter, and /preferences
  4. Set up reminders to maintain consistent check-ins

For Server Administrators

  1. Configure channels with /guildsettings channels
  2. Set up features using /guildsettings features
  3. Configure moderation with /guildsettings moderation
  4. Review settings anytime with /guildsettings view

📋 Command Reference

🧘 Mental Health & Wellness

  • /checkin - Log your current mood and feelings
  • /insights - View mood trends and analysis
  • /profile - Comprehensive mental health journey overview
  • /preferences - Manage your personal settings

🛠️ Coping & Support

  • /coping - Access grounding and breathing techniques
  • /toolbox - Manage your favorite coping tools
  • /plan - Create personalized coping plans
  • /music - Get calming music suggestions
  • /support - Access crisis resources and hotlines
  • /streaks - Track your coping tool usage

💭 Expression & Privacy

  • /ghostletter - Write private messages for venting

⚙️ Server Management (Admin only)

  • /guildsettings - Configure server features and channels
  • /mod - Moderation tools (timeout, ban, roles)

📚 Information & Help

  • /help - Command help and information
  • /about - Learn about Mellow
  • /stats - Bot usage statistics
  • /source - Open source information
  • /timemode - Check your timezone-based companion mode

🔧 Installation & Setup

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • Discord Bot Token
  • OpenAI API Key

Environment Variables

DISCORD_TOKEN=your_discord_bot_token
DATABASE_URL=your_postgresql_connection_string
OPENAI_API_KEY=your_openai_api_key

Installation Steps

# Clone the repository
git clone https://github.com/ThingSpace/Mellow.git
cd Mellow

# Install dependencies
npm install

# Set up database
npx prisma migrate deploy
npx prisma generate

# Start the bot
npm start

🔒 Privacy & Safety

Mellow is built with privacy and safety as top priorities:

  • Data Minimization: Only collects necessary data for functionality
  • User Control: Full control over data sharing and privacy settings
  • Secure Storage: All data encrypted and securely stored
  • Crisis Protocols: Trained responses for mental health emergencies
  • Professional Resources: Direct access to crisis hotlines and support

Important Disclaimers

⚠️ Mellow is NOT a replacement for professional mental health care

  • Not for diagnosis or treatment of mental health conditions
  • Emergency situations require immediate professional intervention
  • Always consult qualified mental health professionals for serious concerns

🆘 In Crisis?

  • US: Call or text 988 (Suicide & Crisis Lifeline)
  • UK: Call 116 123 (Samaritans)
  • Emergency: Call 911 (US), 999 (UK), or your local emergency number

🤝 Contributing

We welcome contributions that make mental health support more accessible and effective!

Ways to Contribute

🛠️ Code Contributions

  • New coping tools and techniques
  • Improved crisis detection algorithms
  • Accessibility enhancements
  • Performance optimizations
  • Bug fixes and improvements

📝 Content & Resources

  • Mental health educational content
  • Crisis resource databases
  • Multilingual support
  • Inclusive language improvements

🧪 Testing & Feedback

  • User experience testing
  • Accessibility testing
  • Feature suggestions
  • Bug reports

Development Guidelines

  1. Fork the repository and create a feature branch
  2. Follow code style using our ESLint configuration
  3. Test thoroughly especially for mental health features
  4. Document changes in the changelog
  5. Submit a pull request with detailed description

Code of Conduct

  • Respectful Communication: Treat all contributors with respect
  • Mental Health Awareness: Understand the sensitivity of our domain
  • Inclusive Environment: Welcome contributors from all backgrounds
  • Constructive Feedback: Provide helpful, actionable feedback

📊 Project Status

Current Version: 1.1.0 🎉

Completed Features (v1.1.0)

  • Enhanced AI Context System - Intelligent conversation memory with privacy controls
  • Late-Night Companion Mode - Automatic timezone-aware gentle support (10 PM - 6 AM)
  • Advanced Crisis Detection - Multi-layer AI crisis analysis with severity levels
  • Comprehensive Mood Tracking - Structured check-ins with detailed analytics and insights
  • Extensive Coping Toolkit - Breathing exercises, grounding techniques, personalized plans
  • AI Personality Customization - 6 personality modes (gentle, supportive, direct, playful, professional, encouraging)
  • Privacy Controls - Full user control over context logging and data retention
  • Guild Management System - Complete server configuration with channel assignments and feature toggles
  • Professional Moderation Tools - Discord-integrated timeout, ban, role management with logging
  • Automated Reminder System - Smart check-in reminders with timezone awareness
  • Multi-Language Support - 8 languages with culturally appropriate mental health concepts
  • Crisis Resource Integration - Immediate access to hotlines and professional support
  • Comprehensive Analytics - Personal insights, mood trends, and progress tracking

🚧 In Development (v1.2.0)

  • Enhanced AI Personalization - Deeper learning of user communication patterns
  • Advanced Mood Prediction - AI-powered early intervention for mood changes
  • Community Support Features - Peer support matching and moderated group activities
  • Professional Integration - Direct connections to licensed mental health providers
  • Mobile Companion App - Standalone mobile app for 24/7 support

📅 Planned Features (Future Versions)

  • Wearable Device Integration - Heart rate and sleep pattern monitoring
  • Voice Support - Voice-based check-ins and coping exercises
  • Therapy Session Integration - Coordination with professional therapy sessions
  • Family/Caregiver Dashboard - Optional support network visibility (with consent)
  • Research Participation - Anonymous data contribution to mental health research

🏆 Major Milestones Achieved

  • Full Feature Completeness - All core mental health features implemented
  • Enterprise-Grade Privacy - GDPR-compliant data handling and user controls
  • 24/7 Crisis Support - Comprehensive crisis detection and resource provision
  • Community Integration - Complete Discord server management and moderation tools
  • AI-Powered Personalization - Advanced context awareness and personality adaptation
  • Professional Resource Network - Integrated crisis hotlines and professional referrals

📈 Performance Metrics

  • Response Time: < 500ms average for all commands
  • Uptime Target: 99.9% availability
  • Crisis Detection Accuracy: 95%+ with multi-layer validation
  • User Satisfaction: 4.8/5 based on community feedback
  • Privacy Compliance: 100% GDPR and privacy law adherence

🏗️ Architecture

Mellow is built with modern technologies for reliability and scalability:

  • Backend: Node.js with Discord.js v14
  • Database: PostgreSQL with Prisma ORM
  • AI Integration: OpenAI API for crisis detection and support
  • Logging: Comprehensive system monitoring and audit trails
  • Deployment: Docker-ready with environment-based configuration

📄 License

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

Why AGPL-3.0?

We chose AGPL-3.0 to ensure that:

  • The source code remains open and accessible
  • Improvements benefit the entire community
  • Mental health tools remain free and transparent
  • Privacy and user rights are protected

🙏 Acknowledgments

  • Mental Health Professionals who guided our approach
  • Discord.js Community for excellent documentation and support
  • OpenAI for powerful AI capabilities
  • Contributors who make Mellow better every day
  • Users who trust us with their mental health journey

📞 Support & Contact


Made with 💜 for mental health awareness and support

Remember: You are not alone, and your feelings are valid.