Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PsyMitrix is an AI-driven mental health companion that analyzes emotions, delivers personalized support, and helps users track and improve their well-being.

License

Notifications You must be signed in to change notification settings

Matrixxboy/Psymitrix

Repository files navigation

๐Ÿง  PsyMitrix - AI Mental Health Companion

PsyMitrix Logo

React Vite Tailwind CSS License

Your personalized AI-powered mental health companion providing support through conversations, assessments, and wellness activities

๐Ÿš€ Live Demo โ€ข ๐Ÿ“– Documentation โ€ข ๐Ÿ› ๏ธ Installation โ€ข ๐Ÿค Contributing


๐Ÿ“‹ Table of Contents


๐ŸŒŸ About The Project

PsyMitrix is an innovative AI-powered mental health companion designed to provide accessible, personalized mental health support. Built as a comprehensive frontend demonstration, it showcases modern web technologies while addressing the critical need for mental health resources.

๐ŸŽฏ Mission

To democratize mental health support through AI-powered conversations, evidence-based assessments, and interactive wellness activities, making mental health care more accessible and less stigmatized.

๐Ÿ” What Makes PsyMitrix Special

mindmap
 root((PsyMitrix))
 AI Chat
 Sentiment Analysis
 Contextual Responses
 24/7 Availability
 Assessments
 PHQ-9 Depression
 GAD-7 Anxiety
 Progress Tracking
 Wellness
 Breathing Exercises
 Mood Journaling
 Gratitude Practice
 Analytics
 Progress Dashboard
 Mental Health Metrics
 Session History
Loading

โœจ Features

๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ Core Features

Feature Description Status
๐Ÿค– AI Psychiatrist Chat Interactive conversations with sentiment analysis and contextual responses โœ… Active
๐Ÿ“Š Mental Health Assessments Standardized PHQ-9 and GAD-7 assessments with scoring โœ… Active
๐ŸŽฎ Wellness Games Interactive breathing exercises, mood tracking, and gratitude practices โœ… Active
๐Ÿ“ˆ Progress Dashboard Comprehensive analytics and progress tracking โœ… Active
๐Ÿ” User Authentication Secure login/logout with session management โœ… Active
๐ŸŒ™ Dark/Light Theme Responsive theme switching with persistence โœ… Active
๐Ÿ“ฑ Responsive Design Optimized for desktop, tablet, and mobile devices โœ… Active

๐ŸŽฏ Detailed Feature Breakdown

๐Ÿค– AI Chat System

  • Sentiment Analysis: Real-time emotion detection from user messages
  • Contextual Responses: Tailored responses based on anxiety, depression, or positive sentiment
  • Session Persistence: Chat history maintained throughout user session
  • Typing Indicators: Realistic AI typing simulation for enhanced UX

๐Ÿ“Š Mental Health Assessments

  • PHQ-9 (Depression): 9-question standardized depression screening
  • GAD-7 (Anxiety): 7-question generalized anxiety disorder assessment
  • Automated Scoring: Real-time calculation with severity interpretation
  • Progress Tracking: Historical assessment results and trend analysis

๐ŸŽฎ Interactive Wellness Games

  • Breathing Exercise: Guided 4-4-6 breathing pattern with visual cues
  • Mood Journal: Daily mood tracking with notes and patterns
  • Gratitude Practice: Structured gratitude exercises for positive psychology

๐Ÿ† Advantages

๐Ÿš€ Technical Advantages

Advantage Description Impact
โšก Lightning Fast Vite-powered development with instant HMR ๐Ÿ”ฅ High Performance
๐ŸŽจ Modern UI/UX Tailwind CSS with custom design system ๐Ÿ’Ž Professional Look
๐Ÿ“ฑ Mobile-First Responsive design across all devices ๐Ÿ“ˆ Better Accessibility
๐Ÿ”’ Type Safety JavaScript with prop validation ๐Ÿ›ก๏ธ Fewer Bugs
๐ŸŒ™ Theme Support Built-in dark/light mode switching ๐Ÿ‘ค Better UX
๐Ÿ”ง Modular Architecture Component-based structure for scalability ๐Ÿ—๏ธ Maintainable Code

๐Ÿ’ก Business Advantages

