Skip to content

A personalized, AI-enhanced dashboard for maintaining sobriety with intelligent features for motivation, reflection, and real-time support.

Notifications You must be signed in to change notification settings

Bashpoet/SobrietySupport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sobriety Support

A personalized, AI-enhanced dashboard for maintaining sobriety with intelligent features for motivation, reflection, and real-time support.

Version React Claude API License

Overview

Sobriety Support is a comprehensive React application designed to help individuals maintain sobriety through a combination of tracking tools, educational resources, and AI-powered personalization. Unlike generic wellness apps, it focuses specifically on the recovery journey with features informed by evidence-based approaches to addiction recovery.

Key Features

Core Functionality

  • Streak Tracking: Monitor consecutive days of sobriety with milestone achievements
  • Health & Benefit Insights: Visualize physical, mental, financial, and relationship improvements
  • Trigger Identification: Document and manage personal triggers with intensity ratings
  • Coping Strategy Library: Access evidence-based techniques for managing urges
  • Journal System: Record thoughts, feelings, and experiences with mood tracking
  • Community Resources: Connect with support groups and recovery communities

AI-Enhanced Features

  • Personalized Motivational Messages: Receive context-aware encouragement based on your journal entries, mood patterns, and recovery timeline
  • Intelligent Journal Prompts: Get tailored reflection questions that evolve with your journey
  • Real-Time Urge Support: Access immediate, interactive guidance during challenging moments

Technical Implementation

Architecture

  • Frontend: React 18 with hooks for state management
  • UI Components: shadcn/ui with Tailwind CSS for styling
  • Animations: Framer Motion for smooth transitions
  • Icons: Lucide React icons
  • Storage: localStorage for data persistence
  • AI Integration: Anthropic's Claude API

AI Integration Details

1. Personalized Motivational Messages

The app analyzes user data to generate tailored motivation:

// Context object sent to Claude API
const userContext = {
  name: userName,
  sobrietyDays: calculateSobrietyDays(),
  journalEntries: recentEntries,
  mood: journalMood,
  triggers: userTriggers,
  timeOfDay: getCurrentTimeOfDay()
};

This enables contextually relevant messages like:

  • For morning entries with anxious moods: "The morning sunlight brings new possibilities. Your awareness of anxiety shows profound self-understanding."
  • For milestone days: "Fifty days represents thousands of positive choices and moments of strength. You've built something remarkable."

2. Journaling Assistance

Journal prompts are dynamically generated by analyzing:

  • Recent journal content and themes
  • Emotional patterns from mood tracking
  • Current recovery stage
  • Previously used prompts (to avoid repetition)

The system generates reflective questions that deepen over time, from simple prompts like "What are you grateful for today?" to more nuanced exploration of triggers and growth.

3. Real-Time Urge Support

The urge support chat utilizes Anthropic's Claude to provide:

  • Empathetic, non-judgmental responses
  • Evidence-based coping techniques tailored to the user's situation
  • Conversational support that responds to emotional cues
  • Practical next steps to navigate urges

The implementation maintains context across the conversation for more coherent support.

Getting Started

Prerequisites

  • Node.js 16+
  • npm or yarn
  • Anthropic API key (for AI features)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/sobriety-support.git
cd sobriety-support
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Configure your Claude API key in the settings panel of the application

Local Development

The application stores all user data locally using the browser's localStorage API. No data is transmitted to external servers except when making API calls to Anthropic for generating content.

Privacy & Security

  • All personal data remains on the user's device
  • API calls to Claude are encrypted via HTTPS
  • No user-identifiable information is stored on servers
  • API keys are stored securely in localStorage

Roadmap

Future development plans include:

  • Mobile Application: Native mobile experience with push notifications
  • Data Visualization: Advanced analytics and pattern recognition
  • Offline Support: Full functionality without internet connection
  • Community Features: Optional anonymous sharing and support circles
  • Integration: Connect with wearable devices for physiological monitoring

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

License

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

Acknowledgments

  • Inspired by evidence-based approaches to addiction recovery
  • UI components from shadcn/ui
  • AI capabilities powered by Anthropic's Claude

About

A personalized, AI-enhanced dashboard for maintaining sobriety with intelligent features for motivation, reflection, and real-time support.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published