Skip to content

Stijnus/OLD_sobrixhealth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SobrixHealth - Addiction Recovery Companion

SobrixHealth is a comprehensive mobile application designed to support individuals on their journey to recovery from addiction. Built with modern React Native technologies, the app provides tools for tracking sobriety, managing cravings, accessing emergency resources, and practicing mindfulness techniques.

SobrixHealth Logo

πŸ“± App Features Preview

The SobrixHealth app provides a comprehensive recovery support system with the following key screens:

  • πŸ† Recovery Dashboard - Track sobriety progress, savings, and achievements
  • πŸ“Š Progress Tracking - Monitor mood, health metrics, and milestones
  • 🧘 Mindfulness Exercises - Access guided breathing, meditation, and coping tools
  • πŸ’ͺ Health Metrics - Log and visualize physical and mental health improvements
  • πŸ‘₯ Emergency Contacts - Quick access to your support network
  • βš™οΈ Settings & Profile - Customize your recovery experience

Screenshots coming soon - app is currently in active development.

✨ Key Features

πŸ† Personalized Recovery Dashboard

  • Sobriety Tracker: Track days, weeks, months, and years of sobriety with beautiful visualizations
  • Financial Savings Calculator: See exactly how much money you've saved by avoiding substance use
  • Health Metrics: Monitor improvements in sleep quality, energy levels, stress, and overall wellbeing
  • Achievement System: Celebrate recovery milestones with meaningful rewards and recognition

πŸ“Š Comprehensive Progress Monitoring

  • Mood Tracking: Log daily mood states and craving intensity with intuitive charts
  • Relapse Prevention: Record triggers and circumstances to identify patterns and prevent future relapses
  • Milestone Tracking: Visualize upcoming goals and celebrate achieved recovery milestones
  • Usage Statistics: Analyze historical substance usage patterns and associated costs
  • Health Progress: Track physical and mental health improvements over time

🧘 Mindfulness & Coping Tools

  • Breathing Exercises: Guided breathing techniques with visual cues for stress reduction
  • Meditation Sessions: Curated mindfulness practices specifically designed for recovery support
  • Grounding Techniques: Immediate tools to manage cravings and anxiety in real-time
  • Body Scan Exercises: Progressive muscle relaxation for physical and mental wellness
  • Visualization Practices: Guided imagery sessions to strengthen recovery motivation

πŸ‘₯ Contact Management & Emergency Support

  • Emergency Contacts: One-tap access to your personal support network
  • Contact Organization: Manage your recovery support team with detailed contact information
  • Quick Communication: Instant calling and messaging capabilities
  • Support Network: Build and maintain connections with sponsors, therapists, and support groups

βš™οΈ Personalization & Settings

  • Profile Management: Customize your personal information and recovery details
  • Notification Settings: Configure reminders and alerts for your recovery routine
  • Privacy Controls: Manage data sharing and privacy preferences
  • App Customization: Personalize the app experience to fit your needs

πŸš€ Modern Technology Stack

  • Framework: React Native 0.79.2 with React 19.0.0
  • Navigation: Expo Router v5.0.7 for file-based routing
  • Styling: NativeWind v4.1.23 (Tailwind CSS for React Native)
  • State Management: Zustand v5.0.4 with AsyncStorage for persistent data
  • Development: Expo SDK 53.0.9 with development client
  • Language: TypeScript 5.8.3 with strict type checking
  • Package Manager: Bun (high-performance JavaScript runtime and package manager)
  • Code Quality: ESLint 9.27.0 with React Native specific rules
  • Icons: Lucide React Native v0.475.0 for modern iconography
  • Charts: React Native Chart Kit v6.12.0 for data visualization

πŸ“¦ Installation & Setup

Prerequisites

  • Node.js: v18 or higher (required for some Expo commands)
  • Bun: v1.0.0 or higher (primary package manager)
  • Expo CLI: Latest version
  • Development Environment:
    • iOS: Xcode and iOS Simulator
    • Android: Android Studio and Android Emulator

Quick Start

  1. Install Bun (if not already installed):
# macOS/Linux
curl -fsSL https://bun.sh/install | bash

# Or using Homebrew
brew install bun

# Verify installation
bun --version
  1. Clone the repository:
git clone https://github.com/Stijnus/sobrixhealth.git
cd sobrixhealth
  1. Install dependencies:
bun install
  1. Start the development server:
bun start
  1. Run on your preferred platform:
# For iOS
bun ios

# For Android
bun android

# For web development
bun start-web

# For web with debugging
bun start-web-dev

