HopeFlow is a compassionate AI-powered emotional support platform that provides 24/7 mental health assistance through voice and text conversations. Built with empathy at its core, HopeFlow offers immediate, personalized emotional support to help users navigate life's challenges.
- 24/7 Emotional Support: Always available AI companion for immediate emotional assistance
- Voice & Text Communication: Flexible interaction through speech or text input
- Personalized Responses: AI trained in therapeutic communication and emotional intelligence
- Conversation History: Secure storage and retrieval of past conversations
- Crisis Detection: Advanced algorithms to identify and respond to crisis situations
- Multi-Modal Interface: Seamless switching between voice and text interactions
- Emotional Intelligence: Analyzes emotional tone and provides contextually appropriate responses
- Therapeutic Techniques: Incorporates evidence-based emotional support methods
- Conversation Memory: Maintains context across sessions for personalized support
- Crisis Intervention: Specialized responses for mental health emergencies
- Cultural Sensitivity: Designed with inclusivity and cultural awareness
- End-to-End Encryption: All conversations are encrypted and confidential
- User Authentication: Secure sign-in with Supabase authentication
- Data Protection: GDPR compliant data handling and storage
- Anonymous Support: Option for anonymous conversations
- Privacy Controls: User control over data retention and deletion
- React 18 - Modern UI framework with hooks and functional components
- TypeScript - Type-safe development for better code quality
- Tailwind CSS - Utility-first CSS framework for responsive design
- Vite - Fast build tool and development server
- React Router - Client-side routing for single-page application
- Supabase - Backend-as-a-Service for authentication and database
- PostgreSQL - Relational database for user data and conversation history
- Google Gemini AI - Advanced language model for emotional support responses
- Web Speech API - Browser-native speech recognition and synthesis
- ESLint - Code linting and quality assurance
- PostCSS - CSS processing and optimization
- Lucide React - Beautiful, customizable icons
Before running HopeFlow, ensure you have:
- Node.js (v18 or higher)
- npm or yarn package manager
- Supabase Account for backend services
- Google AI Studio Account for Gemini API access
-
Clone the repository
git clone https://github.com/your-username/hopeflow.git cd hopeflow -
Install dependencies
npm install
-
Environment Setup
Copy the example environment file:
cp .env.example .env
Configure your environment variables in
.env:# Supabase Configuration VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key # Gemini AI Configuration VITE_GEMINI_API_KEY=your_gemini_api_key
-
Database Setup
The project includes Supabase migrations. Run them to set up your database:
# If using Supabase CLI supabase db reset # Or manually run the migration files in supabase/migrations/
-
Start the development server
npm run dev
The application will be available at
http://localhost:5173
id(uuid, primary key) - References auth.usersemail(text) - User's email addressfull_name(text, optional) - User's full namecreated_at(timestamp) - Account creation timeupdated_at(timestamp) - Last profile update
id(uuid, primary key) - Unique message identifieruser_id(uuid, foreign key) - References user_profiles.idmessage(text) - User's input messageresponse(text) - AI's responseis_voice(boolean) - Whether input was voice or textcreated_at(timestamp) - Message timestamp
- Row Level Security (RLS) enabled on all tables
- Authentication policies ensure users can only access their data
- Automatic profile creation on user registration
- Sign Up/Sign In: Create an account or sign in to access personalized features
- Start Conversation: Click "Start Your Journey" or navigate to the Talk page
- Choose Input Method: Use the voice button for speech or type in the text input
- Receive Support: Get immediate, empathetic responses from HopeFlow
- Access History: Review past conversations in the History section
- Click the microphone button to start voice input
- Speak naturally - HopeFlow will process your speech
- Click again to stop recording
- AI responses can be played back using text-to-speech
HopeFlow includes specialized crisis detection and response:
- Automatic identification of crisis keywords
- Immediate provision of emergency contact information
- Specialized therapeutic responses for crises
- All user conversations are encrypted in transit and at rest
- Personal information is stored securely in Supabase
- No conversation data is shared with third parties
- Users can delete their data at any time
- Environment variables protect sensitive API keys
- Supabase RLS policies prevent unauthorized data access
- Rate limiting prevents API abuse
- Input validation prevents injection attacks
We welcome contributions to HopeFlow! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow TypeScript best practices
- Use meaningful variable and function names
- Add comments for complex logic
- Ensure responsive design for all components
- Test across different browsers and devices
This project is licensed under the MIT License - see the LICENSE file for details.
- Mental Health Professionals who guided therapeutic communication
- Open Source Community for the amazing tools and libraries
- Beta Testers who helped refine the user experience
- Supabase Team for excellent backend infrastructure
- Google AI Team for the Gemini language model
- OmniDimension for the Web Call AI Agent
HopeFlow provides emotional support and is not a substitute for professional medical advice, diagnosis, or treatment. If you're experiencing a mental health crisis or having thoughts of self-harm, please contact emergency services or professional mental health services immediately.
Made with β€οΈ for mental health and emotional wellness