NeuroCore - Mental Health Therapy Platform
A comprehensive mental health therapy platform that connects patients with licensed therapists for personalized mental health support. Features AI-powered assessments, real-time chat, progress tracking, and secure payment processing.
Overview
NeuroCore is a comprehensive mental health therapy platform that connects patients with licensed therapists for personalized mental health support. The platform addresses the growing need for accessible mental healthcare by providing a digital solution where patients can take mental health assessments, track their therapy progress, communicate with therapists in real-time, and access personalized treatment plans.
It streamlines the therapy workflow while maintaining professional standards through an admin-approved therapist verification system.
Key Features
For Patients
Mental Health Assessment
- 34-question diagnostic questionnaire covering demographics, social/emotional well-being, behavioral patterns, sleep habits, and mental health history
- AI-powered prediction using external ML API
- Preliminary diagnosis with confidence scores
Therapist Discovery
- Browse and filter approved therapists by specialization
- Detailed therapist profiles with credentials
- Premium subscription for full directory access
Progress Dashboard
- Visual analytics showing daily/weekly therapy metrics
- Task completion rates and treatment category breakdowns
- MUI X-Charts for data visualization
Task Management
- Track assigned therapy tasks with mood logging
- Duration tracking and personal notes
- Completion status monitoring
Real-time Chat
- Secure messaging with therapists
- Group chat support
- Online/offline status indicators
Premium Subscription
- Access to full therapist directory
- Advanced features
- Chapa payment integration ($34.99)
For Therapists
Patient Management
- View assigned patients and their progress
- Monitor therapy task completion
- Access patient assessment results
Treatment Assignment
- Assign therapy tasks from categorized treatment library
- Track patient engagement
- Adjust treatment plans based on progress
Profile Management
- Upload credentials and certifications
- Set specialization areas
- Manage availability
Appointment Scheduling
- Individual and group session management
- ZegoCloud video/audio calling integration
Document Upload
- Secure credential storage
- Bulk download capability for admins
For Administrators
Therapist Approval Workflow
- Review uploaded credentials
- Approve/reject therapist applications
- Download credentials as ZIP archives
User Management
- Oversee all patients and therapists
- Monitor platform activity
- Manage user roles and permissions
Platform Analytics
- System usage monitoring
- User activity tracking
- Platform health metrics
Architecture
The application follows a client-server architecture with clear separation of concerns:
Frontend (React SPA) → REST API (Express.js) → Database (MongoDB)
Frontend: React-based single-page application with Redux for state management, communicating with the backend via Axios HTTP client
Backend: Node.js/Express REST API handling authentication, business logic, and database operations
Database: MongoDB with Mongoose ODM for flexible document storage
Real-time Layer: Socket.io for bidirectional communication between clients and server
External Services: SendGrid for emails, Chapa for payments, external ML API for mental health predictions
Tech Stack
Frontend
- Framework: React 18.2
- State Management: Redux Toolkit with Redux Persist
- Styling: Styled Components, Tailwind CSS, Material-UI, Radix UI
- Forms: React Hook Form with Yup validation
- Real-time: Socket.io Client
- Charts: MUI X-Charts
- Routing: React Router DOM v6
- HTTP Client: Axios
Backend
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT (jsonwebtoken), bcrypt
- Email: SendGrid
- Payment: Chapa Payment Gateway
- File Upload: Multer
- Security: Helmet, express-rate-limit, express-mongo-sanitize, XSS protection
- Real-time: Socket.io
- Utilities: OTP Generator, Archiver (ZIP), date-fns
External Integrations
- SendGrid - Transactional email delivery
- Chapa - Ethiopian payment processing
- External ML API - Mental health prediction model (Flask/Python backend)
- ZegoCloud - Video/audio calling infrastructure
Data Flow
User Registration & Authentication
- User submits registration (patient/therapist) → Backend validates and hashes password
- JWT token generated → Stored in localStorage → Included in subsequent API requests
- Therapist accounts enter "Pending" status → Admin reviews credentials → Approval/rejection
Mental Health Assessment
- Patient completes 34-question assessment → Frontend collects responses
- Form data sent to external ML prediction API (/predict endpoint)
- Prediction result (diagnosis + confidence score) returned → Saved to patient record
- Dashboard updated with diagnosis information
Therapy Workflow
- Patient selects therapist → Relationship created in database
- Therapist assigns treatment tasks → Stored with completion status
- Patient logs completed tasks with mood/duration → Aggregated for analytics
- Dashboard queries aggregate data → Visualized as charts and statistics
Payment Processing
- Patient initiates subscription → Backend creates Chapa transaction
- User redirected to Chapa checkout → Completes payment
- Chapa callback verifies payment → Backend updates PremiumPatient record
- Frontend receives updated subscription status
Real-time Communication
- User connects → Socket.io establishes WebSocket connection
- User status (online/offline) broadcast to connected clients
- Messages sent through socket → Delivered to recipient in real-time
- Connection persists until user disconnects
Notable Implementations
Multi-Role Authentication System
Implements role-based access control with three user types (patient, therapist, admin) using JWT tokens. Each role has distinct routes, permissions, and UI components. Therapists undergo a verification workflow where admins review uploaded credentials before granting platform access.
Mental Health Assessment Engine
A 34-question diagnostic tool covering six categories of mental health indicators. Responses are encoded and sent to an external machine learning API that returns a prediction (e.g., "Depression", "Anxiety", "None") with a confidence score. The system handles edge cases like incomplete responses and API failures gracefully.
Dashboard Analytics
Aggregates patient therapy data using MongoDB aggregation pipelines to calculate daily/weekly metrics, treatment category distributions, and progress trends. Data is visualized using MUI X-Charts with pie charts for category breakdowns and line charts for temporal trends.
Payment Integration
Integrates Chapa payment gateway for Ethiopian Birr (ETB) transactions. Implements secure payment initialization with unique transaction references, callback verification, and automatic subscription activation. Supports both premium ($34.99) and free tier subscriptions.
Document Management System
Therapists upload multiple credential documents (licenses, certifications) with file validation. Admins can download all documents as a ZIP archive for review. Uses Multer for multipart form handling and Archiver for ZIP generation.
Real-time Status Tracking
Socket.io implementation tracks user online/offline status with socket ID mapping. Supports presence indicators and lays groundwork for real-time messaging (infrastructure present, partially implemented).
Security Hardening
Implements multiple security layers:
- JWT token verification middleware
- bcrypt password hashing (10 salt rounds)
- Rate limiting (3000 req/hour)
- MongoDB injection prevention
- XSS sanitization
- Helmet for HTTP header security
Use Case
Target Users
Individuals seeking mental health support in Ethiopia and therapists offering remote counseling services.
Real-World Application
- A patient experiencing anxiety takes the assessment and receives a preliminary diagnosis
- They browse approved therapists, filtering by specialization (e.g., anxiety disorders)
- After selecting a therapist, they receive personalized treatment tasks (meditation, journaling, CBT exercises)
- They log completed tasks daily, tracking mood and progress over time
- They communicate with their therapist via real-time chat for guidance
- The therapist monitors progress through the dashboard and adjusts treatment plans accordingly
- Patients can upgrade to premium for access to more therapists and advanced features
The platform bridges the gap between patients and mental health professionals, making therapy more accessible, trackable, and data-driven while maintaining clinical standards through the admin approval process.
Project Status
The platform is production-ready with core features implemented. The ML prediction API and video calling features are integrated but may require additional configuration. The codebase demonstrates full-stack development proficiency with modern web technologies, secure authentication patterns, payment processing, real-time communication, and data visualization.
This project showcases expertise in healthcare technology, secure multi-role systems, payment integration, and real-time communication suitable for production mental health applications.
