A comprehensive, state-of-the-art Medical Record application built with Flutter. This project serves as a complete document scanner, OCR (Optical Character Recognition) module, and health record management app. It features seamless integration with Firebase and a custom Node.js Webhook Backend for India's Ayushman Bharat Digital Mission (ABDM) Health Information User (HIU) integration.
- Secure Authentication: Integrated with Firebase Auth and Google Sign-in.
- Document Scanning: High-quality document scanning using Google ML Kit.
- Text Recognition (OCR): Extract text directly from scanned documents and images using Google ML Kit.
- Image Capture: Direct camera integration and image picking capabilities.
- Cloud Storage: Securely store and retrieve medical records using Cloud Firestore and Firebase Storage.
- Premium UI/UX: Designed with a modern medical teal and deep blue color palette, utilizing Google Fonts (Outfit).
- State Management: Robust state handling using
Provider.
- ABDM HIU Integration: Handles Phase 3 webhooks for ABDM.
- Consent Management: Processes patient consent requests (
/v0.5/consent-requests/on-init) and consent notifications (/v0.5/consents/hiu/notify). - Secure Data Transfer: Receives encrypted FHIR records (
/v0.5/health-information/hiu/on-request) and decrypts them using Diffie-Hellman Key Exchange.
Mobile Frontend
- Flutter (Dart)
- Provider (State Management)
- Google ML Kit (Document Scanner & Text Recognition)
- Firebase (Core, Auth, Firestore, Storage)
Backend Server
- Node.js & Express.js
- Crypto (for Diffie-Hellman Key generation and AES decryption)
├── abha-backend/ # Node.js ABDM HIU Webhook server
│ ├── server.js # Express server and webhook endpoints
│ ├── crypto_utils.js # Encryption/Decryption utilities
│ └── package.json # Backend dependencies
├── lib/ # Flutter App source code
│ ├── main.dart # App entry point and theme setup
│ ├── screens/ # UI Screens (Login, Main Shell, etc.)
│ └── services/ # Business logic (AuthService, AbhaService)
├── android/ # Android native code
├── ios/ # iOS native code
└── pubspec.yaml # Flutter dependencies
- Flutter SDK (>=3.16.0)
- Node.js (for the backend)
- A Firebase Project (with Auth, Firestore, and Storage enabled)
- ngrok (for exposing the local backend to ABDM sandbox)
- Clone the repository and navigate to the project directory:
cd "ABHA synced App"
- Install Flutter dependencies:
flutter pub get
- Ensure your
firebase_options.dartand Firebase configuration files (google-services.jsonfor Android,GoogleService-Info.plistfor iOS) are correctly placed. - Run the app:
flutter run
- Navigate to the backend directory:
cd abha-backend - Install Node.js dependencies:
npm install
- Start the server:
(The server runs on port 3000 by default)
npm start
- To test ABDM webhooks locally, use ngrok to expose your port:
Update your ABDM Sandbox Webhook URL with the generated ngrok URL.
ngrok http 3000