Project Name: Caregiver App
Developer: Asmit Jain
Guidance: Dr. Avinash Gautam
Technology Stack: Flutter (Dart), Firebase
Project Type: Healthcare Mobile Application
Date: 29-11-25
- Executive Summary
- Project Overview
- Architecture & Technology Stack
- System Architecture
- Features & Functionality
- Database Structure
- User Roles & Workflows
- Code Organization & Structure
- Dependencies & Libraries
- User Interface Design
- Future Improvements
- Conclusion
CareGiver App is a comprehensive mobile healthcare application developed using Flutter framework that facilitates seamless communication and coordination between caregivers and patients. The application serves as a digital healthcare platform offering features including appointment booking, real-time messaging, medication management, inventory tracking, and caregiver request systems. The project leverages Firebase as its backend infrastructure, providing real-time data synchronization, authentication, and cloud storage capabilities.
Key Highlights:
- Dual-role application supporting both Caregiver and Patient interfaces
- Real-time messaging and appointment management
- Comprehensive medication scheduling with notification system
- Inventory management with low-stock alerts
- Location-based caregiver discovery
- Modern Material Design 3 UI implementation
The application addresses the need for a centralized healthcare management system that:
- Enables patients to find and book appointments with caregivers
- Facilitates caregiver-patient communication through real-time chat
- Manages medication schedules with automated reminders
- Tracks medical inventory for healthcare facilities
- Allows patients to request caregiver assistance
- Patients: Individuals seeking medical consultation and managing their healthcare needs
- Caregivers: Healthcare providers managing appointments, patient records, and medication schedules
The application streamlines healthcare interactions by providing:
- Instant caregiver discovery and appointment booking
- Real-time communication channels
- Automated medication reminders
- Efficient inventory management
- Location-based healthcare provider search
Flutter 3.4.3+
- Cross-platform mobile development framework
- Single codebase for Android and iOS
- Material Design 3 implementation
- Hot reload for rapid development
Dart Language
- Strongly typed, object-oriented programming language
- Null safety enabled
- Modern async/await patterns
Firebase Ecosystem:
-
Firebase Authentication (
firebase_auth: ^6.1.1)- Email/password authentication
- User session management
- Role-based access control
-
Firebase Realtime Database (
firebase_database: ^12.0.3)- NoSQL real-time database
- Event-driven data synchronization
- JSON tree structure
-
Firebase Storage (
firebase_storage: ^13.0.3)- Profile image storage
- Scalable cloud file storage
-
Firebase Cloud Firestore (
cloud_firestore: ^6.0.3)- Secondary database option (configured but primarily uses Realtime Database)
-
Firebase Cloud Messaging (
firebase_messaging: ^16.0.3)- Push notifications infrastructure
- Background message handling
Core Dependencies:
google_fonts: ^6.2.1- Custom typography (Plus Jakarta Sans, Poppins)intl: ^0.19.0- Internationalization and date formattinglocation: ^8.0.0- GPS location servicesgoogle_maps_flutter: ^2.6.1- Interactive maps integrationimage_picker: ^1.1.2- Gallery/camera image selectionurl_launcher: ^6.3.0- External URL and phone dialer integrationfile_picker: ^8.1.2- File system access for importssyncfusion_flutter_pdf: ^25.1.35- PDF parsing for inventory imports
Notification System:
flutter_local_notifications: ^19.5.0- Local device notificationstimezone: ^0.10.1- Timezone-aware scheduling
Pattern: Stateful Widget-based with Firebase Stream Integration
Key Components:
-
Authentication Layer
- Firebase Auth for user authentication
- Role-based routing (Caregiver vs Patient)
- Session persistence
-
Data Layer
- Firebase Realtime Database listeners
- Stream-based reactive UI updates
- Local state management using StatefulWidget
-
Presentation Layer
- Widget tree composition
- Material Design 3 components
- Custom reusable widgets
-
Service Layer
NotificationService(Singleton pattern)- Centralized notification management
- Timezone-aware scheduling
User Interaction → Widget Event Handler → Firebase Database Operation
↓
Stream Listener
↓
State Update
↓
UI Rebuild
Login Page (lib/auth/login_page.dart)
- Email and password authentication
- Form validation
- Password visibility toggle
- Error handling with user-friendly dialogs
- Automatic role detection (Caregiver/Patient)
- Navigation to appropriate home screen
Registration Page (lib/auth/signup_screen.dart)
- Dual-role registration (Caregiver/Patient)
- Comprehensive form with validation:
- Email, password, phone number
- First name, last name
- City selection (Delhi, Uttar Pradesh, Guwahati, Tezpur)
- Profile image upload
- Location capture (latitude/longitude)
- Caregiver-specific fields:
- Qualification
- Category (Dentist, Cardiology, Oncology, Surgeon)
- Years of experience
- Profile image storage in Firebase Storage
- Automatic user profile creation in Firebase Database
Splash Screen (lib/splash_screen.dart)
- Elegant branded loading screen
- Automatic authentication check
- Role-based navigation
- 2-second delay for branding visibility
Bottom navigation with 4 tabs:
- Home (Caregiver List)
- Requests (Caregiver Requests)
- Chat
- Profile
- Browse available caregivers by category
- View caregiver profiles with:
- Profile image
- Name and category
- City location
- Rating information
- Caregiver detail page features:
- Full profile information
- Phone call integration
- Chat initiation
- Google Maps location view
- Appointment booking form:
- Date picker
- Time picker
- Description field
- Real-time appointment submission
- Patient profile selection
- Quick request buttons:
- Water refill
- Next medication
- Assistance to restroom
- Pain relief
- Vitals check
- Custom request messaging
- Medication-linked requests (from medication schedule)
- Request status tracking:
- Pending
- In-progress
- Resolved
- Real-time request history
- List of previous conversations
- Direct messaging with caregivers
- Real-time message synchronization
Bottom navigation with 6 tabs:
- Home (Requests)
- Patients
- Medication
- Chat
- Profile
- Inventory
- Tabbed interface:
- Appointments Tab: View appointment requests from patients
- See appointment details (date, time, description)
- Status management (Accepted, Rejected, Completed)
- Real-time updates
- Patient Requests Tab: Manage caregiver requests
- View patient requests with status
- Update request status (pending → in-progress → resolved)
- See linked medications
- Timestamp tracking
- Appointments Tab: View appointment requests from patients
- Create patient profiles
- Add patient information:
- Name, age, date of birth
- Phone number
- Medical history
- Medication needs
- Edit existing patient records
- Delete patient profiles
- Real-time patient list display
- Patient selection dropdown
- Add medication schedules:
- Medication name
- Dosage information
- Frequency
- Time of day
- Conflict detection (prevents duplicate times)
- Edit existing schedules
- Automatic daily notification scheduling
- Visual schedule display with time badges
- Real-time synchronization
-
Core Features:
- Add medications manually
- Import from JSON/PDF files
- Real-time inventory tracking
- Low stock alerts (< 10 units)
- Expiry date tracking
- Stock reconciliation
- Reorder generation
-
Import Capabilities:
- JSON file parsing with flexible field mapping
- PDF text extraction using Syncfusion PDF library
- Automatic data normalization
-
Visual Indicators:
- Color-coded status badges (Low stock, Expiring soon, Healthy)
- Quantity and expiry date display
- Search functionality (by name or description)
-
Operations:
- Edit medication details
- Reconcile stock quantities
- Generate reorder requests
- Delete medications
- View all patient conversations
- Navigate to individual chat threads
- Real-time message updates
Features:
- Bidirectional messaging (Caregiver ↔ Patient)
- Real-time message synchronization using Firebase streams
- Message timestamps
- Chat bubble design (sent vs received)
- Auto-scrolling to latest messages
- Chat list maintenance for conversation history
Implementation:
- Firebase Realtime Database structure:
/Chat: Stores individual messages/ChatList: Maintains conversation relationships
Capabilities:
- Local notifications (Android & iOS)
- Scheduled notifications
- Daily recurring notifications
- Timezone-aware scheduling
- Notification channels (main, scheduled, daily)
Use Cases:
- Low inventory alerts
- Medication reminders
- Request confirmations
Unified Profile View:
- Displays user information based on role
- Shows profile picture
- Contact information
- Role-specific details:
- Caregivers: Category, Qualification
- Patients: City, Contact info
- Appointment history
- Logout functionality
/
├── Doctors/
│ └── {doctorUID}/
│ ├── uid
│ ├── email
│ ├── firstName
│ ├── lastName
│ ├── phoneNumber
│ ├── city
│ ├── latitude
│ ├── longitude
│ ├── profileImageUrl
│ ├── qualification
│ ├── category
│ ├── yearsOfExperience
│ ├── totalReviews
│ ├── averageRating
│ └── numberOfReviews
│
├── Patients/
│ └── {patientUID}/
│ ├── uid
│ ├── email
│ ├── firstName
│ ├── lastName
│ ├── phoneNumber
│ ├── city
│ ├── latitude
│ ├── longitude
│ ├── profileImageUrl
│ ├── age (optional)
│ ├── dob (optional)
│ ├── medicalHistory (optional)
│ └── medicationNeeds (optional)
│
├── Requests/
│ └── {requestId}/
│ ├── id
│ ├── date
│ ├── time
│ ├── description
│ ├── sender (patientUID)
│ ├── receiver (doctorUID)
│ └── status (pending/Accepted/Rejected/Completed)
│
├── CaregiverRequests/
│ └── {patientUID}/
│ └── {requestId}/
│ ├── message
│ ├── status (pending/in-progress/resolved)
│ ├── medication (optional)
│ └── timestamp
│
├── MedicationSchedules/
│ └── {patientUID}/
│ └── {scheduleId}/
│ ├── medication
│ ├── dosage
│ ├── frequency
│ ├── time
│ └── timestamp
│
├── inventory/
│ └── {itemId}/
│ ├── name
│ ├── quantity
│ ├── expiryDate (ISO8601 string)
│ └── description
│
├── Chat/
│ └── {messageId}/
│ ├── message
│ ├── sender (UID)
│ ├── receiver (UID)
│ └── timestamp (ISO8601)
│
└── ChatList/
└── {userUID}/
└── {chatPartnerUID}/
└── id
- Appointments: Patient (sender) → Caregiver (receiver)
- Chats: Bidirectional (both users maintain ChatList entry)
- Medication Schedules: Patient-specific nested structure
- Inventory: Global list accessible to all caregivers
- Caregiver Requests: Patient-specific with nested requests
-
Registration/Login
Splash Screen → Login/Register → Role Detection → Patient Home -
Finding a Caregiver
Home Tab → Browse Caregivers → Select Category → View Details → Book Appointment -
Booking Appointment
Caregiver Details → Select Date/Time → Add Description → Submit → Status Tracking -
Sending Caregiver Request
Requests Tab → Select Profile → Choose Quick Request OR Custom Message → Submit -
Medication-Linked Request
Requests Tab → View Medication Schedule → Select Medication → Add Note → Send Request -
Chatting with Caregiver
Chat Tab → Select Conversation → Send/Receive Messages
-
Registration/Login
Splash Screen → Login/Register → Role Detection → Caregiver Home -
Managing Appointments
Home Tab → View Requests → Accept/Reject/Complete → Status Update -
Managing Patient Requests
Home Tab → Patient Requests Tab → View Requests → Update Status -
Creating Patient Profiles
Patients Tab → Add Patient → Fill Form → Save -
Scheduling Medications
Medication Tab → Select Patient → Add Schedule → Set Time → Save → Notification Created -
Inventory Management
Inventory Tab → Add/Import Medications → Monitor Stock → Reconcile → Reorder
lib/
├── auth/
│ ├── login_page.dart
│ └── signup_screen.dart
│
├── doctor/
│ ├── doctor_chatlist_page.dart
│ ├── doctor_details_page.dart
│ ├── doctor_home_page.dart
│ ├── doctor_list_page.dart
│ ├── doctor_profile.dart
│ ├── doctor_requests_page.dart
│ ├── model/
│ │ ├── booking.dart
│ │ ├── doctor.dart
│ │ └── patient.dart
│ └── widget/
│ └── doctor_card.dart
│
├── patient/
│ ├── caregiver_request_page.dart
│ ├── chat_list_page.dart
│ └── patient_home_page.dart
│
├── model/
│ └── medication_inventory.dart
│
├── services/
│ └── notification_service.dart
│
├── chat_screen.dart
├── firebase_options.dart
├── inventory_management_page.dart
├── main.dart
├── medication_schedule_page.dart
├── patient_profile_management_page.dart
├── profile_page.dart
└── splash_screen.dart
1. State Management:
- StatefulWidget for local state
- StreamBuilder for real-time data
- setState() for UI updates
2. Service Pattern:
- Singleton NotificationService
- Centralized notification management
3. Model Classes:
- Factory constructors for Firebase data mapping
- toMap() methods for serialization
- Null-safe data handling
4. Widget Composition:
- Reusable custom widgets
- Material Design 3 components
- Consistent styling via Theme
5. Error Handling:
- Try-catch blocks for async operations
- User-friendly error messages
- Loading states for async operations
dependencies:
flutter:
sdk: flutter
# Firebase Services
firebase_core: ^4.2.0
firebase_auth: ^6.1.1
firebase_database: ^12.0.3
cloud_firestore: ^6.0.3
firebase_storage: ^13.0.3
firebase_messaging: ^16.0.3
# UI & Design
cupertino_icons: ^1.0.6
google_fonts: ^6.2.1
# Utilities
intl: ^0.19.0
location: ^8.0.0
url_launcher: ^6.3.0
image_picker: ^1.1.2
file_picker: ^8.1.2
# Features
google_maps_flutter: ^2.6.1
flutter_local_notifications: ^19.5.0
syncfusion_flutter_pdf: ^25.1.35
timezone: ^0.10.1dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^6.0.0Total Dependencies: 18 production, 2 development
Key Dependency Purposes:
- Firebase Suite: Complete backend infrastructure
- Google Fonts: Brand consistency and typography
- Location Services: GPS-based caregiver discovery
- File Handling: Inventory import capabilities
- Notifications: Medication reminders and alerts
- Maps Integration: Location visualization
Theme Configuration (lib/main.dart):
- Primary Color: Royal Blue (#2563EB)
- Secondary Color: Emerald Green (#10B981)
- Background: Slate 50 (#F8FAFC)
- Surface: White
- Error Color: Red 500 (#EF4444)
Typography:
- Font Family: Plus Jakarta Sans (via Google Fonts)
- Brand Font: Poppins (for specific UI elements)
- Hierarchical text styles
Material Design 3:
- Elevated buttons with rounded corners (12px radius)
- Cards with subtle borders and elevation
- Input fields with filled background
- Consistent spacing (8px, 16px, 24px, 32px)
-
Splash Screen
- Gradient background (Dark to Blue)
- Centered logo/image
- App branding text
- Loading indicator
-
Authentication Screens
- Clean form layouts
- Custom input fields with blue borders
- Password visibility toggle
- Role selection chips
-
Home Screens
- Bottom navigation bars
- Card-based content display
- Search functionality
- Category filters
-
Lists & Cards
- Caregiver cards with profile images
- Medication cards with status badges
- Appointment cards with status indicators
- Request cards with color-coded status
-
Forms & Dialogs
- Modal dialogs for actions
- Date/time pickers
- Dropdown selectors
- Multi-line text inputs
-
Robotic Integration:
- Implement a Robotic arm
- Data would be tranferred and sync across
- Control from the app
-
Database Security:
- Implement comprehensive Firebase security rules
- Add server-side validation
- Implement data access controls
-
Error Handling:
- Comprehensive error handling
- User-friendly error messages
- Retry mechanisms
- Offline mode support
-
Testing:
- Increase unit test coverage to 70%+
- Add widget tests for key components
- Implement integration tests
-
Performance:
- Implement pagination for lists
- Add image caching
- Optimize database queries
- Lazy loading for large datasets
-
Advanced Features:
- Video consultation integration
- File sharing in chat
- Prescription generation and printing
- Appointment reminders via notifications
- Rating and review system
-
Analytics:
- Firebase Analytics integration
- User behavior tracking
- Performance monitoring
- Crash reporting (Firebase Crashlytics)
-
Payment Integration:
- Stripe/PayPal integration
- Appointment payment
- Transaction history
-
Enhanced Notifications:
- Push notifications for appointments
- Medication reminder improvements
- Request status notifications
-
Compliance:
- HIPAA compliance implementation
- GDPR compliance (if international)
- Medical data encryption
- Audit logging
-
Advanced Healthcare Features:
- Electronic Health Records (EHR)
- Lab report integration
- Medical imaging support
- Telemedicine capabilities
-
AI Integration:
- Symptom checker
- Appointment recommendations
- Medication interaction warnings
- Health insights
-
Multi-platform:
- Web application version
- Desktop application
- Admin dashboard
-
Internationalization:
- Multi-language support
- Regional customization
- Currency support
The Caregiver App application represents a comprehensive healthcare management solution built with modern mobile development technologies. The project successfully implements core features including appointment booking, real-time messaging, medication management, and inventory tracking. The use of Flutter ensures cross-platform compatibility, while Firebase provides a robust and scalable backend infrastructure.
✅ Functional Application: All core features are implemented and functional
✅ Modern UI/UX: Material Design 3 implementation with consistent theming
✅ Real-time Synchronization: Firebase Realtime Database enables live updates
✅ Role-based System: Separate interfaces for Caregivers and Patients
✅ Notification System: Automated reminders and alerts
✅ Comprehensive Features: Multiple healthcare management modules
- Well-structured codebase with logical organization
- Modern technology stack using industry-standard tools
- Real-time capabilities for improved user experience
- Scalable architecture with Firebase backend
- Feature-rich application covering multiple use cases
This project demonstrates strong software development skills, understanding of mobile application architecture, and practical implementation of healthcare technology solutions. With the recommended improvements, the application has the potential to serve as a production-ready healthcare management platform.
The codebase is well-organized, functional, and demonstrates understanding of:
- Mobile application development
- Backend integration
- Real-time systems
- User experience design
- Database management
- Total Dart Files: ~26
- Lines of Code: ~5,000+ (estimated)
- Models: 4 classes
- Screens: 20+ pages
- Services: 1 singleton service
- Project ID: medicapp-f2c65
- Database URL: https://medicapp-f2c65-default-rtdb.firebaseio.com
- Storage Bucket: medicapp-f2c65.firebasestorage.app
- Flutter SDK: 3.4.3+
- Dart SDK: 3.4.3+
- Target Platforms: Android, iOS