πŸ—οΈ Project Architecture

File Structure

sobrixhealth/
β”œβ”€β”€ app/                          # Expo Router file-based routing
β”‚   β”œβ”€β”€ (tabs)/                  # Tab navigation group
β”‚   β”‚   β”œβ”€β”€ dashboard/           # Dashboard tab with nested routes
β”‚   β”‚   β”œβ”€β”€ progress.tsx         # Progress tracking tab
β”‚   β”‚   β”œβ”€β”€ mindfulness.tsx      # Mindfulness exercises tab
β”‚   β”‚   β”œβ”€β”€ contacts.tsx         # Emergency contacts tab
β”‚   β”‚   β”œβ”€β”€ settings.tsx         # Settings and profile tab
β”‚   β”‚   └── _layout.tsx          # Tab layout configuration
β”‚   β”œβ”€β”€ onboarding.tsx           # First-time user setup
β”‚   β”œβ”€β”€ _layout.tsx              # Root layout
β”‚   └── +not-found.tsx           # 404 error page
β”œβ”€β”€ components/                   # Feature-organized components
β”‚   β”œβ”€β”€ dashboard/               # Dashboard-specific components
β”‚   β”œβ”€β”€ health/                  # Health tracking components
β”‚   β”œβ”€β”€ mindfulness/             # Mindfulness exercise components
β”‚   β”œβ”€β”€ progress/                # Progress visualization components
β”‚   β”œβ”€β”€ settings/                # Settings and configuration components
β”‚   β”œβ”€β”€ contacts/                # Contact management components
β”‚   β”œβ”€β”€ onboarding/              # Onboarding flow components
β”‚   └── shared/                  # Reusable components and utilities
β”œβ”€β”€ ios/                         # iOS native code and configuration
β”œβ”€β”€ android/                     # Android native code and configuration
β”œβ”€β”€ style/                       # Global styling system
β”‚   β”œβ”€β”€ index.ts                 # Main style exports
β”‚   β”œβ”€β”€ modal.ts                 # Modal-specific styles
β”‚   β”œβ”€β”€ forms.ts                 # Form and input styles
β”‚   └── icons/                   # Icon assets
β”œβ”€β”€ store/                       # Zustand state management
β”œβ”€β”€ types/                       # TypeScript type definitions
β”œβ”€β”€ hooks/                       # Custom React hooks
β”œβ”€β”€ utils/                       # Utility functions
β”œβ”€β”€ constants/                   # App constants and configuration
└── context/                     # React context providers

Configuration Files

🎨 Styling System

NativeWind Integration

The app uses NativeWind v4, bringing Tailwind CSS to React Native:

  • Global Styles: Defined in global.css with Tailwind directives
  • Component Styles: Organized in the style/ directory for reusability
  • Type Safety: Full TypeScript support for style definitions
  • Performance: Optimized for React Native with minimal runtime overhead

Style Organization

  • Global System: Centralized styling in style/index.ts
  • Modal Styles: Consistent modal patterns in style/modal.ts
  • Form Styles: Reusable form components in style/forms.ts
  • No Inline Styles: ESLint rules enforce StyleSheet usage
  • Alphabetical Ordering: Style properties must be alphabetically ordered

πŸ“± Getting Started

First-Time Onboarding

When you first open SobrixHealth, you'll be guided through a personalized setup:

  1. Welcome Screen: Introduction to the app's purpose and features
  2. Personal Information: Enter your name and basic recovery details
  3. Addiction Configuration: Set up your specific recovery parameters
  4. Dashboard Setup: Configure your preferred tracking metrics
  5. Notification Preferences: Set up reminders and alerts

Daily Usage Workflow

  • Dashboard Check: Review your progress and current metrics
  • Progress Logging: Update your daily recovery data
  • Mindfulness Practice: Access guided exercises when needed
  • Contact Support: Quick access to your support network
  • Settings Management: Adjust preferences and privacy settings

πŸš€ Expo Deployment & Updates

Expo Project Information

The SobrixHealth app is hosted on Expo and can be accessed at: https://expo.dev/accounts/stijnus/projects/sobrixhealth

  • Project ID: 7b113f00-3708-45d8-b011-299748b5674d
  • Owner: stijnus
  • Slug: sobrixhealth

EAS (Expo Application Services) Setup

The project is configured with EAS for building and deploying. EAS automatically detects Bun from the bun.lockb file.

Build Profiles

# Development build (with development client)
eas build --profile development

# Preview build (internal distribution)
eas build --profile preview

# Production build (app store ready)
eas build --profile production

