🌱 Plant Watering Reminder

A feature-rich Flutter application for managing plant care with AI-powered recommendations, offline-first architecture, and comprehensive analytics.

✨ Features

πŸ€– AI-Powered Plant Care

  • Gemini AI Integration - Get personalized plant care recommendations
  • Health Scoring - Automatic plant health assessment based on care history
  • Optimal Watering Intervals - AI-calculated watering schedules
  • Seasonal Advice - Context-aware care tips for current season

πŸ“± Smart Notifications

  • Intelligent Scheduling - Notifications at preferred times
  • Quiet Hours - Customizable quiet hours (default 10 PM - 8 AM)
  • Weekend Control - Toggle notifications on weekends
  • Snooze Functionality - Flexible snooze durations

πŸ“Š Analytics & Insights

  • Care History Dashboard - Visual charts of care patterns
  • Growth Tracking - 90-day health score trends
  • Achievement System - Gamified care milestones
  • Interactive Calendar - View care events by date

πŸ”„ Offline-First Architecture

  • Complete Offline Support - Full functionality without internet
  • Automatic Sync - Seamless sync when connection restored
  • Conflict Resolution - Smart handling of data conflicts
  • Local SQLite Database - Fast, reliable local storage

πŸ’Ύ Data Management

  • Backup & Restore - Complete data backup with selective options
  • Export/Import - Multi-format support (JSON, CSV)
  • Data Filtering - Export specific plants or date ranges
  • File Sharing - Share backups via email, cloud storage, etc.

🌍 Localization

  • English - Full English support
  • Indonesian - Complete Indonesian localization
  • Easy Extension - Simple process to add more languages

🎨 User Experience

  • Beautiful Animations - Smooth transitions and visual feedback
  • Plant Health Indicators - Visual status of plant health
  • Responsive Design - Works on phones and tablets
  • Dark Mode Support - System theme integration

πŸš€ Getting Started

Prerequisites

  • Flutter 3.7.2 or higher
  • Dart 3.7.2 or higher
  • Android SDK 21+ or iOS 12+

Installation

  1. Clone the repository

    git clone https://github.com/azcharia/plant-watering-reminder.git
    cd plant-watering-reminder
    
  2. Install dependencies

    flutter pub get
    
  3. Set up environment variables Create a .env file in the project root:

    SUPABASE_URL=your_supabase_url
    SUPABASE_ANON_KEY=your_supabase_anon_key
    GEMINI_API_KEY=your_gemini_api_key
    
  4. Run the app

    flutter run
    

πŸ”§ Configuration

Supabase Setup

  1. Create a Supabase project at supabase.com
  2. Set up authentication (Email/Password)
  3. Create the required tables (see supabase/migrations/)
  4. Add your Supabase URL and Anon Key to .env

Gemini AI Setup

  1. Get your API key from Google AI Studio
  2. Add it to your .env file as GEMINI_API_KEY

Deep Link Configuration (Password Reset)

Android

Add to android/app/src/main/AndroidManifest.xml:

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data
        android:scheme="myapp"
        android:host="reset-password" />
</intent-filter>

iOS

Add to ios/Runner/Info.plist:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>myapp</string>
        </array>
        <key>CFBundleURLName</key>
        <string>reset-password</string>
    </dict>
</array>

πŸ“ Project Structure

lib/
β”œβ”€β”€ main.dart                 # App entry point
β”œβ”€β”€ models/                   # Data models
β”‚   β”œβ”€β”€ plant.dart
β”‚   β”œβ”€β”€ care_event.dart
β”‚   └── profile.dart
β”œβ”€β”€ services/                 # Business logic (20+ services)
β”‚   β”œβ”€β”€ plant_service.dart
β”‚   β”œβ”€β”€ offline_database_service.dart
β”‚   β”œβ”€β”€ sync_service.dart
β”‚   β”œβ”€β”€ ai_plant_care_service.dart
β”‚   β”œβ”€β”€ smart_notification_service.dart
β”‚   β”œβ”€β”€ backup_service.dart
β”‚   β”œβ”€β”€ export_import_service.dart
β”‚   └── ... (more services)
β”œβ”€β”€ screens/                  # UI screens (17 screens)
β”‚   β”œβ”€β”€ home_screen.dart
β”‚   β”œβ”€β”€ plant_detail_screen.dart
β”‚   β”œβ”€β”€ analytics_dashboard_screen.dart
β”‚   └── ... (more screens)
β”œβ”€β”€ widgets/                  # Reusable components
β”‚   β”œβ”€β”€ plant_card.dart
β”‚   β”œβ”€β”€ plant_health_indicator.dart
β”‚   └── ... (more widgets)
β”œβ”€β”€ utils/                    # Utility functions
└── l10n/                     # Localization files

πŸ—οΈ Architecture

Offline-First Design

  • Local SQLite Database - All data stored locally
  • Sync Queue - Tracks changes for sync
  • Automatic Sync - Syncs when online
  • Conflict Resolution - Server data takes precedence

Service Layer

  • Singleton Pattern - Single instance per service
  • Dependency Isolation - Services are independent
  • Error Handling - Comprehensive error management
  • Logging - Structured logging throughout

State Management

  • ValueNotifier - Simple state management
  • StreamController - For connectivity monitoring
  • Local Storage - SharedPreferences for preferences

πŸ” Security

  • API Keys - Never commit .env file
  • Token Management - Secure token handling
  • Data Encryption - SQLite encryption ready
  • No Sensitive Logging - Tokens never logged

πŸ“¦ Dependencies

Core

  • flutter - UI framework
  • supabase_flutter - Backend services
  • google_generative_ai - AI integration

Local Storage

  • sqflite - SQLite database
  • shared_preferences - Key-value storage
  • path_provider - File system access

Notifications

  • flutter_local_notifications - Local notifications
  • timezone - Timezone support

UI/UX

  • lottie - Animations
  • table_calendar - Calendar widget
  • auto_size_text - Responsive text
  • google_fonts - Custom fonts

Utilities

  • flutter_dotenv - Environment variables
  • connectivity_plus - Network monitoring
  • image_picker - Image selection
  • file_picker - File selection
  • share_plus - File sharing
  • package_info_plus - App version info

πŸ§ͺ Testing

Run tests with:

flutter test

πŸ“± Supported Platforms

  • βœ… Android 5.0+ (API 21+)
  • βœ… iOS 12.0+
  • βœ… Web (experimental)
  • βœ… Windows (experimental)
  • βœ… macOS (experimental)
  • βœ… Linux (experimental)

πŸ› Known Issues

None currently. Please report issues on GitHub Issues.

🀝 Contributing

Contributions are welcome! Please follow these steps:

  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

πŸ“„ License

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

πŸ‘¨β€πŸ’» Author

Azcharia - GitHub Profile

πŸ™ Acknowledgments

πŸ“ž Support

For support, email naufal.putra50@gmail.com or open an issue on GitHub.

πŸ—ΊοΈ Roadmap

  • [ ] Plant identification using AI
  • [ ] Weather-based watering adjustments
  • [ ] Community plant sharing
  • [ ] Smart home integration
  • [ ] Advanced analytics
  • [ ] Multi-language support expansion

Made with ❀️ for plant lovers everywhere 🌿

Built With

Share this project:

Updates