Skip to content

About

CBT Diary is a comprehensive mental health application that combines cognitive behavioral therapy techniques with modern technology to help users process their thoughts and emotions in a safe, private environment.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CBT Diary - Therapeutic Journaling App

CBT Diary is a comprehensive mental health application that combines cognitive behavioral therapy techniques with modern technology to help users process their thoughts and emotions in a safe, private environment.

Creator Information

  • Creator: Raphael Tomas Malikian
  • Email: rtmalikian@gmail.com
  • Development Tool: Created with help of Qwen Code in Microsoft Visual Studio using the coder-model

GitHub Repository

Features

  • Journaling Interface: Daily writing prompts with AI-generated personalized suggestions
  • Emotion Wheel: Interactive radial emotion picker with 24 emotions
  • Evidence-Based Breathing Exercises: Multiple research-backed breathing patterns including 4-7-8 technique, Box Breathing, Coherent Breathing (6s in, 6s out), Physiological Sigh, and Alternate Nostril Breathing with guided visuals

Evidence-Based Breathing Patterns

The CBT Diary incorporates scientifically researched breathing techniques proven to reduce anxiety, improve focus, and promote emotional regulation:

1. 4-7-8 Breathing (Dr. Andrew Weil)

  • Inhale for 4 seconds, hold for 7 seconds, exhale for 8 seconds
  • Activates the parasympathetic nervous system
  • Particularly effective for reducing anxiety and promoting sleep

2. Box Breathing (Military/First Responders)

  • Equal count for inhale, hold, exhale, and hold phases (4s each)
  • Improves focus, concentration, and stress management
  • Used by Navy SEALs and other high-stress professions

3. Coherent Breathing (Resonance Frequency Breathing)

  • Slow rhythmic breathing at 5 breaths per minute (6s inhale, 6s exhale)
  • Optimizes heart rate variability (HRV)
  • Improves autonomic nervous system balance

4. Physiological Sigh

  • Double inhale (1s + 1s) followed by extended exhale (6s)
  • Rapidly resets CO2 levels in the body
  • Quickly activates parasympathetic response to reduce acute stress

5. Alternate Nostril Breathing (Nadi Shodhana)

  • Inhale through one nostril, exhale through the other
  • Balances left and right brain hemispheres
  • Enhances cognitive function and mental clarity

Each technique comes with visual guidance to help maintain proper timing and rhythm for maximum therapeutic benefit.

  • Progressive Muscle Relaxation (PMR): Step-by-step relaxation sessions
  • Write Then Burn: Securely write sensitive thoughts that self-destruct with animation
  • Mood Tracking: Track and visualize your emotional patterns over time
  • AI/ML System: Personalized writing prompts based on your entries
  • NLP-Based Triage: Automatic detection of self-harm/abuse indicators with appropriate responses
  • Safety Protocols: Crisis intervention and resource integration
  • Privacy First: No external data storage, complete privacy

Mental Health Benefits

  • Evidence-based CBT techniques combined with accessible technology
  • Safe space for processing sensitive emotions and experiences
  • Crisis detection and intervention protocols
  • Therapeutic tools for emotional regulation and mindfulness

Tech Stack

  • Frontend: React.js, HTML5, CSS3
  • Backend: Node.js, Express.js
  • Database: LocalStorage API (with MongoDB compatibility)
  • Security: JWT authentication, bcrypt encryption
  • AI/ML: Natural Language Processing for content analysis

Installation

  1. Clone the repository:

    git clone https://github.com/[username]/cbt-diary.git
    cd cbt-diary
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file with:

    JWT_SECRET=your-super-secret-jwt-key-here
    JWT_EXPIRES_IN=7d
    DB_HOST=localhost
    DB_PORT=27017
    DB_NAME=cbt_diary
    NODE_ENV=development
    PORT=3000
    
  4. Start the application:

    npm run dev
    

Usage

  1. Navigate to the app in your browser
  2. Use the journal to write daily entries with AI-generated prompts
  3. Access therapeutic tools through the navigation
  4. Use the emotion wheel by right-clicking in the journal area
  5. Practice breathing exercises and PMR for relaxation
  6. Use Write Then Burn for sensitive thoughts that need processing but not storing
  7. Monitor your mood patterns over time

Privacy & Safety

This app is designed with mental health privacy in mind:

  • Local data storage with encryption
  • No external servers for personal entries
  • Crisis detection algorithms with appropriate resource recommendations
  • HIPAA-compliant design principles

Crisis Resources

If you are experiencing a mental health crisis, please reach out for immediate support:

  • National Suicide Prevention Lifeline: 988
  • Crisis Text Line: Text HOME to 741741
  • Emergency Services: 911

Contributing

We welcome contributions to improve mental health accessibility. Please follow these steps:

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

License

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

Support

For support, create an issue in the repository or contact [support-email].

Additional Information on Evidence-Based Breathing Patterns

The CBT Diary incorporates scientifically researched breathing techniques proven to reduce anxiety, improve focus, and promote emotional regulation:

1. 4-7-8 Breathing (Dr. Andrew Weil)

  • Inhale for 4 seconds, hold for 7 seconds, exhale for 8 seconds
  • Activates the parasympathetic nervous system
  • Particularly effective for reducing anxiety and promoting sleep

2. Box Breathing (Military/First Responders)

  • Equal count for inhale, hold, exhale, and hold phases (4s each)
  • Improves focus, concentration, and stress management
  • Used by Navy SEALs and other high-stress professions

3. Coherent Breathing (Resonance Frequency Breathing)

  • Slow rhythmic breathing at 5 breaths per minute (6s inhale, 6s exhale)
  • Optimizes heart rate variability (HRV)
  • Improves autonomic nervous system balance

4. Physiological Sigh

  • Double inhale (1s + 1s) followed by extended exhale (6s)
  • Rapidly resets CO2 levels in the body
  • Quickly activates parasympathetic response to reduce acute stress

5. Alternate Nostril Breathing (Nadi Shodhana)

  • Inhale through one nostril, exhale through the other
  • Balances left and right brain hemispheres
  • Enhances cognitive function and mental clarity

Each technique comes with visual guidance to help maintain proper timing and rhythm for maximum therapeutic benefit.

Medical Disclaimer

IMPORTANT: This product is not designed to treat, diagnose, or manage any medical problem or psychiatric diagnosis. This application should not be used unless under the approval of a licensed physician or healthcare professional.

The CBT Diary is intended to supplement professional mental health care, not replace it. If you are experiencing a mental health crisis, please contact a qualified healthcare professional or emergency services immediately.

For emergency support:

  • National Suicide Prevention Lifeline: 988
  • Crisis Text Line: Text HOME to 741741
  • Emergency Services: 911

Acknowledgments

This application was inspired by the advocacy and support of several individuals who championed the importance of CBT and self-care: Ms. Downey, Ms. White, and Mr. & Mrs. Paasch from Duluth, Minnesota. Their dedication to mental health awareness and therapeutic techniques has contributed to the development of this tool.

Medical Disclaimer

IMPORTANT: This product is not designed to treat, diagnose, or manage any medical problem or psychiatric diagnosis. This application should not be used unless under the approval of a licensed physician or healthcare professional.

The CBT Diary is intended to supplement professional mental health care, not replace it. If you are experiencing a mental health crisis, please contact a qualified healthcare professional or emergency services immediately.

For emergency support:

  • National Suicide Prevention Lifeline: 988
  • Crisis Text Line: Text HOME to 741741
  • Emergency Services: 911

About

CBT Diary is a comprehensive mental health application that combines cognitive behavioral therapy techniques with modern technology to help users process their thoughts and emotions in a safe, private environment.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages