A comprehensive health companion mobile application built with React Native and AWS serverless architecture.
BeauMED is a healthcare management application that provides users with personalized health assistance, medication tracking, doctor search functionality, and prescription analysis powered by advanced cloud services.
- User Authentication: Secure sign-up, login, password reset, and email verification via AWS Cognito
- AI Health Assistant: Conversational health guidance powered by Amazon Bedrock (Nova models)
- Medication Management: Full CRUD operations for medication tracking with reminder scheduling
- Doctor Search: Location-based doctor search with Google Maps Places API integration
- Prescription Upload: Camera/photo library integration with AI-powered prescription analysis
- Profile Management: User profile with emergency contact information stored in Cognito
- Dark Mode: System-wide theme support with light/dark mode toggle
- Web Preview: Browser-based development preview for rapid UI iteration
- Sign-up with email verification (6-digit code)
- Secure login with JWT token management
- Password reset with email verification
- Auto-verified email attributes
- Protected routes requiring authentication
- Real-time conversational AI chat
- Conversation history stored in DynamoDB
- Context-aware health guidance
- Streaming responses for better UX
- Add, edit, and delete medications
- Multiple reminder times per medication
- Start/end date tracking
- Active/inactive status
- Notes field for additional information
- Integration with AWS DynamoDB for persistence
- Search by city or medical specialty
- Distance calculation from user location
- Rating display and contact information
- Direct calling via deep links
- Google Maps directions integration
- Camera capture or photo library upload
- Secure S3 presigned URL uploads
- AI-powered prescription text extraction
- Automatic medication creation from prescriptions
- Framework: React Native (Expo SDK 54)
- Language: TypeScript
- Navigation: Custom SimpleRouter
- State Management: React Context API (Theme, Medications, Profile, Notifications)
- UI: React Native components with custom theming
- Web Support: react-dom and react-native-web for browser preview
- Authentication: AWS Cognito (User Pools, Identity Pools)
- API Gateway: REST API with JWT authorization
- Lambda Functions: Python-based serverless functions
- bedrock-chat-handler (AI chat)
- medication-scheduler (CRUD operations)
- prescription-analyzer (AI prescription analysis)
- s3-presigner (secure upload URLs)
- doctor-finder (location-based search)
- cognito-jwt-authorizer (custom authorizer)
- Database: DynamoDB (medications, conversations, prescriptions)
- Storage: S3 (prescription images)
- AI/ML: Amazon Bedrock (Nova models for chat and analysis)
- Google Maps Places API: Doctor search and location services
- Node.js 18+ and npm
- Expo CLI (
npm install -g expo-cli) - AWS Account with configured credentials
- Google Maps API key
- iOS Simulator (macOS) or Android Emulator
- Clone the repository:
git clone <repository-url>
cd BeauMED/BeauMED/ExpoApp- Install dependencies:
npm install- Set up environment variables:
Create a
.envfile in the ExpoApp directory:
EXPO_PUBLIC_GOOGLE_MAPS_API_KEY=your_google_maps_api_key
- Start the development server:
# Local network
npx expo start
# With tunnel (for remote devices)
npx expo start --tunnel
# Platform-specific
npx expo start --ios
npx expo start --android
npx expo start --webThe application requires the following AWS resources to be configured:
Cognito:
- User Pool with email verification enabled
- App Client with
ALLOW_USER_PASSWORD_AUTHenabled - Identity Pool for AWS resource access
- Custom attributes:
custom:age,custom:conditions,custom:caregiver_name,custom:caregiver_phone,custom:caregiver_email
API Gateway:
- REST API with CORS enabled
- JWT authorizer using Cognito User Pool
- Endpoints:
/chat,/medications,/get-upload-url,/analyze-prescription,/find-doctors
DynamoDB Tables:
Medications(userId, medicationId)ConversationHistory(userId, timestamp)Prescriptions(userId, prescriptionId)
S3 Bucket:
- Public read disabled
- Presigned URL upload policy
- Path structure:
prescriptions/{userId}/{timestamp}/
Lambda Functions:
- Deployed with appropriate IAM roles
- Environment variables configured
- Bedrock model access enabled
# Start Expo server
cd ExpoApp
npx expo start
# In a separate terminal, open in iOS simulator
npx expo start --ios
# Or Android emulator
npx expo start --android
# Or web browser
npx expo start --webTest account credentials:
- Email: [email protected]
- Password: TestPass123!
Check user status:
aws cognito-idp admin-get-user \
--user-pool-id us-west-1_7zPgpiXeY \
--username <email> \
--region us-west-1Confirm user:
aws cognito-idp admin-confirm-sign-up \
--user-pool-id us-west-1_7zPgpiXeY \
--username <email> \
--region us-west-1Set password:
aws cognito-idp admin-set-user-password \
--user-pool-id us-west-1_7zPgpiXeY \
--username <email> \
--password "<password>" \
--permanent \
--region us-west-1- User signs up with email, name, phone, and password
- Cognito sends verification code to email
- User enters code to verify email
- User logs in with email and password
- Cognito returns JWT tokens (ID token, access token, refresh token)
- Frontend stores tokens and uses ID token for API requests
- API Gateway validates JWT using custom authorizer
- Frontend calls AWS Amplify API methods
- Amplify automatically attaches JWT token to request headers
- API Gateway receives request and invokes authorizer Lambda
- Authorizer validates JWT against Cognito JWK endpoint
- If valid, API Gateway invokes target Lambda function
- Lambda processes request and accesses AWS resources (DynamoDB, S3, Bedrock)
- Response returned through API Gateway to frontend
- User selects image from camera or photo library
- Frontend requests presigned URL from
/get-upload-urlendpoint - S3 presigner Lambda generates secure upload URL
- Frontend uploads image directly to S3 using presigned POST
- Frontend calls
/analyze-prescriptionwith S3 key - Prescription analyzer Lambda downloads image from S3
- Bedrock analyzes image and extracts medication information
- Medications are saved to DynamoDB
- Frontend refreshes medication list
- All API endpoints require JWT authentication
- Presigned S3 URLs expire after 1 hour
- User data isolated by
userIdfrom JWT claims - File type and size validation on uploads
- No hardcoded credentials in source code
- Environment variables for sensitive configuration
- CORS properly configured for Expo app origin
Development-only banner that tracks AWS service status:
- Monitors API Gateway, Cognito, Lambda, DynamoDB, S3, Bedrock
- Automatic error classification (operational/degraded/down)
- Real-time status updates with detailed logs
- Export logs to console for debugging
Browser-based preview for faster UI development:
npx expo start --web- Cross-region setup: Cognito is in us-west-1, API Gateway in us-east-1 (intentional but can cause confusion)
- Cognito rate limiting: Password reset and sign-up verification have rate limits (wait 15-30 minutes between attempts)
- CORS errors: Expected when API Gateway endpoints are not yet deployed
- Fork the repository
- Create a feature branch
- Make your changes with proper testing
- Submit a pull request with detailed description
Proprietary - All rights reserved
For issues and questions, please contact the development team.
Version: 1.0.0 (MVP) Last Updated: January 2025 Status: Active Development