Skip to main content

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.

  • Full Stack Development
  • Healthcare Platform Design
  • Real-Time Communication
  • Payment Integration

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

  1. User submits registration (patient/therapist) → Backend validates and hashes password
  2. JWT token generated → Stored in localStorage → Included in subsequent API requests
  3. Therapist accounts enter "Pending" status → Admin reviews credentials → Approval/rejection

Mental Health Assessment

  1. Patient completes 34-question assessment → Frontend collects responses
  2. Form data sent to external ML prediction API (/predict endpoint)
  3. Prediction result (diagnosis + confidence score) returned → Saved to patient record
  4. Dashboard updated with diagnosis information

Therapy Workflow

  1. Patient selects therapist → Relationship created in database
  2. Therapist assigns treatment tasks → Stored with completion status
  3. Patient logs completed tasks with mood/duration → Aggregated for analytics
  4. Dashboard queries aggregate data → Visualized as charts and statistics

Payment Processing

  1. Patient initiates subscription → Backend creates Chapa transaction
  2. User redirected to Chapa checkout → Completes payment
  3. Chapa callback verifies payment → Backend updates PremiumPatient record
  4. Frontend receives updated subscription status

Real-time Communication

  1. User connects → Socket.io establishes WebSocket connection
  2. User status (online/offline) broadcast to connected clients
  3. Messages sent through socket → Delivered to recipient in real-time
  4. 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

  1. A patient experiencing anxiety takes the assessment and receives a preliminary diagnosis
  2. They browse approved therapists, filtering by specialization (e.g., anxiety disorders)
  3. After selecting a therapist, they receive personalized treatment tasks (meditation, journaling, CBT exercises)
  4. They log completed tasks daily, tracking mood and progress over time
  5. They communicate with their therapist via real-time chat for guidance
  6. The therapist monitors progress through the dashboard and adjusts treatment plans accordingly
  7. 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.