An AI-powered peer recovery organization management system designed for peer specialists to manage participants in substance use disorder recovery programs. Built with React Native/Expo and powered by Amazon Nova AI via AWS Bedrock.
- HIPAA & 42 CFR Part 2 Compliant: Full compliance with healthcare privacy regulations
- Conversational AI: Natural language interactions powered by Amazon Nova
- Multi-Session Intake: Flexible participant data collection across multiple sessions
- Assessments: SUPRT-C and BARC-10 conversational assessments with automatic scoring
- Recovery Plans: Collaborative goal setting and progress tracking
- Voice & Text Input: Support for both voice and text input modalities
- Offline Support: Queue data locally and sync when connectivity is restored
- Comprehensive Audit Logging: All interactions logged for compliance
- Frontend: React Native with Expo (iOS/Android)
- AI Engine: Amazon Nova via AWS Bedrock
- Database: Supabase (PostgreSQL with HIPAA-compliant configuration)
- Authentication: Supabase Auth with MFA
- Voice Processing: AWS Transcribe
- Testing: Jest + fast-check (property-based testing)
log-peer-recovery/
├── src/
│ ├── config/ # Configuration files (Supabase, AWS)
│ ├── modules/ # Feature modules
│ │ ├── consent/ # Consent management
│ │ ├── intake/ # Participant intake
│ │ ├── assessment/ # SUPRT-C & BARC-10 assessments
│ │ ├── logging/ # Interaction & audit logging
│ │ ├── recovery-plan/# Recovery goal tracking
│ │ ├── query/ # Natural language queries
│ │ ├── ai/ # Nova AI integration
│ │ └── security/ # Encryption & access control
│ ├── utils/ # Utility functions
│ └── __tests__/ # Test files
├── assets/ # Images and static assets
├── .env # Environment variables (not committed)
├── .env.example # Environment variables template
└── README.md # This file
This app supports Supabase invite deep links for mobile authentication. When users receive invite emails, they can tap the link to open the app and complete authentication automatically.
Quick Setup: See DEEP_LINK_QUICK_START.md (10 minutes)
Complete Guide: See docs/SUPABASE_DEEP_LINKING_GUIDE.md
Key Features:
- ✅ Invite links open the app directly
- ✅ Password recovery links supported
- ✅ PKCE security flow
- ✅ Session persistence across app restarts
- ✅ Auto token refresh
- ✅ Works on iOS and Android
- Node.js 18+ and npm
- Expo CLI
- iOS Simulator (macOS) or Android Emulator
- Supabase account with HIPAA BAA
- AWS account with Bedrock access and HIPAA BAA
-
Clone the repository
-
Install dependencies:
npm install
-
Copy
.env.exampleto.envand configure your credentials:cp .env.example .env
-
Update
.envwith your actual credentials:- Supabase URL and anon key
- AWS credentials and region
- Bedrock model ID
# Start the development server
npm start
# Run on iOS
npm run ios
# Run on Android
npm run android
# Run on web
npm run web# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run tests with coverage
npm test -- --coverageRequired environment variables (see .env.example):
EXPO_PUBLIC_SUPABASE_URL: Your Supabase project URLEXPO_PUBLIC_SUPABASE_ANON_KEY: Your Supabase anonymous keyEXPO_PUBLIC_AWS_REGION: AWS region (e.g., us-east-1)EXPO_PUBLIC_AWS_ACCESS_KEY_ID: AWS access keyEXPO_PUBLIC_AWS_SECRET_ACCESS_KEY: AWS secret keyEXPO_PUBLIC_BEDROCK_MODEL_ID: Bedrock model ID (default: amazon.nova-2-sonic-v1:0)
- All PHI encrypted at rest (AES-256) and in transit (TLS 1.2+)
- Role-based access control (RBAC)
- Comprehensive audit logging (7-year retention)
- Multi-factor authentication (MFA) required
- 15-minute session timeout
- Secure data deletion
- Explicit written consent before disclosure
- Prohibition on re-disclosure notices
- Separate consent records per disclosure purpose
- Consent expiration tracking
- Breach notification procedures
Each module follows this structure:
types.ts: TypeScript interfaces and typesindex.ts: Module exports- Services will be implemented in subsequent tasks
- Unit tests for specific functionality
- Property-based tests for universal correctness properties
- Integration tests for end-to-end workflows
- Minimum 100 iterations for property-based tests
- TypeScript strict mode enabled
- ESLint for code quality
- Prettier for code formatting
Proprietary - All rights reserved
For questions or issues, please contact the development team.