Skip to content
PrashantDevXPublic

About

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

72 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

React Vite TailwindCSS Node.js MongoDB

🧠 MindCure

A Comprehensive Mental Health & Wellness Platform for Students

Empowering students with AI-powered therapy, mood tracking, peer support, and professional counseling β€” all in one place.

Features β€’ Tech Stack β€’ Getting Started β€’ Screenshots β€’ API β€’ Contributing


πŸ“Έ Screenshots

dashboard mindcure

Beautiful, intuitive dashboard with mood tracking, appointments, and quick access to all features


✨ Features

πŸ€– AI-Powered Therapy Chat

  • 24/7 Support: Google Gemini-powered mental health chatbot available anytime
  • Crisis Detection: Intelligent detection of distressing content with immediate resources
  • Empathetic Responses: Trained to provide compassionate, helpful support
  • Conversation History: Review past conversations for reflection

πŸ“Š Mood Tracking & Analytics

  • Daily Check-ins: Log your mood with a simple, beautiful interface
  • Emotion Tagging: Track specific emotions and triggers
  • Visual Progress: Beautiful charts showing mood patterns over time
  • Insights: AI-generated insights about your mental health journey

πŸ‘₯ Support Circle (Social Features)

  • Friend System: Connect with classmates and peers who care
  • Real-time Messaging: Private chat with friends in your support circle
  • User Profiles: View friends' profiles and track their wellness journey
  • Friend Requests: Send and receive friend requests with notifications

πŸ† Gamification & Achievements

  • XP System: Earn experience points for healthy habits
  • Badges: Unlock achievements like "First Check-in", "Week Streak", "Mood Helper"
  • Progress Tracking: Visual progress toward next achievements
  • Engagement Rewards: Stay motivated with gamified wellness activities

πŸ“… Counselor Appointments

  • Book Sessions: Schedule appointments with professional counselors
  • Available Slots: View counselor availability in real-time
  • Appointment Management: View, reschedule, or cancel appointments
  • Video Integration: Seamless video calling for virtual sessions

πŸ“š Self-Help Resources

  • Guided Exercises: Breathing exercises, meditation, and mindfulness
  • Educational Content: Articles and videos on mental health topics
  • Coping Strategies: Evidence-based techniques for managing stress
  • Emergency Resources: Quick access to crisis hotlines

🚨 Crisis Intervention

  • Crisis Detection: AI monitors for emergency situations
  • Immediate Resources: One-tap access to helplines
  • Safety Planning: Tools to create personalized safety plans
  • Professional Referrals: Guidance to seek professional help

πŸ‘¨β€πŸ’Ό Role-Based Dashboards

  • Student Dashboard: Full access to all wellness features
  • Counselor Dashboard: Manage appointments, view student progress
  • Admin Dashboard: User management, analytics, system oversight

πŸ”” Smart Notifications

  • Friend Activity: Get notified when friends need support
  • Appointment Reminders: Never miss a counseling session
  • Achievement Alerts: Celebrate when you unlock new badges
  • Check-in Reminders: Gentle nudges to log your mood

πŸ› οΈ Tech Stack

Frontend

Technology Purpose
React UI Framework
Vite Build Tool & Dev Server
TailwindCSS Styling
React Router Navigation
Lucide Icons
Recharts Data Visualization

Backend

Technology Purpose
Node.js Runtime
Express API Framework
MongoDB Database
Mongoose ODM
JWT Authentication

AI & APIs

Technology Purpose
Google AI Chat & Analysis

Deployment

Platform Service
Vercel Frontend Hosting
Render Backend API
MongoDB Atlas Cloud Database

πŸš€ Getting Started

Prerequisites

# Required
Node.js 18+ 
npm or yarn

# Optional (for AI features)
Google Gemini API Key

Installation

# 1. Clone the repository
git clone https://github.com/Lullucoder/MindCure.git
cd MindCure

# 2. Install frontend dependencies
npm install

# 3. Install backend dependencies
cd server
npm install
cd ..

# 4. Set up environment variables
cp .env.example .env
# Edit .env with your configuration

Environment Variables

Frontend (.env)

VITE_API_URL=http://localhost:5000/api
VITE_GEMINI_API_KEY=your_gemini_api_key

Backend (server/.env)

PORT=5000
MONGODB_URI=mongodb+srv://your_connection_string
JWT_SECRET=your_jwt_secret
NODE_ENV=development

Running the Application

# Terminal 1: Start the backend server
cd server
npm run dev

# Terminal 2: Start the frontend
npm run dev

Open your browser and navigate to http://localhost:5173


πŸ“ Project Structure