graph TD
 A[PsyMitrix Advantages] --> B[Accessibility]
 A --> C[Cost-Effective]
 A --> D[Scalability]
 A --> E[Privacy]
 
 B --> B1[24/7 Availability]
 B --> B2[No Geographic Limits]
 B --> B3[Multiple Languages Ready]
 
 C --> C1[No Therapist Costs]
 C --> C2[Reduced Healthcare Burden]
 C --> C3[Preventive Care]
 
 D --> D1[Unlimited Users]
 D --> D2[Easy Deployment]
 D --> D3[Cloud-Ready]
 
 E --> E1[Anonymous Support]
 E --> E2[Confidential Sessions]
 E --> E3[No Judgment Zone]
Loading

๐Ÿ› ๏ธ Tech Stack

Frontend Technologies

Technology Version Purpose Why Chosen
โš›๏ธ React 18.2.0 UI Framework Component reusability, Virtual DOM, Large ecosystem
โšก Vite 5.0.8 Build Tool Lightning-fast HMR, optimized builds, ES modules
๐ŸŽจ Tailwind CSS 3.3.6 Styling Utility-first, responsive design, small bundle size
๐Ÿ›ฃ๏ธ React Router 6.8.0 Navigation SPA routing, protected routes, clean URLs
๐Ÿ”ง ESLint 8.55.0 Code Quality Consistent code style, error prevention

Development Tools

graph LR
 A[Development] --> B[Code Quality]
 A --> C[Build Process]
 A --> D[Styling]
 
 B --> B1[ESLint]
 B --> B2[React Hooks Rules]
 B --> B3[React Refresh]
 
 C --> C1[Vite]
 C --> C2[PostCSS]
 C --> C3[Autoprefixer]
 
 D --> D1[Tailwind CSS]
 D --> D2[Dark Mode]
 D --> D3[Custom Themes]
Loading

๐Ÿ—๏ธ Architecture

System Architecture

graph TB
 subgraph "Frontend Layer"
 A[React App] --> B[React Router]
 B --> C[Protected Routes]
 B --> D[Public Routes]
 end
 
 subgraph "State Management"
 E[Context Providers] --> F[Auth Provider]
 E --> G[Theme Provider]
 end
 
 subgraph "UI Components"
 H[Pages] --> I[Dashboard]
 H --> J[Chat]
 H --> K[Assessments]
 H --> L[Games]
 M[Shared Components] --> N[Button]
 M --> O[Input]
 M --> P[Assessment]
 end
 
 subgraph "Data Layer"
 Q[Mock APIs] --> R[Auth API]
 Q --> S[Sessions API]
 Q --> T[Products API]
 end
 
 A --> E
 A --> H
 A --> M
 H --> Q
Loading

Component Hierarchy

graph TD
 A[App.jsx] --> B[ThemeProvider]
 B --> C[AuthProvider]
 C --> D[BrowserRouter]
 D --> E[AppRoutes]
 
 E --> F[Protected Routes]
 E --> G[Public Routes]
 
 F --> H[Dashboard]
 F --> I[Chat]
 F --> J[Assessments]
 F --> K[Games]
 F --> L[Profile]
 F --> M[Progress]
 
 G --> N[Login]
 G --> O[Home]
 
 style A fill:#e1f5fe
 style B fill:#f3e5f5
 style C fill:#e8f5e8
Loading

๐Ÿš€ Installation

Prerequisites

Before you begin, ensure you have the following installed:

Requirement Version Download Link
๐Ÿ“ฆ Node.js โ‰ฅ 16.0.0 nodejs.org
๐Ÿ“‹ npm โ‰ฅ 8.0.0 Included with Node.js
๐Ÿ’ป Git Latest git-scm.com

Quick Start

# 1๏ธโƒฃ Clone the repository
git clone https://github.com/your-username/psymitrix.git
cd psymitrix
# 2๏ธโƒฃ Install dependencies
npm install
# 3๏ธโƒฃ Start development server
npm run dev
# 4๏ธโƒฃ Open your browser
# Navigate to http://localhost:5173

Available Scripts

Command Description Usage
npm run dev Start development server with HMR Development
npm run build Build for production Deployment
npm run preview Preview production build Testing
npm run lint Run ESLint code analysis Code Quality

Environment Setup

Create a .env file in the root directory (optional for demo):

# Development Configuration
VITE_APP_NAME=PsyMitrix
VITE_APP_VERSION=1.0.0
# API Configuration (for future backend integration)
VITE_API_BASE_URL=https://api.psymitrix.com
VITE_AI_API_KEY=your_ai_api_key_here

๐Ÿ’ป Usage

๐Ÿ” Authentication

Demo Credentials:

  • Email: utsav@example.com
  • Password: password

๐ŸŽฎ Feature Walkthrough

1. ๐Ÿ  Dashboard

  • View mental health metrics
  • Track recent sessions
  • Quick access to all features

2. ๐Ÿค– AI Chat

// Example interaction flow
User: "I'm feeling anxious about my presentation tomorrow"
AI: "I understand you're feeling anxious. That's completely valid. 
 Can you tell me what specifically is causing these anxious feelings?"

3. ๐Ÿ“Š Mental Health Assessments

sequenceDiagram
 participant U as User
 participant A as Assessment
 participant S as Scoring
 participant R as Results
 
 U->>A: Select PHQ-9/GAD-7
 A->>U: Present questions
 U->>A: Answer questions
 A->>S: Submit responses
 S->>R: Calculate score
 R->>U: Show results & recommendations
Loading

4. ๐ŸŽฎ Wellness Games

  • Breathing Exercise: 4-count inhale, 4-count hold, 6-count exhale
  • Mood Journal: Track daily mood with notes
  • Gratitude Practice: Structured gratitude exercises

๐Ÿ“ Project Structure

psymitrix/
โ”œโ”€๏ฟฝ๏ฟฝ๏ฟฝ ๐Ÿ“ public/ # Static assets
โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ api/ # Mock API services
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ auth.js # Authentication API
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ sessions.js # Session management
โ”‚ โ”‚ โ””โ”€โ”€ ๐Ÿ“„ index.js # API exports
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ components/ # Reusable components
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“ assessments/ # Assessment components
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“ custom/ # Custom components
โ”‚ โ”‚ โ””โ”€โ”€ ๐Ÿ“ ui/ # UI primitives
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ features/ # Feature modules
โ”‚ โ”‚ โ””โ”€โ”€ ๐Ÿ“ auth/ # Authentication feature
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ hooks/ # Custom React hooks
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ pages/ # Page components
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“ Dashboard/ # Dashboard & sections
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“ Chat/ # AI Chat interface
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“ Assessments/ # Mental health tests
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“ Games/ # Wellness activities
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“ Profile/ # User profile
โ”‚ โ”‚ โ””โ”€โ”€ ๐Ÿ“ Progress/ # Progress tracking
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ providers/ # Context providers
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ routes/ # Routing configuration
โ”‚ โ””โ”€โ”€ ๐Ÿ“ styles/ # Global styles
โ”œโ”€โ”€ ๐Ÿ“„ package.json # Dependencies & scripts
โ”œโ”€โ”€ ๐Ÿ“„ tailwind.config.js # Tailwind configuration
โ”œโ”€โ”€ ๐Ÿ“„ vite.config.js # Vite configuration
โ””โ”€โ”€ ๐Ÿ“„ README.md # Project documentation

๐Ÿ—‚๏ธ Key Directories

Directory Purpose Key Files
/src/pages/ Main application pages Dashboard, Chat, Assessments
/src/components/ Reusable UI components Button, Input, Assessment
/src/api/ Mock API services auth.js, sessions.js
/src/providers/ React context providers AuthProvider, ThemeProvider
/src/hooks/ Custom React hooks useAuth.js

๐Ÿ”„ Workflows

User Authentication Flow

flowchart TD
 A[User Visits App] --> B{Authenticated?}
 B -->|No| C[Redirect to Login]
 B -->|Yes| D[Show Dashboard]
 
 C --> E[Enter Credentials]
 E --> F{Valid Credentials?}
 F -->|No| G[Show Error]
 F -->|Yes| H[Store Token]
 
 G --> E
 H --> I[Redirect to Dashboard]
 I --> D
 
 D --> J[Access Protected Routes]
 J --> K[Chat, Assessments, Games]
Loading

AI Chat Interaction Flow

flowchart LR
 A[User Message] --> B[Sentiment Analysis]
 B --> C{Detected Emotion}
 
 C -->|Anxiety| D[Anxiety Response Pool]
 C -->|Depression| E[Depression Response Pool]
 C -->|Positive| F[Positive Response Pool]
 C -->|Neutral| G[Neutral Response Pool]
 
 D --> H[Select Response]
 E --> H
 F --> H
 G --> H
 
 H --> I[Add Typing Delay]
 I --> J[Display AI Response]
Loading

Assessment Workflow

graph TD
 A[Select Assessment] --> B{Assessment Type}
 B -->|PHQ-9| C[Depression Questions]
 B -->|GAD-7| D[Anxiety Questions]
 
 C --> E[9 Questions]
 D --> F[7 Questions]
 
 E --> G[Calculate Score]
 F --> G
 
 G --> H{Score Range}
 H -->|0-4| I[Minimal]
 H -->|5-9| J[Mild]
 H -->|10-14| K[Moderate]
 H -->|15-19| L[Moderately Severe]
 H -->|20-27| M[Severe]
 
 I --> N[Generate Recommendations]
 J --> N
 K --> N
 L --> N
 M --> N
 
 N --> O[Store Results]
 O --> P[Display Results & Next Steps]
Loading

๐ŸŽฎ Demo

๐Ÿ”— Live Demo

Note: This is a frontend-only demo with simulated backend functionality.

Demo Account:

  • Email: utsav@gmail.com
  • Password: 123

๐Ÿ“ธ Screenshots

Feature Description
๐Ÿ  Home Page Landing page with feature overview
๐Ÿค– AI Chat Interactive mental health conversations
๐Ÿ“Š Dashboard Mental health metrics and progress
๐Ÿ“‹ Assessments PHQ-9 and GAD-7 standardized tests
๐ŸŽฎ Wellness Games Breathing exercises and mood tracking

๐ŸŽฏ Demo Features

  1. Authentication System

    • Login with demo credentials
    • Session persistence
    • Protected routes
  2. AI Chat Simulation

    • Sentiment analysis
    • Contextual responses
    • Real-time messaging
  3. Mental Health Assessments

    • Complete PHQ-9 depression screening
    • Take GAD-7 anxiety assessment
    • View results and recommendations
  4. Wellness Activities

    • Try guided breathing exercises
    • Log mood entries
    • Practice gratitude exercises

๐Ÿค Contributing

We welcome contributions from the community! Here's how you can help:

๐Ÿ“ Contribution Steps

  1. Fork the Project

    git clone https://github.com/Matrixxboy/psymitrix.git
  2. Create Feature Branch

    git checkout -b feature/AmazingFeature
  3. Make Changes

    • Follow existing code style
    • Add tests for new features
    • Update documentation
  4. Commit Changes

    git commit -m 'Add some AmazingFeature'
  5. Push to Branch

    git push origin feature/AmazingFeature
  6. Open Pull Request

    • Describe your changes
    • Link any related issues
    • Request review

๐Ÿ”ง Development Guidelines

Area Guidelines
Code Style Follow ESLint rules, use Prettier
Components Use functional components with hooks
Naming Use descriptive names, follow conventions
Testing Add tests for new features
Documentation Update README and code comments

๐Ÿ› Bug Reports

When reporting bugs, please include:

  • Environment details (OS, Browser, Node version)
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots (if applicable)

๐Ÿ’ก Feature Requests

We'd love to hear your ideas! Please include:

  • Problem description
  • Proposed solution
  • Use cases
  • Implementation suggestions

๐Ÿ“„ License

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

MIT License
Copyright (c) 2024 Matrixxboy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

๐Ÿ“ž Contact

๐Ÿ‘จโ€๐Ÿ’ป Project Maintainer

Utsav Lankapati

๐Ÿ”— Project Links


๐Ÿ™ Acknowledgments

๐ŸŽฏ Inspiration & Resources

๐ŸŒŸ Special Thanks

  • Mental health professionals for guidance on assessment implementation
  • Open source community for amazing tools and libraries
  • Beta testers for valuable feedback and suggestions

๐Ÿ’™ Built with Love for Mental Health

PsyMitrix - Making mental health support accessible to everyone

Made with React Powered by Vite Styled with Tailwind

โญ Star this repository if it helped you! โญ

About

PsyMitrix is an AI-driven mental health companion that analyzes emotions, delivers personalized support, and helps users track and improve their well-being.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

AltStyle ใซใ‚ˆใฃใฆๅค‰ๆ›ใ•ใ‚ŒใŸใƒšใƒผใ‚ธ (->ใ‚ชใƒชใ‚ธใƒŠใƒซ) /