Skip to content

alihaidar0/adwiah-flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adwiah Logo

Adwiah

MedTech · Medication Tracker & Smart Reminder System

Flutter Dart Firebase GetX Architecture License

Adwiah is a cross-platform Flutter mobile application that helps patients track medications, schedule doctor visits, and receive intelligent reminders — built with MVVM architecture and GetX state management.

Features · Architecture · Project Structure · Getting Started · Screenshots


🌟 Features

Feature Description
💊 Medication Tracker Add, schedule, and track daily medications with smart reminders
👨‍⚕️ Doctor Visits Log appointments and maintain a full visit history
🔔 Smart Reminders Background service-powered push notifications for medication times
🔍 Drug Search Search medications by trade name, ingredient, or barcode
🧬 Drug Interactions Study interactions between multiple medications with severity analysis
💉 Dosage Information Detailed dosage guides and monographs per drug
🗺️ Pharmacy Locator Find the nearest pharmacies using Google Maps & geolocation
🏥 Medical Centers Browse and navigate to nearby medical centers
🔐 Firebase Auth Secure email/password authentication with verification
🌍 Multi-language RTL support with Arabic-first design using Cairo font
📷 Barcode Scanner Scan drug barcodes to retrieve medication info instantly
📋 Prescriptions Manage doctor prescriptions and patient profiles

🏗️ Architecture

Adwiah follows the MVVM (Model-View-ViewModel) architectural pattern, with GetX as the state management, dependency injection, and routing solution.

graph TD
    subgraph View Layer
        V[View / UI Widgets]
        C[Components / Reusable Widgets]
    end

    subgraph ViewModel Layer
        VM[ViewModel - GetX Controllers]
        B[Bindings - GetX DI]
    end

    subgraph Model Layer
        M[Models - Data Classes]
        S[Services - API & Business Logic]
        NS[Network Service - HTTP]
    end

    subgraph External
        FB[Firebase Auth]
        API[REST API Backend]
        GM[Google Maps]
        BG[Background Service]
        ST[GetStorage / SecureStorage]
    end

    V -->|observes Rx| VM
    VM -->|calls| S
    S -->|HTTP| NS
    NS -->|requests| API
    S -->|reads/writes| ST
    VM -->|auth calls| FB
    VM -->|map calls| GM
    VM -->|notification| BG
    B -->|injects| VM
    M <-->|data transfer| S
Loading

Layer Responsibilities

Layer Folder Responsibility
View lib/View/ UI screens, forms, and navigation
ViewModel */View_Model/ or */ViewModel/ Business logic, state, and GetX controllers
Model lib/Models/ Data classes and JSON serialization
Service lib/services/ API calls, Firebase, background tasks
Widget lib/widgets/ Shared, reusable UI components
Utils lib/utils/ Validators, DB helpers, storage controllers
Constants lib/constants/ App-wide constants and helpers
Binding lib/Binding/ GetX dependency injection bindings

📁 Project Structure

graph LR
    Root["📦 adwiah/"]

    Root --> Lib["📂 lib/"]
    Root --> Assets["📂 assets/"]
    Root --> Android["📂 android/"]
    Root --> IOS["📂 ios/"]

    Lib --> Main["main.dart"]
    Lib --> Binding["📂 Binding/\nbinding.dart"]
    Lib --> Models["📂 Models/\n23 data models"]
    Lib --> View["📂 View/"]
    Lib --> Services["📂 services/"]
    Lib --> Widgets["📂 widgets/"]
    Lib --> Utils["📂 utils/"]
    Lib --> Constants["📂 constants/"]

    View --> Auth["📂 AuthPages"]
    View --> Home["📂 Home"]
    View --> Patient["📂 PatienProfile"]
    View --> Brands["📂 Brands"]
    View --> Disease["📂 Disease"]
    View --> Map["📂 Map"]
    View --> Barcode["📂 Barcode"]
    View --> Interactions["📂 StudyInteractions"]
    View --> Drawer["📂 Drawer"]
    View --> Ingredients["📂 Ingredients"]

    Assets --> Fonts["📂 fonts/ (Cairo family)"]
    Assets --> Images["📂 images/"]
    Assets --> Icons["📂 icons/"]
Loading

🔀 Navigation Flow

flowchart TD
    Start([App Launch]) --> Splash[Splash Screen\nInitial Data Load]
    Splash --> AuthCheck{Authenticated?}

    AuthCheck -->|No| Auth[Login / Register]
    Auth --> Verify[Email Verification]
    Verify --> Home

    AuthCheck -->|Yes| Home[🏠 Home Screen]

    Home --> Search[Drug Search\nby Name / Disease]
    Home --> Barcode[📷 Barcode Scanner]
    Home --> Brands[Trade Names List]
    Home --> Ingredients[Active Ingredients]
    Home --> Interactions[Study Interactions]
    Home --> Map[🗺️ Pharmacy Locator]
    Home --> Patient[👤 Patient Profile]
    Home --> DrawerNav[☰ Drawer Menu]

    DrawerNav --> About[About App]
    DrawerNav --> Medical[Medical Centers]
    DrawerNav --> Countries[Countries]
    DrawerNav --> News[News & Letters]
    DrawerNav --> Profile[Edit Profile]

    Patient --> Meds[My Medications]
    Patient --> Visits[Doctor Visits]
    Patient --> Prescriptions[Prescriptions]
    Patient --> Notifications[🔔 Reminders]
    Patient --> Doctors[Doctor List]

    Brands --> BrandDetail[Brand Detail\nDosage · Ingredients · Similar]
    Ingredients --> IngredDetail[Ingredient Detail\nMonograph · Interactions]
    Disease --> DiseaseDrugs[Disease Drugs\nSearch by Indication]
Loading

🔄 Data & Auth Flow

sequenceDiagram
    actor User
    participant App as Flutter App
    participant GetX as GetX Controller
    participant Service as Service Layer
    participant API as REST API
    participant Firebase as Firebase Auth
    participant BG as Background Service

    User->>App: Open App
    App->>GetX: Initialize Bindings
    GetX->>Service: loadInitialData()
    Service->>API: GET /version, /countries
    API-->>Service: Response
    Service-->>GetX: Update Rx state
    GetX-->>App: Reactive UI update

    User->>App: Login
    App->>GetX: signIn(email, password)
    GetX->>Firebase: signInWithEmailAndPassword()
    Firebase-->>GetX: UserCredential
    GetX->>Service: fetchPatientProfile(uid)
    Service->>API: GET /patient/{uid}
    API-->>Service: Patient data
    GetX-->>App: Navigate to Home

    User->>App: Add Medication Reminder
    App->>GetX: saveReminder(drug, time)
    GetX->>Service: storeReminder()
    Service->>BG: scheduleNotification()
    BG-->>User: 🔔 Push Notification at scheduled time
Loading

🚀 Getting Started

Prerequisites

  • Flutter SDK >=2.16.1 <3.0.0
  • Dart SDK >=2.16.1
  • Android Studio or VS Code with Flutter extension
  • Firebase project configured (Android google-services.json + iOS GoogleService-Info.plist)
  • Google Maps API key

Installation

# 1. Clone the repository
git clone git@github.com-freelance:alihaidar0/adwiah.git
cd adwiah

# 2. Install dependencies
flutter pub get

# 3. Add Firebase config files
#    android/app/google-services.json
#    ios/Runner/GoogleService-Info.plist

# 4. Add Google Maps API key in android/app/src/main/AndroidManifest.xml
#    <meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_KEY"/>

# 5. Run the app
flutter run

Environment Setup

Config File Location Required
Firebase Android android/app/google-services.json ✅ Yes
Firebase iOS ios/Runner/GoogleService-Info.plist ✅ Yes
Google Maps Key AndroidManifest.xml ✅ Yes
API Base URL lib/constants/constans.dart ✅ Yes

⚠️ Note: The google-services.json, GoogleService-Info.plist, and any API keys are excluded from this repository. You must configure your own Firebase project and Maps key.


📦 Key Dependencies

Package Version Purpose
get ^4.6.1 State management, routing, DI
get_storage ^2.0.3 Lightweight local storage
firebase_auth ^3.3.10 User authentication
flutter_background_service ^1.0.4 Background reminders
google_maps_flutter latest Pharmacy/center locator
flutter_barcode_scanner ^2.0.0 Drug barcode scanning
geolocator ^8.2.0 Device location
flutter_secure_storage ^5.0.2 Secure token storage
cached_network_image ^3.2.0 Optimized image loading
http ^0.13.4 REST API communication
flutter_html ^2.2.1 HTML content rendering
azlistview ^2.0.0 Alphabetical drug list scroll
animations ^2.0.2 Page transition animations

📸 Screenshots

Screenshots coming soon. Run the app locally to explore the full UI.

Home Patient Profile Drug Search Pharmacy Map
assets/images/home.png assets/images/patient_profile.png assets/images/trade_names.png assets/images/find_ph.png

🧱 Tech Stack

  • Framework: Flutter (Dart)
  • Architecture: MVVM
  • State Management: GetX
  • Backend: REST API + Firebase Auth
  • Local Storage: GetStorage + FlutterSecureStorage
  • Maps: Google Maps Flutter
  • Notifications: Flutter Background Service
  • Font: Cairo (Arabic RTL support)

About

Flutter MedTech app — medication tracker, doctor visit scheduler & smart reminders. Built with MVVM + GetX. Firebase Auth, barcode scanning, Google Maps pharmacy locator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors