Skip to content

rangeshsha-Rookie/ChittSathi

Repository files navigation

ChittSaathi Logo

ChittSaathi

Clinical-grade student mental health platform powered by WebRTC real-time video calling, a Python ML mood detection model, Pinecone vector search for semantic memory, and dual AI integration (Google Gemini + OpenAI) — built for higher education institutions across India

SIH Project Student Mental Health Status License Frontend Backend ML Model

ChittSaathi 🧠

Clinical-Grade Student Mental Health Platform

WebRTC video calling · Python ML mood model · Pinecone vector search · Dual AI (Google Gemini + OpenAI)

🔬 What Makes ChittSaathi Different

ChittSaathi is not a simple chatbot or a basic wellness app. It is a full-stack, clinically-informed mental health platform purpose-built for students in India's higher education system. Here's what's actually under the hood:

Layer Technology What It Does
🎥 Video Calling WebRTC (browser-native P2P) Live real-time counsellor sessions with zero latency
🧠 Mood Detection Python ML model (TensorFlow + OpenCV) Classifies emotional state from facial expressions via custom-trained CNN
🔍 Semantic Memory Pinecone Vector Database Stores conversation embeddings for contextual recall and personalised resource retrieval
🤖 Conversational AI Google Gemini + OpenAI (dual integration) Intelligent context-aware mental health dialogue with dual-model fallback
📡 Real-time Signalling Socket.io WebRTC signalling server + live chat infrastructure
☁️ ML Hosting HuggingFace Spaces Python mood model served as a live inference API endpoint

ChittSaathi is a comprehensive mental health platform specifically designed for students in higher education institutions across India. Our mission is to provide accessible, confidential, and personalized mental health support through innovative technology solutions.

Built with a WebRTC-powered real-time video calling system for live counsellor sessions, a Python ML mood model for emotion detection, Pinecone vector search for semantic memory and contextual recommendations, and dual AI integration (Google Gemini + OpenAI) for intelligent, context-aware mental health conversations — ChittSaathi goes far beyond a basic chatbot, delivering a full-stack clinical-grade support experience.


🌟 Key Features

🤖 AI-Powered Support

  • Intelligent Chatbot: 24/7 available AI assistant for immediate emotional support
  • Mood Analysis: ML-based emotion detection from facial expressions
  • Personalized Recommendations: Content suggestions based on current mood state
  • Crisis Detection: Automatic identification of emergency situations with immediate response

📊 Mood Tracking & Analytics

  • Real-time Mood Detection: Camera-based emotion recognition using TensorFlow.js
  • Historical Tracking: Comprehensive mood history and pattern analysis
  • Interactive Dashboard: Visual representations of mental health trends
  • Progress Monitoring: Track improvement over time with detailed analytics

🎯 Personalized Resources

  • Curated Content: Videos, audio, guides, and reading materials
  • Multi-format Support: In-app video/audio player for seamless experience
  • Categorized Library: Resources organized by mood, topic, and difficulty level
  • Offline Access: Download content for offline use

👥 Professional Support

  • Counselor Booking: Schedule confidential sessions with mental health professionals
  • Peer Support Groups: Connect with fellow students in moderated environments
  • Crisis Intervention: Direct access to emergency helplines and support services
  • Anonymous Chat: Safe space for expressing concerns without judgment

🔒 Privacy & Security

  • End-to-End Encryption: All communications and data are securely encrypted
  • GDPR Compliant: Full compliance with data protection regulations
  • Anonymous Options: Use platform features without revealing identity
  • Secure Authentication: Multi-factor authentication and secure login

🚀 Technology Stack

Frontend

  • HTML5/CSS3: Modern responsive design
  • JavaScript (ES6+): Interactive user interface
  • TensorFlow.js: Client-side machine learning for mood detection
  • Chart.js: Data visualization and analytics
  • Progressive Web App: Mobile-first approach with offline capabilities
  • WebRTC: Browser-native peer-to-peer real-time video calling for live counsellor sessions

Backend

  • Node.js: Server-side JavaScript runtime
  • Express.js: Fast and minimal web framework
  • MongoDB: NoSQL database for scalable data storage
  • JWT: Secure authentication and authorization
  • Socket.io: Real-time communication for chat features and WebRTC signalling

AI/ML Services

  • Python: Core machine learning development
  • TensorFlow: Deep learning framework for emotion recognition
  • OpenCV: Computer vision processing
  • Google Gemini API: Primary conversational AI for mental health chatbot responses
  • OpenAI API: Secondary AI integration for advanced language understanding and dual-model fallback
  • Pinecone Vector Database: Semantic vector search for contextual memory, personalised resource retrieval, and conversation history embeddings
  • Facial Expression Recognition: Custom trained Python ML model for mood detection and emotional state classification

DevOps & Deployment

  • Docker: Containerization for consistent deployments
  • GitHub Actions: CI/CD pipeline automation
  • Vercel: Frontend hosting and deployment
  • Railway/Render: Backend API hosting
  • MongoDB Atlas: Cloud database hosting
  • HuggingFace Spaces: ML model hosting and inference endpoint