MindCure/
β”œβ”€β”€ πŸ“‚ src/                    # Frontend source code
β”‚   β”œβ”€β”€ πŸ“‚ components/         # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ auth/          # Authentication components
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ chat/          # AI Chat interface
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ community/     # Forum & community features
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ layout/        # Layout components (Navbar, Footer)
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ mood/          # Mood tracking components
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ social/        # Friends, Messages, Achievements
β”‚   β”‚   └── πŸ“‚ ui/            # Base UI components
β”‚   β”œβ”€β”€ πŸ“‚ context/           # React Context providers
β”‚   β”œβ”€β”€ πŸ“‚ hooks/             # Custom React hooks
β”‚   β”œβ”€β”€ πŸ“‚ pages/             # Page components
β”‚   β”œβ”€β”€ πŸ“‚ services/          # API service functions
β”‚   └── πŸ“‚ utils/             # Utility functions
β”œβ”€β”€ πŸ“‚ server/                 # Backend source code
β”‚   └── πŸ“‚ src/
β”‚       β”œβ”€β”€ πŸ“‚ config/        # Configuration files
β”‚       β”œβ”€β”€ πŸ“‚ controllers/   # Route controllers
β”‚       β”œβ”€β”€ πŸ“‚ middleware/    # Express middleware
β”‚       β”œβ”€β”€ πŸ“‚ models/        # Mongoose models
β”‚       β”œβ”€β”€ πŸ“‚ routes/        # API routes
β”‚       └── πŸ“„ index.js       # Server entry point
β”œβ”€β”€ πŸ“‚ public/                 # Static assets
└── πŸ“„ package.json           # Dependencies

🎨 Design System

Color Palette

Color Hex Usage
πŸ”΅ Primary #0ea5e9 Main actions, links, branding
🟣 Accent #8b5cf6 Highlights, special elements
🟒 Success #22c55e Positive feedback, completed states
🟑 Warning #f59e0b Warnings, pending states
πŸ”΄ Danger #ef4444 Errors, crisis situations
βšͺ Neutral #64748b Secondary text, borders

Typography

  • Headings: Bold, Modern styling
  • Body: Clean, Readable fonts
  • Responsive: Scales beautifully across devices

πŸ“± Responsive Design

MindCure is fully responsive and optimized for all devices:

Device Features
πŸ“± Mobile Bottom navigation, touch-friendly controls, hamburger menu
πŸ“± Tablet Optimized layouts, touch interface
πŸ’» Desktop Full-featured experience with expanded navigation

πŸ”Œ API Documentation

Authentication Endpoints

POST   /api/auth/register     # Register new user
POST   /api/auth/login        # Login user
GET    /api/auth/me           # Get current user

Mood Tracking

GET    /api/mood              # Get mood entries
POST   /api/mood              # Create mood entry
GET    /api/mood/stats        # Get mood statistics

Friends & Social

GET    /api/friends           # Get friends list
POST   /api/friends/request   # Send friend request
PUT    /api/friends/:id       # Accept/reject request

Messages

GET    /api/messages/conversations  # Get conversations
POST   /api/messages               # Send message
GET    /api/messages/:conversationId # Get messages

Achievements

GET    /api/achievements       # Get user achievements

πŸ”’ Security & Privacy

  • πŸ” JWT Authentication: Secure token-based auth
  • πŸ”’ Password Hashing: bcrypt encryption
  • πŸ›‘οΈ CORS Protection: Configured for production domains
  • πŸ“ Input Validation: Server-side validation with Zod
  • 🚫 Rate Limiting: API rate limiting to prevent abuse
  • πŸ” Privacy First: Minimal data collection

πŸ†˜ Crisis Support

Emergency Contacts (India)

Service Number Description
πŸ“ž Tele-MANAS 14416 National Mental Health Helpline
πŸš‘ Emergency 112 Police/Fire/Ambulance
πŸ’š KIRAN Helpline 1800-599-0019 24/7 Mental Health Support
πŸ‘© Women Helpline 181 Women in distress
πŸ‘Ά CHILDLINE 1098 Child protection

πŸ§ͺ Testing

# Run unit tests
npm run test

# Run with coverage
npm run test:coverage

# Run e2e tests
npm run test:e2e

πŸš€ Deployment

Frontend (Vercel)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel --prod

Backend (Render)

  1. Connect your GitHub repository to Render
  2. Set environment variables in Render dashboard
  3. Deploy automatically on push to main

Live API: https://mindcure-api.onrender.com


🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Commit your changes
    git commit -m 'Add amazing feature'
  4. Push to the branch
    git push origin feature/amazing-feature
  5. Open a Pull Request

Code Style

  • Use ESLint configuration provided
  • Follow React best practices
  • Write meaningful commit messages
  • Add tests for new features

πŸ“„ License

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


⚠️ Disclaimer

Important: This platform provides mental health support but is not a substitute for professional medical care. If you're experiencing a mental health emergency, please contact:

  • Tele-MANAS: 14416
  • Emergency Services: 112

πŸ’™ Acknowledgments

  • Google Gemini for AI capabilities
  • The open-source community for amazing tools
  • Mental health professionals who provided guidance
  • All contributors and testers

Made with πŸ’™ for Student Mental Health

⬆️ Back to Top

About

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages