Skip to content

About

๐Ÿฅ AI-Powered Healthcare Management Application built with Flutter

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

2 Commits

Folders and files

Repository files navigation

๐Ÿฅ Digital Healthcare Assistance

AI-Powered Healthcare at Your Fingertips

A comprehensive Flutter mobile application that bridges the gap between patients and healthcare services using artificial intelligence and real-time data management.

Flutter Firebase Dart License

๐Ÿ“‹ Table of Contents

๐ŸŽฏ Overview

Digital Healthcare Assistance is a modern healthcare management application built with Flutter and Firebase. It leverages AI-powered symptom analysis using the Groq API to provide preliminary health assessments, helps users find and book appointments at hospitals, manage bed reservations, and streamlines healthcare staff workflows.

The application is designed with a multi-user architecture supporting:

  • Patients - Access healthcare services and symptom analysis
  • Healthcare Staff - Manage patient appointments and bed allocations
  • Administrators - Oversee system operations and hospital management

โœจ Features

๐Ÿ‘ค User Authentication

  • Email/Password registration and login
  • Firebase Authentication integration
  • Secure session management
  • User role-based access control (Patient, Staff, Admin)

๐Ÿฉบ Symptom Analysis

  • AI-powered symptom analysis using Groq LLaMA 3.3 70B model
  • Real-time health assessment recommendations
  • Structured JSON output for consistent results
  • Free Tier: 30 requests/minute, 14,400 requests/day

๐Ÿจ Hospital Management

  • Browse available hospitals
  • View hospital details, specializations, and ratings
  • Real-time bed availability tracking
  • Hospital search and filtering

๐Ÿ“… Appointment Booking

  • Easy-to-use appointment scheduling
  • View available time slots
  • Appointment confirmation and tracking
  • Manage active and past appointments

๐Ÿ›๏ธ Bed Booking

  • Reserve hospital beds
  • Check real-time bed availability
  • Manage bed reservations
  • Emergency bed allocation

๐Ÿ“ฑ Dashboard

  • Personalized patient dashboard
  • Quick access to health records
  • Appointment and booking history
  • Emergency assistance button

โšก Emergency Services

  • One-tap emergency alerts
  • Nearby hospital location
  • Emergency contact integration

๐Ÿ“ฆ Prerequisites

Before you begin, ensure you have the following installed:

  • Flutter SDK (v3.9.2 or higher)

    • Download from flutter.dev
    • Run flutter --version to verify
  • Dart SDK (v3.9.2 or higher) - Included with Flutter

  • Android Studio or Xcode for mobile emulation/development

    • Android: SDK level 21 or higher
    • iOS: iOS 11.0 or higher
  • Git for version control

  • Groq API Key (Free tier)

  • Firebase Project Setup

    • Create a project on Firebase Console
    • Enable Authentication (Email/Password)
    • Enable Cloud Firestore
    • Download configuration files

๐Ÿš€ Installation

1. Clone the Repository

git clone https://github.com/asadullah098/digital-healthcare-assistance.git
cd digital-healthcare-assistance

2. Install Flutter Dependencies

flutter pub get

3. Install Build Runners (Required for Code Generation)

flutter pub run build_runner build

4. Set Up Flutter on Your Machine

flutter doctor

Ensure all required components are installed. Fix any issues reported.

5. Configure Android/iOS

For Android:

cd android
./gradlew build
cd ..

For iOS:

cd ios
pod install
cd ..

โš™๏ธ Configuration

Firebase Setup

  1. Create a Firebase Project

  2. Configure Android

    • Download google-services.json from Firebase Console
    • Place it in android/app/
    • Ensure this file is in .gitignore for security
  3. Configure iOS

    • Download GoogleService-Info.plist from Firebase Console
    • Add it to your iOS project using Xcode
    • Add to .gitignore for security
  4. Enable Firebase Services

    • Authentication โ†’ Enable Email/Password provider
    • Cloud Firestore โ†’ Enable with appropriate security rules
    • Storage (Optional) โ†’ For user profile pictures

Groq API Configuration

  1. Get Your API Key

    # Visit https://console.groq.com/keys
    # Sign up or log in
    # Create an API key
  2. Set Environment Variable

    For Development:

    flutter run --dart-define=GROQ_API_KEY=your_actual_key_here

    Using .env File (Local Development Only):

    • Create a .env file in the project root:
    GROQ_API_KEY=your_actual_key_here
    
    • Add to .gitignore:
    .env
    .env.local
    
    • Load in your app using flutter_dotenv package

๐Ÿ“ Project Structure

lib/
โ”œโ”€โ”€ main.dart                    # Application entry point
โ”œโ”€โ”€ models/                      # Data models
โ”‚   โ”œโ”€โ”€ appointment_model.dart
โ”‚   โ”œโ”€โ”€ bed_booking_model.dart
โ”‚   โ”œโ”€โ”€ hospital_model.dart
โ”‚   โ”œโ”€โ”€ symptom_analysis_model.dart
โ”‚   โ””โ”€โ”€ user_model.dart
โ”œโ”€โ”€ providers/                   # State management (Riverpod)
โ”‚   โ”œโ”€โ”€ auth_provider.dart
โ”‚   โ”œโ”€โ”€ booking_provider.dart
โ”‚   โ”œโ”€โ”€ hospital_provider.dart
โ”‚   โ””โ”€โ”€ symptom_provider.dart
โ”œโ”€โ”€ screens/                     # UI Screens
โ”‚   โ”œโ”€โ”€ auth/                    # Authentication screens
โ”‚   โ”œโ”€โ”€ patient/                 # Patient-specific screens
โ”‚   โ”œโ”€โ”€ staff/                   # Staff management screens
โ”‚   โ””โ”€โ”€ admin/                   # Admin panel screens
โ”œโ”€โ”€ services/                    # Business logic & API calls
โ”‚   โ”œโ”€โ”€ auth_service.dart
โ”‚   โ”œโ”€โ”€ grok_api_service.dart    # Groq API integration
โ”‚   โ””โ”€โ”€ hospital_service.dart
โ”œโ”€โ”€ utils/                       # Utilities & constants
โ”‚   โ”œโ”€โ”€ app_theme.dart           # Theme configuration
โ”‚   โ””โ”€โ”€ constants.dart           # App constants
โ”œโ”€โ”€ widgets/                     # Reusable UI components
โ”‚   โ””โ”€โ”€ dashboard_card.dart
โ””โ”€โ”€ firebase_options.dart        # Firebase configuration

android/                         # Android native code
ios/                            # iOS native code
test/                           # Unit and widget tests

๐ŸŽฎ Usage

Starting the Application

For Development:

# Run on connected device or emulator
flutter run

# With API key
flutter run --dart-define=GROQ_API_KEY=your_key

For Release Build:

flutter build apk --release          # Android APK
flutter build appbundle --release     # Android App Bundle
flutter build ios --release           # iOS (requires macOS)

Key Workflows

1. Patient Registration & Login

  • Launch app โ†’ Register with email/password
  • Firebase authenticates and creates user profile

2. Symptom Analysis

  • Go to "Symptom Analysis"
  • Enter your symptoms
  • AI analyzes and provides health recommendations
  • View results and next steps

3. Hospital Search & Booking

  • Search for hospitals by name/location
  • View hospital details and ratings
  • Book appointments for specific dates/times
  • Confirm booking and receive confirmation

4. Bed Reservation

  • Check available beds
  • Select bed and duration
  • Complete reservation
  • Track reservation status

๐Ÿ—๏ธ Architecture

State Management

  • Riverpod: Modern state management solution for Flutter
  • Providers for auth, booking, hospitals, and symptom analysis
  • Reactive updates across the UI

Backend

  • Firebase Firestore: Real-time database
  • Firebase Authentication: Secure user management
  • Groq API: AI-powered symptom analysis

Design Pattern

  • MVVM-like architecture with Riverpod
  • Separation of concerns (Services, Providers, UI)
  • Reusable widgets and components

API Integration

  • HTTP Client: For Groq API calls
  • Firebase SDKs: Real-time database operations
  • JSON serialization/deserialization

๐Ÿ”’ Security Best Practices

  1. Never commit secrets to version control
  2. Use environment variables for API keys
  3. Enable Firestore Security Rules to restrict database access
  4. Implement Firebase Authentication for user verification
  5. Use HTTPS for all API communications
  6. Keep dependencies updated regularly

๐Ÿ“š Dependencies

Key dependencies used in this project:

flutter:
  sdk: flutter
flutter_riverpod: ^3.3.1          # State management
firebase_core: ^3.13.0            # Firebase core
firebase_auth: ^5.6.0             # Authentication
cloud_firestore: ^5.6.7           # Firestore database
http: ^1.6.0                      # HTTP requests
google_fonts: ^8.0.2              # Custom fonts
intl: ^0.20.2                     # Internationalization
shared_preferences: ^2.5.5        # Local storage
url_launcher: ^6.3.1              # URL handling

See pubspec.yaml for complete list.

๐Ÿค Contributing

Contributions are welcome! To contribute:

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

Development Guidelines

  • Follow Dart style guide
  • Write meaningful commit messages
  • Test your changes before submitting PR
  • Update documentation as needed

๐Ÿ“ License

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

๐Ÿ†˜ Support & Contact

Issues & Bug Reports

Documentation

Contact

๐Ÿ“ˆ Roadmap

  • Push notifications for appointments
  • Prescription digital management
  • Video consultation support
  • Multi-language support
  • Offline mode capabilities
  • Payment gateway integration
  • Insurance verification
  • Medical records export

๐Ÿ™ Acknowledgments

  • Flutter - UI framework
  • Firebase - Backend services
  • Groq - AI API
  • Riverpod - State management
  • All contributors and the open-source community

Made with โค๏ธ for better healthcare access

Last Updated: August 2026

About

๐Ÿฅ AI-Powered Healthcare Management Application built with Flutter

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages