A comprehensive Flutter mobile application for real-time health monitoring, fall detection, and AI-powered predictive healthcare.
# Clone or navigate to project
cd /Users/palakchoithani/Desktop/vsc/Fall
# Install dependencies
flutter pub get
# Run on Chrome (Web)
flutter run -d chrome
# Or run on available device
flutter run- Real-time Health Monitoring: Track heart rate, blood pressure, steps, and calories
- AI Health Score: Get personalized health insights powered by machine learning
- Fall Detection: Automatic detection with emergency alerts
- Emergency SOS: Quick access to emergency services with GPS tracking
- Doctor Connectivity: Direct communication with healthcare providers
- Health Insights: AI-generated recommendations and warnings
- Secure Authentication: Firebase-based user authentication
- Real-time Alerts: Push notifications for health events
health_companion/
โโโ lib/
โ โโโ main.dart
โ โโโ models/
โ โ โโโ health_data.dart
โ โ โโโ user_model.dart
โ โ โโโ alert_model.dart
โ โโโ screens/
โ โ โโโ splash_screen.dart
โ โ โโโ login_screen.dart
โ โ โโโ home_screen.dart
โ โ โโโ dashboard_screen.dart
โ โ โโโ alerts_screen.dart
โ โ โโโ profile_screen.dart
โ โโโ widgets/
โ โ โโโ health_score_card.dart
โ โ โโโ vital_card.dart
โ โ โโโ ai_insight_card.dart
โ โ โโโ emergency_button.dart
โ โ โโโ alert_item.dart
โ โโโ services/
โ โ โโโ api_service.dart
โ โ โโโ firebase_service.dart
โ โ โโโ notification_service.dart
โ โโโ utils/
โ โโโ app_theme.dart
โโโ android/
โโโ ios/
โโโ pubspec.yaml
- Flutter SDK (3.0.0 or higher)
- Dart SDK
- Android Studio / Xcode
- Firebase Account
- Clone the repository
git clone https://github.com/palakchoithani/fall.detection.app.git
cd fall.detection.app- Install dependencies
flutter pub get-
Firebase Setup
a. Create a new Firebase project at Firebase Console
b. Add Android/iOS app to your Firebase project
c. Download
google-services.json(Android) orGoogleService-Info.plist(iOS)d. Place the files in:
- Android:
android/app/google-services.json - iOS:
ios/Runner/GoogleService-Info.plist
e. Enable Firebase Authentication, Firestore, and Cloud Messaging
- Android:
-
Update API Endpoint
Edit
lib/services/api_service.dart:static const String baseUrl = 'YOUR_API_ENDPOINT';
-
Run the app
On Web (Chrome):
flutter run -d chromeOn Android:
flutter run -d androidOn iOS:
flutter run -d iosOr simply:
flutter runAdd to android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>Add to ios/Runner/Info.plist:
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location for emergency services</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This app needs access to location for fall detection</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>This app needs Bluetooth to connect to health devices</string>Key packages used in this project:
- firebase_core: Firebase initialization
- firebase_auth: User authentication
- cloud_firestore: Real-time database
- firebase_messaging: Push notifications
- flutter_local_notifications: Local notifications
- geolocator: Location services
- http: API communication
- permission_handler: Runtime permissions
The app follows a modern, clean design system:
- Primary Color: Blue (#3B82F6)
- Secondary Color: Purple (#8B5CF6)
- Accent Color: Green (#10B981)
- Error Color: Red (#EF4444)
- Typography: System default with custom weights
- All API calls use HTTPS
- User authentication via Firebase Auth
- Data encrypted in transit
- Role-based access control
- Secure token management
- Real-time health metrics display
- AI-powered health score
- Quick stats grid
- Emergency SOS button
- Real-time notifications
- Priority-based categorization
- Fall detection status
- GPS tracking indicator
- User information display
- Connected doctor details
- Medical history tracking
- Emergency contacts
Run tests:
flutter testflutter build apk --releaseflutter build ios --release- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
The app expects the following API endpoints:
GET /health-data/:userId/latest- Get latest health dataGET /health-data/:userId/history- Get health historyPOST /health-data/sync- Sync health dataGET /health-score/:userId- Get health scoreGET /alerts/:userId- Get user alertsPOST /emergency/sos- Trigger emergencyGET /users/:userId- Get user profileGET /users/:userId/doctor- Get connected doctor
- Wearable device integration (ESP32 + MPU6050)
- Machine learning model integration
- Telemedicine video calls
- Medication reminders
- Health report generation
- Multi-language support
- Dark mode
- Offline mode with sync
This project is licensed under the MIT License - see the LICENSE file for details.
- Palak Choithani - Initial work
- Flutter team for the amazing framework
- Firebase for backend services
- The open-source community
For support, email support@healthcompanion.com or open an issue in the repository.
Made with โค๏ธ for better healthcare# Fall.detection.app