A comprehensive Flutter application for monitoring groundwater stations and estimating recharge rates using advanced sensor data analysis.
- Real-time Monitoring: Live data from groundwater monitoring stations
- Interactive Maps: Google Maps integration with station markers
- Data Visualization: Time-series charts for water level, temperature, pH, and recharge rates
- Recharge Estimation: Multiple algorithms for groundwater recharge calculation
- Push Notifications: Alerts for station status and recharge rate changes
- Background Sync: Automatic data synchronization
- Secure Storage: Encrypted local data storage
- Offline Support: Local caching with Hive database
- MVVM Pattern: Clean separation of concerns
- State Management: Riverpod for reactive state management
- Navigation: go_router for declarative routing
- Local Storage: Hive for offline data persistence
- Networking: Dio for HTTP requests
- Maps: Google Maps Flutter plugin
- Charts: FL Chart for data visualization
Screenshots will be added after UI implementation
- Flutter SDK (3.8.1 or higher)
- Dart SDK (3.0.0 or higher)
- Android Studio / VS Code
- Git
-
Clone the repository
git clone <repository-url> cd jalnetra
-
Install dependencies
flutter pub get
-
Generate code
flutter packages pub run build_runner build
-
Configure Firebase (Optional)
- Create a Firebase project
- Add
google-services.jsontoandroid/app/ - Add
GoogleService-Info.plisttoios/Runner/
-
Configure Google Maps (Required for maps)
- Get Google Maps API key
- Add to
android/app/src/main/AndroidManifest.xml:<meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_API_KEY"/>
- Add to
ios/Runner/AppDelegate.swift:GMSServices.provideAPIKey("YOUR_API_KEY")
-
Set API Base URL
- Open
lib/services/api_service.dart - Update
_baseUrlconstant:static const String _baseUrl = 'https://your-api-domain.com/v1';
- Open
-
Set API Key
- Update
_apiKeyconstant:static const String _apiKey = 'your-actual-api-key';
- Or use secure storage for production:
final apiKey = await SecureStorageService.instance.retrieve('api_key');
- Update
To switch from Google Maps to OpenStreetMap:
-
Update pubspec.yaml
dependencies: # Remove: google_maps_flutter: ^2.6.1 # Add: flutter_map: ^6.1.0
-
Update map implementation
- Replace Google Maps widgets with Flutter Map widgets
- Update
lib/screens/home_screen.dartmap implementation
-
Firebase Setup
- Enable Firebase Cloud Messaging
- Configure notification channels
-
Local Notifications
- Update notification icons in
android/app/src/main/res/ - Configure notification permissions
- Update notification icons in
-
Debug Mode
flutter run
-
Release Mode
flutter run --release
-
Build APK
flutter build apk --release
-
Build iOS
flutter build ios --release
lib/
βββ main.dart # App entry point
βββ models/ # Data models
β βββ station.dart # Station model
β βββ measurement.dart # Measurement model
β βββ recharge_estimate.dart # Recharge estimate model
βββ services/ # Business logic
β βββ api_service.dart # API communication
βββ providers/ # State management
β βββ stations_provider.dart
β βββ measurements_provider.dart
βββ screens/ # UI screens
β βββ home_screen.dart
β βββ station_detail_screen.dart
β βββ settings_screen.dart
βββ widgets/ # Reusable widgets
β βββ station_card.dart
β βββ measurement_chart.dart
β βββ recharge_settings_dialog.dart
βββ routes/ # Navigation
β βββ app_router.dart
βββ utils/ # Utilities
βββ secure_storage_service.dart
βββ notification_service.dart
The project uses code generation for JSON serialization and Hive adapters:
# Generate code
flutter packages pub run build_runner build
# Watch for changes
flutter packages pub run build_runner watch# Run unit tests
flutter test
# Run integration tests
flutter test integration_test/# Analyze code
flutter analyze
# Fix formatting
dart format .- WebSocket Connection: Implement real-time data streaming
- Recharge Algorithm: Implement actual recharge calculation logic
- API Integration: Connect to real backend endpoints
- Authentication: Add user login and authorization
- Data Validation: Add input validation and error handling
- Offline Sync: Implement conflict resolution for offline data
- Push Notifications: Configure FCM and local notifications
- Background Tasks: Implement WorkManager and Background Fetch
- Data Export: Add CSV/JSON export functionality
- Settings Persistence: Save user preferences
- Dark Theme: Implement dark mode
- Accessibility: Add screen reader support
- Internationalization: Add multi-language support
- Analytics: Add usage tracking
- Crash Reporting: Implement error reporting
- API Keys: Store sensitive keys in secure storage
- Data Encryption: Encrypt sensitive data at rest
- Network Security: Use HTTPS for all API calls
- Input Validation: Validate all user inputs
- Authentication: Implement proper user authentication
- Image Caching: Implement image caching for station photos
- Data Pagination: Load data in chunks for large datasets
- Memory Management: Dispose controllers and streams properly
- Background Processing: Use isolates for heavy computations
-
Build Errors
flutter clean flutter pub get flutter packages pub run build_runner build --delete-conflicting-outputs
-
Map Not Showing
- Check API key configuration
- Verify internet connection
- Check platform-specific setup
-
Notifications Not Working
- Verify Firebase configuration
- Check notification permissions
- Test on physical device
Enable debug logging:
// In main.dart
Logger.level = Level.debug;This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation
- v1.0.0 - Initial release with core features
- v1.1.0 - Added real-time monitoring
- v1.2.0 - Enhanced charts and visualization
- v1.3.0 - Added recharge estimation algorithms
Note: This is a starter project with scaffolded implementations. Real functionality needs to be implemented based on your specific requirements and backend API.