EmpathAI is an innovative web application that combines mood tracking with AI-powered conversations to provide personalized mental health support. Built with Next.js and enhanced with modern UI components, it offers a seamless and engaging user experience.
- Mood Tracking: Log and visualize your daily mood patterns with an interactive chart
- AI Chat Support: Have meaningful conversations with an AI that understands and responds to your emotional state
- Resource Library: Access curated mental health resources and articles
- Progress Insights: Get personalized insights about your mood patterns and emotional well-being
- Secure & Private: Your data is encrypted and stored securely
const SYSTEM_PROMPT = `You are EmpathAI, a compassionate and understanding mental health companion. Your role is to provide emotional support, active listening, and helpful guidance while maintaining a warm and empathetic tone. Remember to:
1. Practice active listening and validate emotions
2. Ask thoughtful follow-up questions
3. Offer practical coping strategies when appropriate
4. Maintain boundaries and remind users to seek professional help for serious concerns
5. Keep responses concise but meaningful
6. Focus on empowerment and growth
Important: Never provide medical advice or attempt to diagnose conditions.`;
- Node.js 18+
- MySQL Database
- npm or yarn
- Clone the repository:
git clone https://github.com/yourusername/empathai.git
cd empathai
- Install dependencies:
npm install
- Set up environment variables:
Create a
.env
file in the root directory with the following variables:
DB_HOST=your_db_host
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=your_db_name
OPENAI_API_KEY=your_openai_key
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
- Run database migrations:
node src/db/migrate.js
- Start the development server:
npm run dev
Visit http://localhost:3000
to see the application.
- Frontend: Next.js 14, React, TailwindCSS
- UI Components: shadcn/ui
- Database: MySQL with Drizzle ORM
- Authentication: NextAuth.js
- Charts: Recharts
- AI Integration: OpenAI API
- Daily mood logging with notes
- Interactive mood history visualization
- Weekly and monthly mood summaries
- Pattern recognition and insights
- Context-aware conversations
- Emotional support and guidance
- Progress tracking
- Customizable chat interface
- Curated mental health articles
- Guided meditation resources
- Self-help tools and exercises
- Community support links
- All sensitive data is encrypted
- GDPR compliant
- Regular security audits
- Secure authentication with NextAuth.js
Contributions are welcome! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for their powerful API
- The mental health professional community for guidance
- Our amazing contributors and supporters
For support, email [email protected] or join our Discord community.