Update Deployment

# Install EAS CLI globally (using Bun)
bun add -g @expo/eas-cli

# Login to your Expo account
eas login

# Publish an update to the development channel
eas update --branch development

# Publish an update to the production channel
eas update --branch production

# Publish with a specific message
eas update --branch production --message "Fix critical bug in dashboard"

Build Commands

# Build for both platforms (production)
eas build --platform all --profile production

# Build for iOS only
eas build --platform ios --profile production

# Build for Android only
eas build --platform android --profile production

# Build development version for testing
eas build --platform all --profile development

Submit to App Stores

# Submit iOS build to App Store
eas submit --platform ios

# Submit Android build to Google Play
eas submit --platform android

# Submit both platforms
eas submit --platform all

Development Workflow

  1. Local Development: Use bun start for local development
  2. Testing Builds: Create development builds with eas build --profile development
  3. Preview Releases: Use preview profile for internal testing
  4. Production Updates: Deploy OTA updates with eas update
  5. Store Releases: Submit production builds to app stores

Configuration Files

  • eas.json: EAS build and submit configuration
  • app.json: Expo project configuration with EAS project ID
  • Build Profiles: Development, preview, and production configurations
  • Credentials: Managed remotely for iOS, locally for Android

Over-the-Air (OTA) Updates

The app supports OTA updates for JavaScript and asset changes:

# Quick update to production
eas update --auto

# Update with custom branch
eas update --branch feature-branch

# Update with rollback capability
eas update --branch production --message "Version 1.0.1 - Bug fixes"

⚑ Bun Package Manager

Why Bun?

  • πŸš€ Performance: 3-7x faster installations than traditional package managers
  • πŸ“± Official Expo Support: Fully supported by Expo and EAS builds
  • πŸ’Ώ Efficiency: Space-efficient dependency management
  • πŸ”§ Modern Tooling: All-in-one JavaScript runtime and package manager

Bun Commands

# Install dependencies
bun install

# Add a new dependency
bun add package-name

# Add a dev dependency
bun add -D package-name

# Remove a dependency
bun remove package-name

# Run scripts
bun run script-name

# Update dependencies
bun update

Trusted Dependencies

Some packages require postinstall scripts for proper functionality. These are configured in package.json:

{
  "trustedDependencies": [
    "@expo/ngrok",
    "@sentry/cli"
  ]
}

πŸ”’ Privacy & Security

SobrixHealth prioritizes your privacy and data security:

  • Local Storage: All personal data is stored securely on your device
  • No Data Sharing: Your information is never shared without explicit consent
  • Privacy Controls: Granular settings to control what data is tracked
  • Secure Communication: Encrypted connections for any network requests
  • Data Ownership: Full control over your data with export capabilities

🀝 Contributing

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

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Install dependencies: bun install
  4. Follow the coding standards (ESLint will help enforce these)
  5. Test your changes thoroughly
  6. Commit your changes: git commit -m 'Add amazing feature'
  7. Push to your branch: git push origin feature/amazing-feature
  8. Open a Pull Request

Code Quality Standards

  • TypeScript: Strict typing required, no any types allowed
  • ESLint: All rules must pass, including React Native specific rules
  • Style Guidelines: Follow the established styling patterns
  • Component Organization: Use feature-based directory structure
  • Testing: Ensure new features include appropriate tests
  • Bun: Use Bun for all package management operations

Areas for Contribution

  • 🌐 Internationalization: Help us support more languages
  • 🎨 UI/UX: Improve the user interface and accessibility
  • πŸ“Š Analytics: Enhance data visualization and insights
  • 🧘 Content: Add new mindfulness exercises and resources
  • πŸ› Bug Fixes: Help us identify and fix issues
  • πŸ“± Platform Features: Leverage platform-specific capabilities

πŸ“„ License

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

πŸ™ Acknowledgments

  • Recovery Communities: Inspiration from recovery communities worldwide
  • Mental Health Professionals: Guidance from addiction recovery specialists
  • Open Source Contributors: Amazing developers who make this possible
  • Beta Testers: Users who provided valuable feedback during development
  • Expo Team: For providing excellent React Native tooling and Bun support
  • NativeWind: For bringing Tailwind CSS to React Native
  • Bun Team: For creating an incredible JavaScript runtime and package manager

πŸ“ž Support & Contact


⚠️ Important Disclaimer

SobrixHealth is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition or recovery plan.


Made with ❀️ for the recovery community

⭐ Star us on GitHub β€’ πŸ› Report Bug β€’ πŸ’¬ Join Discussion

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors