A personalized, AI-enhanced dashboard for maintaining sobriety with intelligent features for motivation, reflection, and real-time support.
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.
- 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
- 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
- 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
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."
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.
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.
- Node.js 16+
- npm or yarn
- Anthropic API key (for AI features)
- Clone the repository:
git clone https://github.com/yourusername/sobriety-support.git
cd sobriety-support
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Configure your Claude API key in the settings panel of the application
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.
- 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
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
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by evidence-based approaches to addiction recovery
- UI components from shadcn/ui
- AI capabilities powered by Anthropic's Claude