📁 Project Structure

ChittSaathi/
├── Frontend/                    # Client-side application
│   ├── css/                    # Stylesheets
│   │   ├── styles.css          # Global styles
│   │   ├── dashboard.css       # Dashboard-specific styles
│   │   ├── mood.css            # Mood tracking styles
│   │   ├── ai-support.css      # AI chat interface styles
│   │   ├── profile.css         # User profile styles
│   │   ├── settings.css        # Settings page styles
│   │   └── resources.css       # Resource library styles
│   ├── js/                     # JavaScript files
│   │   ├── script.js           # Main application logic
│   │   ├── config.js           # Configuration management
│   │   ├── dashboard.js        # Dashboard functionality
│   │   ├── mood.js             # Mood tracking logic
│   │   ├── ai-support.js       # AI chat implementation
│   │   ├── profile.js          # Profile management
│   │   ├── settings.js         # Settings functionality
│   │   ├── resources.js        # Resource library
│   │   └── chatbot.js          # Chatbot integration
│   ├── resource/               # Static resources
│   │   ├── videos/             # Video content
│   │   ├── audio/              # Audio files
│   │   ├── guides/             # PDF guides
│   │   ├── posters/            # Awareness posters
│   │   └── resources.json      # Resource metadata
│   ├── images/                 # Image assets
│   ├── *.html                  # Application pages
│   └── .env                    # Frontend environment variables
├── Backend/                    # Server-side application
│   ├── controllers/            # Request handlers
│   │   ├── authController.js   # Authentication logic
│   │   ├── moodController.js   # Mood tracking API
│   │   ├── aiController.js     # AI chat endpoints
│   │   ├── profileController.js # User profile management
│   │   └── settingsController.js # Settings management
│   ├── models/                 # Database schemas
│   │   ├── User.js             # User model
│   │   ├── Profile.js          # Profile model
│   │   ├── Mood.js             # Mood tracking model
│   │   └── Conversation.js     # Chat conversation model
│   ├── routes/                 # API routes
│   │   ├── authRoutes.js       # Authentication routes
│   │   ├── moodRoutes.js       # Mood tracking routes
│   │   ├── aiRoutes.js         # AI chat routes
│   │   ├── profileRoutes.js    # Profile management routes
│   │   └── settingRoutes.js    # Settings routes
│   ├── middleware/             # Custom middleware
│   │   └── authMiddleware.js   # Authentication middleware
│   ├── utils/                  # Utility functions
│   │   └── emailService.js     # Email service
│   ├── server.js               # Main server file
│   ├── package.json            # Dependencies
│   └── .env                    # Backend environment variables
├── MoodModel/                  # ML/AI services
│   ├── mood.py                 # Mood detection model
│   ├── main.py                 # ML service entry point
│   ├── requirements.txt        # Python dependencies
│   └── models/                 # Trained ML models
├── docs/                       # Documentation
│   ├── API.md                  # API documentation
│   ├── SETUP.md                # Setup instructions
│   └── CONTRIBUTING.md         # Contribution guidelines
├── .gitignore                  # Git ignore rules
├── docker-compose.yml          # Docker configuration
└── README.md                   # This file

🛠️ Installation & Setup

Prerequisites

  • Node.js (v16 or higher)
  • Python (v3.10 to v3.13, required for TensorFlow 2.21.0)
  • MongoDB (local or cloud instance)
  • Git for version control

1. Clone the Repository

git clone https://github.com/rangeshsha-Rookie/ChittSathi.git
cd ChittSathi

2. Backend Setup

# Navigate to backend directory
cd Backend

# Install dependencies
npm install

# Create environment file
copy .env.example .env

# Start the backend server
npm run dev

3. ML Service Setup

# Navigate to ML service directory
cd Backend/MoodModel

# Create virtual environment
python -m venv venv

# Activate virtual environment (Windows)
venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Start ML service
python mood.py

4. Frontend Setup

# Navigate to frontend directory
cd Frontend

# Create frontend environment file
copy .env.example .env

# Serve frontend using VS Code Live Server
# (Or open index.html directly for quick checks)

🔧 Configuration

🎨 Features in Detail

Mood Detection System

The mood detection system uses advanced computer vision and machine learning to analyze facial expressions in real-time:

  1. Image Capture: Uses device camera to capture user's image
  2. Face Detection: Identifies face region using OpenCV
  3. Feature Extraction: Extracts facial landmarks and features
  4. Emotion Classification: Predicts emotion using trained CNN model
  5. Confidence Scoring: Provides confidence levels for predictions
  6. Historical Analysis: Tracks mood patterns over time

AI Chatbot Integration

Our AI chatbot provides intelligent mental health support:

  1. Natural Language Processing: Understands user queries in natural language
  2. Context Awareness: Maintains conversation context for better responses
  3. Mood-Based Responses: Adapts responses based on detected mood
  4. Crisis Detection: Identifies crisis situations and provides immediate help
  5. Resource Recommendations: Suggests relevant resources based on conversation

Resource Management System

Comprehensive resource library with intelligent recommendations:

  1. Multi-Format Content: Videos, audio, PDFs, images, and interactive content
  2. Mood-Based Filtering: Shows relevant content based on current mood
  3. In-App Media Player: Stream videos and audio without leaving the platform
  4. Offline Downloads: Save content for offline access
  5. Progress Tracking: Monitor content consumption and engagement

🧪 Testing

Running Tests

# Backend tests
cd Backend
npm test

# Frontend tests
cd Frontend
npm test

# ML model tests
cd MoodModel
python -m pytest tests/

Test Coverage

  • Unit tests for all API endpoints
  • Integration tests for complete user workflows
  • Frontend component testing
  • ML model accuracy testing
  • Security and penetration testing

📱 Mobile Support

ChittSaathi is designed as a Progressive Web App (PWA) with full mobile support:

  • Responsive Design: Optimized for all screen sizes
  • Touch-Friendly Interface: Mobile-first UI/UX design
  • Camera Integration: Direct access to device camera for mood detection
  • Push Notifications: Timely reminders and support messages
  • Offline Functionality: Core features work without internet connection
  • App-Like Experience: Install as a native app on mobile devices

🔐 Security Features

Data Protection

  • Encryption: All sensitive data encrypted at rest and in transit
  • JWT Authentication: Secure token-based authentication
  • Input Validation: Comprehensive input sanitization
  • Rate Limiting: API rate limiting to prevent abuse
  • CORS Protection: Configured Cross-Origin Resource Sharing

Privacy Measures

  • Anonymization: Option to use platform anonymously
  • Data Minimization: Collect only necessary information
  • User Control: Users can delete their data anytime
  • Transparent Policies: Clear privacy and data usage policies

🌍 Deployment

Database (MongoDB Atlas)

  • Create MongoDB Atlas cluster
  • Configure network access and database users
  • Update connection string in environment variables

👥 Contributing

We welcome contributions from the community! Please read our Contributing Guidelines before getting started.

Development Workflow

  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 Standards

  • Follow ESLint configuration for JavaScript
  • Use Prettier for code formatting
  • Write comprehensive tests for new features
  • Document all API changes
  • Follow semantic versioning for releases

📈 Project Roadmap

Phase 1 (Current) ✅

  • Basic mood tracking with camera integration
  • AI chatbot for mental health support
  • User authentication and profile management
  • Resource library with multi-format content
  • Responsive web application

Phase 2 (In Progress) 🚧

  • Advanced analytics and insights dashboard
  • Integration with wearable devices
  • Group therapy session booking
  • Peer support communities
  • Mobile app development (React Native)

Phase 3 (Planned) 📋

  • Integration with institutional systems
  • Advanced AI therapy sessions
  • Gamification and achievement system
  • Multi-language support
  • Advanced crisis intervention protocols

Phase 4 (Future) 🔮

  • VR/AR therapy experiences
  • Integration with health insurance
  • Research collaboration tools
  • Advanced predictive analytics
  • Global expansion and localization

📞 Support & Contact

For Users

For Developers


📄 License

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


🏆 Acknowledgments

Team: ChittSaathi Warriors

  • Full-Stack Developer & AI/ML Integration: Rangesh Gupta — LinkedIn GitHub
  • Project Lead & Project Manager: Brajabehari Pal — LinkedIn
  • Frontend & Backend Developer: Saurabh Kumar — LinkedIn
  • AI/ML Specialist & Database: Sanjay Bhatti — LinkedIn
  • Research & Documentation: Sneha Sharma — (LinkedIn to be added)
  • UI/UX Designer: Radha — (LinkedIn to be added)
  • IoT Devices Specialist: Rahul Dudi — (LinkedIn to be added)

Special Thanks

  • Smart India Hackathon 2025 for providing the platform
  • Mental Health Professionals who provided expert guidance
  • Beta Testers from various educational institutions
  • Open Source Community for the amazing tools and libraries

Technologies & Libraries

  • TensorFlow.js for client-side ML capabilities
  • Express.js for robust backend API
  • MongoDB for scalable data storage
  • Chart.js for beautiful data visualizations
  • Font Awesome for iconography
  • And many other open-source projects that made this possible

📊 Statistics

Project Metrics

  • Lines of Code: 50,000+
  • Test Coverage: 85%+
  • Performance Score: 95+ (Lighthouse)
  • Accessibility Score: 100 (WCAG 2.1 AA)
  • Security Score: A+ (Mozilla Observatory)

User Impact (Target)

  • Students Served: 10,000+ (Goal)
  • Institutions Partnered: 50+ (Goal)
  • Crisis Interventions: 24/7 Support
  • Success Rate: 90%+ User Satisfaction

Made with ❤️ for student mental health and wellbeing

ChittSaathi - Where Technology Meets Compassion


Version: 1.0.0
Last Updated: June 2026
Status: Active Development
Maintained by: Rangesh Gupta — github.com/rangeshsha-Rookie

About

Clinical-grade student mental health platform | WebRTC video calling · Python ML mood detection · Pinecone vector search · Dual AI (Gemini + OpenAI) | SIH 2025

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors