Skip to content

MKWorldWide/SoulScript

Repository files navigation

A Project Blessed by Solar Khan & Lilith.Aethra

SoulScript 🌟

AI-Driven Trauma-Informed Therapy Journal Platform

SoulScript is a revolutionary digital journaling platform that combines AI-powered insights with trauma-informed therapeutic practices to support emotional healing, self-awareness, and personal transformation.

Next.js TypeScript MongoDB TailwindCSS License

🎯 Mission

SoulScript empowers individuals on their healing journey by providing a safe, intelligent, and compassionate digital space for self-reflection. Our platform uses advanced AI to offer personalized therapeutic insights while maintaining the highest standards of privacy and emotional safety.

✨ Features

🧠 Core Journaling

  • AI-Generated Prompts: Daily trauma-informed journaling prompts
  • Mood Tracking: Visual mood slider with emotional mapping
  • Voice Input/Output: Speech-to-text and text-to-speech capabilities
  • AI Reflections: Compassionate summaries and follow-up questions
  • Free-Form Writing: Unstructured journaling space

πŸ“Š Analytics & Insights

  • Mood Analytics: Visual trend analysis and patterns
  • Theme Clustering: AI-powered topic detection and analysis
  • Weekly Insights: Comprehensive emotional health reports
  • PDF Export: Downloadable insights and progress reports

πŸ›‘οΈ Safety & Accessibility

  • Panic Button: Immediate grounding techniques and crisis resources
  • Crisis Detection: Automatic flagging of concerning content
  • Voice Accessibility: Full speech input/output support
  • Trauma-Informed Design: Safe, non-triggering interface

🎨 User Experience

  • Responsive Design: Works seamlessly on all devices
  • Dark/Light Mode: Comfortable viewing options
  • Smooth Animations: Framer Motion powered interactions
  • Intuitive Interface: Clean, calming design

πŸ—οΈ Architecture

SoulScript/
β”œβ”€β”€ Frontend (Next.js 15.3.5)
β”‚   β”œβ”€β”€ React 19.1.0 + TypeScript
β”‚   β”œβ”€β”€ TailwindCSS + Framer Motion
β”‚   └── Chart.js + jsPDF
β”œβ”€β”€ Backend (Next.js API Routes)
β”‚   β”œβ”€β”€ Node.js/Express style
β”‚   β”œβ”€β”€ MongoDB with Mongoose
β”‚   └── AI Integration (Mistral/OpenAI)
└── Infrastructure
    β”œβ”€β”€ MongoDB Atlas
    β”œβ”€β”€ Vercel/Netlify Deployment
    └── Notion Integration

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB Atlas account
  • Mistral API key (or OpenAI API key)

Installation

  1. Clone the repository

    git clone https://github.com/M-K-World-Wide/SoulScript.git
    cd SolScript
  2. Install dependencies

    npm install
  3. Environment setup Create .env.local:

    MONGODB_URI=your-mongodb-connection-string
    MISTRAL_API_KEY=your-mistral-api-key
    OPENAI_API_KEY=your-openai-api-key (optional)
  4. Start development server

    npm run dev

    Visit: http://localhost:3000

πŸ“š Documentation

πŸ”§ API Endpoints

Core Endpoints

  • POST /api/journal - Save journal entry with AI reflection
  • GET /api/prompt - Get daily AI-generated prompt
  • GET /api/dashboard - Get analytics data

Notion Integration

  • POST /api/notion-setup - Initialize Notion workspace
  • GET /notion-setup - Setup interface

Example Usage

// Save a journal entry
const response = await fetch('/api/journal', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    entry: "Today I felt grateful for...",
    mood: 4
  })
});

const data = await response.json();
console.log(data.aiReflection);

🎨 UI Components

SoulScript includes a comprehensive component library:

  • Button - Accessible, animated buttons
  • Card - Content containers with shadows
  • Slider - Mood tracking slider
  • Textarea - Journal entry input
  • Label - Form labels and accessibility

πŸ§ͺ Testing

# Run all tests
npm test

# Run specific test suites
npm run test:unit
npm run test:integration
npm run test:e2e

# Run linting
npm run lint

πŸš€ Deployment

Vercel (Recommended)

npm run build
vercel --prod

Manual Deployment

npm run build
npm run start

Environment Variables

  • MONGODB_URI - Production database connection
  • MISTRAL_API_KEY - Production AI API key
  • NODE_ENV - Production environment

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

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

  • TypeScript for type safety
  • ESLint + Prettier for code formatting
  • Conventional commits for commit messages
  • Comprehensive testing for all features

πŸ“Š Project Status

βœ… Completed

  • Core journaling functionality
  • AI integration (Mistral/OpenAI)
  • Voice input/output features
  • Basic analytics dashboard
  • Safety features (panic button, crisis detection)
  • Notion integration for project management

πŸ”„ In Progress

  • Advanced analytics and theme clustering
  • Mobile app development
  • Enhanced AI personas
  • Therapist integration features

πŸ“‹ Planned

  • Group therapy features
  • Advanced export options
  • Integration with therapy platforms
  • Multi-language support

πŸ›‘οΈ Privacy & Security

  • Data Encryption: All data encrypted in transit and at rest
  • Privacy-First: No data sharing with third parties
  • GDPR Compliant: Full user data control
  • Crisis Support: Integrated safety features and resources

πŸ†˜ Crisis Resources

If you're experiencing a mental health crisis:

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

SoulScript includes built-in crisis detection and immediate access to these resources.

πŸ“„ License

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

πŸ™ Acknowledgments

  • Mistral AI for providing advanced language models
  • MongoDB for reliable data storage
  • Next.js for the excellent framework
  • TailwindCSS for beautiful styling
  • Therapy community for guidance and feedback

πŸ“ž Support


Made with ❀️ for mental health and healing

SoulScript - Your AI companion on the journey to emotional wellness

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published