Skip to content

Palakchoithani/Fall.detection.app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Health Companion - AI-Driven Predictive Health & Fall Detection App

A comprehensive Flutter mobile application for real-time health monitoring, fall detection, and AI-powered predictive healthcare.

โšก Quick Start

# 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

๐Ÿ“ฑ Features

  • 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

๐Ÿ—๏ธ Project Structure

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

๐Ÿš€ Getting Started

Prerequisites

  • Flutter SDK (3.0.0 or higher)
  • Dart SDK
  • Android Studio / Xcode
  • Firebase Account

Installation

  1. Clone the repository
git clone https://github.com/palakchoithani/fall.detection.app.git
cd fall.detection.app
  1. Install dependencies
flutter pub get
  1. 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) or GoogleService-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

  2. Update API Endpoint

    Edit lib/services/api_service.dart:

    static const String baseUrl = 'YOUR_API_ENDPOINT';
  3. Run the app

On Web (Chrome):

flutter run -d chrome

On Android:

flutter run -d android

On iOS:

flutter run -d ios

Or simply:

flutter run

๐Ÿ”ง Configuration

Android Permissions

Add 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"/>

iOS Permissions

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>

๐Ÿ“ฆ Dependencies

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

๐ŸŽจ Design System

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

๐Ÿ” Security

  • All API calls use HTTPS
  • User authentication via Firebase Auth
  • Data encrypted in transit
  • Role-based access control
  • Secure token management

๐Ÿ“Š Features Implementation

Dashboard

  • Real-time health metrics display
  • AI-powered health score
  • Quick stats grid
  • Emergency SOS button

Alerts System

  • Real-time notifications
  • Priority-based categorization
  • Fall detection status
  • GPS tracking indicator

Profile Management

  • User information display
  • Connected doctor details
  • Medical history tracking
  • Emergency contacts

๐Ÿงช Testing

Run tests:

flutter test

๐Ÿ“ฑ Build for Production

Android

flutter build apk --release

iOS

flutter build ios --release

๐Ÿค Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ Backend API Endpoints

The app expects the following API endpoints:

  • GET /health-data/:userId/latest - Get latest health data
  • GET /health-data/:userId/history - Get health history
  • POST /health-data/sync - Sync health data
  • GET /health-score/:userId - Get health score
  • GET /alerts/:userId - Get user alerts
  • POST /emergency/sos - Trigger emergency
  • GET /users/:userId - Get user profile
  • GET /users/:userId/doctor - Get connected doctor

๐Ÿ”ฎ Future Enhancements

  • 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

๐Ÿ“„ License

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

๐Ÿ‘ฅ Authors

  • Palak Choithani - Initial work

๐Ÿ™ Acknowledgments

  • Flutter team for the amazing framework
  • Firebase for backend services
  • The open-source community

๐Ÿ“ž Support

For support, email support@healthcompanion.com or open an issue in the repository.


Made with โค๏ธ for better healthcare# Fall.detection.app

Fall.detection.app

Fall.detection.app

About

AI-powered health monitoring and fall detection app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors