A comprehensive mental health application built with Next.js that provides personalized support, mood tracking, and AI-powered assistance for mental wellness.
- User Authentication & Profiles: Secure login system with personalized user profiles
- Mood Tracking: Daily mood logging with visual analytics and trends
- AI-Powered Chat: Intelligent conversational support using Google's Generative AI
- Support Network: Connect with support members and build your wellness community
- Real-time Communication: Socket.io integration for live chat and notifications
- Analytics Dashboard: Comprehensive insights into your mental health journey
- Email Notifications: Automated reminders and wellness check-ins
- Responsive Design: Optimized for mobile and desktop experiences
- Dark/Light Theme: User preference-based theme switching
- Real-time Data: Live updates using Socket.io and Redis
- Secure Backend: JWT-based authentication with bcrypt password hashing
- Database: MongoDB integration with Mongoose ODM
- Animation: Smooth UI interactions with Framer Motion
The application features a comprehensive user interface with various screens for mental health tracking and support. Screenshots showing the working application are available in the docs/screenshots directory, demonstrating:
- Dashboard with mood tracking analytics
- AI chat interface for mental health support
- User profile and settings management
- Support network and community features
- Responsive mobile and desktop layouts
- Dark/Light theme variations
These screenshots showcase the user experience across different functionalities of the mental health platform.
- Node.js (v18 or higher)
- MongoDB database
- Redis server
- Google AI API key
- Clone the repository:
git clone https://github.com/L-RexTech/revibe.git
cd revibe- Install dependencies:
npm install
# or
yarn install
# or
pnpm install- Set up environment variables:
Create a
.env.localfile in the root directory and add:
MONGODB_URI=your_mongodb_connection_string
REDIS_URL=your_redis_connection_string
JWT_SECRET=your_jwt_secret
GOOGLE_AI_API_KEY=your_google_ai_api_key
EMAIL_USER=your_email_username
EMAIL_PASS=your_email_password
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000- Run database migrations:
npm run migrate:phone
npm run migrate:defaults
npm run migrate:members
npm run migrate:fixmembers-schema- Start the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev- Open http://localhost:3000 in your browser.
revibe/
โโโ src/
โ โโโ app/ # Next.js app directory
โ โ โโโ (auth)/ # Authentication routes
โ โ โโโ (route)/ # Protected routes
โ โ โโโ api/ # API endpoints
โ โ โโโ layout.tsx # Root layout
โ โโโ components/ # Reusable UI components
โ โโโ lib/ # Utilities and configurations
โโโ database/
โ โโโ migrations/ # Database migration scripts
โโโ scripts/ # Utility scripts
โโโ public/ # Static assets
โโโ assets/ # Application assets
- Next.js 15 - React framework with App Router
- React 18 - UI library
- TypeScript - Type safety
- Tailwind CSS 4 - Utility-first CSS framework
- Framer Motion - Animation library
- next-themes - Theme management
- MongoDB - NoSQL database
- Mongoose - MongoDB object modeling
- Redis - Caching and session storage
- Socket.io - Real-time communication
- JWT - Authentication tokens
- bcrypt - Password hashing
- Google Generative AI - AI-powered conversations
- Recharts - Data visualization
- Nivo - Advanced charts and graphs
- Nodemailer - Email functionality
- dotenv - Environment variables
- ts-node - TypeScript execution
- Daily mood assessments with customizable scales
- Progress visualization with interactive charts
- Trend analysis to identify patterns
- Goal setting and achievement tracking
- 24/7 AI companion for mental health support
- Personalized responses based on user history
- Crisis detection and appropriate resource suggestions
- Natural conversation flow with context awareness
- Connect with verified support members
- Group discussions and peer support
- Resource sharing and wellness tips
- Emergency contact integration
- Comprehensive dashboard with key metrics
- Weekly and monthly progress reports
- Correlation analysis between activities and mood
- Export capabilities for healthcare providers
Test Redis connection:
npm run test:redisRun database migrations:
npm run migrate:phone
npm run migrate:defaults
npm run migrate:members
npm run migrate:fixmembers-schema- Server-Side Rendering: Fast initial page loads
- Static Generation: Pre-built pages for optimal performance
- Image Optimization: Automatic image compression and lazy loading
- Code Splitting: Dynamic imports for reduced bundle size
- Caching Strategy: Redis-based caching for frequently accessed data
- JWT-based authentication with secure token management
- Password hashing using bcrypt
- Input validation and sanitization
- CORS configuration for API security
- Environment variable protection
- Session management with Redis
The application includes comprehensive REST API endpoints for:
- User authentication and management
- Mood tracking and analytics
- AI chat functionality
- Support network features
- Real-time notifications
Fully responsive design optimized for:
- Mobile phones (iOS/Android)
- Tablets
- Desktop browsers
- Progressive Web App (PWA) capabilities
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by L-RexTech team with focus on mental health accessibility and user experience.
For support and questions:
- Create an issue in the GitHub repository
- Contact the development team
- Check the documentation for troubleshooting guides
- Enhanced AI capabilities with more personalized responses
- Integration with wearable devices for biometric tracking
- Expanded support network features
- Mobile app development (React Native)
- Healthcare provider integration
- Multi-language support
- Advanced analytics and insights
Note: This application is designed to supplement, not replace, professional mental health care. Users experiencing crisis situations should contact emergency services or mental health professionals immediately.