{"id":34564444,"url":"https://github.com/astraen-dev/RainVu","last_synced_at":"2025-12-29T11:03:25.777Z","repository":{"id":318867136,"uuid":"949495189","full_name":"astraen-dev/RainVu","owner":"astraen-dev","description":"    A modern, privacy-first Flutter app for logging rainfall. Track multiple gauges, visualize data with powerful charts, and keep your data secure on-device. Built with Riverpod, GoRouter, and Drift.","archived":false,"fork":false,"pushed_at":"2025-12-18T19:54:54.000Z","size":13904,"stargazers_count":4,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-21T21:50:00.681Z","etag":null,"topics":["cross-platform","dart","flutter","logging","mobile"],"latest_commit_sha":null,"homepage":"https://astraen.dev/rainvu","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astraen-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-16T15:37:07.000Z","updated_at":"2025-12-18T19:54:55.000Z","dependencies_parsed_at":"2025-10-16T22:54:02.056Z","dependency_job_id":"40419a60-09f7-4938-be8e-41ef0e0e5791","html_url":"https://github.com/astraen-dev/RainVu","commit_stats":null,"previous_names":["the-user-created/rainvu","astraen-dev/rainvu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/astraen-dev/RainVu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astraen-dev%2FRainVu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astraen-dev%2FRainVu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astraen-dev%2FRainVu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astraen-dev%2FRainVu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astraen-dev","download_url":"https://codeload.github.com/astraen-dev/RainVu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astraen-dev%2FRainVu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28115007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-29T02:00:07.021Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cross-platform","dart","flutter","logging","mobile"],"created_at":"2025-12-24T09:00:41.771Z","updated_at":"2025-12-29T11:03:25.769Z","avatar_url":"https://github.com/astraen-dev.png","language":"Dart","readme":"# RainVu 💧\n\nRainVu is a modern Flutter app for farmers, gardeners, and weather enthusiasts to meticulously log\nrainfall from multiple custom gauges. It transforms raw data into actionable insights through\npowerful charts and historical analysis, all while keeping user data private and on-device.\n\n## ✨ Key Features\n\n* **📊 Data Logging \u0026 Management**:\n    * Quickly log rainfall entries with amount, date, and associated gauge.\n    * Add, edit, and manage multiple custom rain gauges.\n    * View all historical entries in a clean, organized list.\n\n* **📈 Powerful Analytics \u0026 Insights**:\n    * Visualize data with charts for Month-to-Date (MTD) and Year-to-Date (YTD) totals.\n    * Analyze monthly trends, seasonal patterns, and year-over-year comparisons.\n    * Dive deep into daily breakdowns for any given month.\n\n* **🔄 Data Portability**:\n    * Export all your data to CSV or JSON formats for backup or external analysis.\n    * Import data from a previously exported file to restore or merge records.\n\n* **🔒 Secure \u0026 Private**:\n    * All rainfall data is stored securely and locally on the user's device using a relational\n      database.\n    * No cloud account or internet connection is required for core functionality.\n\n## 🛠️ Tech Stack \u0026 Architecture\n\nThis project is built with a modern, scalable Flutter stack emphasizing type-safety, code\ngeneration, and a feature-first architecture with distinct environments for development and\nproduction.\n\n### Core Technologies\n\n* **Framework**: Flutter \u0026 Dart\n* **State Management**: Riverpod with `riverpod_generator` for compile-safe providers.\n* **Routing**: GoRouter with `go_router_builder` for type-safe, declarative navigation.\n* **Local Storage**:\n    * **Drift (Moor)**: For reactive, persistent storage of relational data (gauges, entries).\n    * **shared_preferences**: For simple key-value storage of user settings.\n* **Telemetry**:\n    * **Firebase Analytics**: For anonymized usage metrics.\n    * **Firebase Crashlytics**: For crash reporting.\n* **Data Models**: `freezed` for immutable data classes and unions.\n* **UI \u0026 Visualization**:\n    * `fl_chart` for creating beautiful and interactive charts.\n    * `flutter_animate` for declarative and easy-to-use animations.\n\n### Utility Packages\n\n* `json_serializable`: For robust JSON serialization/deserialization.\n* `intl`: For internationalization and date/number formatting.\n* `file_picker` \u0026 `url_launcher`: For file system and external link interactions.\n* `build_runner`: To run all code generation tasks.\n\n### Code Style \u0026 Linting\n\n* `flutter_lints` and `riverpod_lint` are used with a strict ruleset in `analysis_options.yaml` to\n  maintain code quality and consistency.\n\n### Project Structure\n\nThe codebase follows a **feature-first** architecture and uses separate entry points for different\nbuild environments (flavors).\n\n```\nlib/\n├── core/\n│   ├── data/         # Shared data sources (Drift DB, SharedPreferences)\n│   ├── navigation/   # GoRouter configuration and routes\n│   ├── ui/           # App-wide UI (themes, navigation shell)\n│   └── utils/        # Shared utilities and extensions\n│\n├── features/\n│   ├── [feature_name]/\n│   │   ├── application/  # Business logic \u0026 Riverpod providers\n│   │   ├── data/         # Feature-specific repositories\n│   │   ├── domain/       # Models and entities (often with Freezed)\n│   │   └── presentation/ # UI (screens, widgets)\n│   └── ...\n│\n├── shared/\n│   ├── domain/       # Domain models shared across multiple features\n│   └── widgets/      # Reusable widgets (buttons, dialogs, etc.)\n│\n├── main_common.dart  # Shared app initialization logic\n├── main_dev.dart     # Entry point for the 'dev' flavor\n└── main_prod.dart    # Entry point for the 'prod' flavor\n```\n\n## 🚀 Getting Started\n\nFollow these instructions to set up the project for local development.\n\n### Prerequisites\n\n* Flutter SDK (version specified in `pubspec.yaml`)\n* An IDE like Android Studio or VS Code\n* An Android Emulator or physical device\n* An iOS Simulator or physical device (requires macOS with Xcode)\n* [Firebase CLI](https://firebase.google.com/docs/cli#install_the_firebase_cli) installed and\n  authenticated (`firebase login`).\n* Java Development Kit (JDK) to use `keytool`.\n\n### Setup\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/astraen-dev/RainVu.git\n   cd RainVu\n   ```\n\n2. **Install dependencies:**\n   ```bash\n   flutter pub get\n   ```\n\n3. **Set up Firebase:**\n   This project uses Firebase for Analytics and Crashlytics, configured separately for `dev` and\n   `prod` environments (flavors). To run the app, you must set up your own Firebase projects.\n\n    * Create two Firebase projects in the [Firebase Console](https://console.firebase.google.com/):\n      one for development (e.g., `my-rainvu-dev`) and one for production (e.g., `my-rainvu-prod`).\n    * Enable Analytics and Crashlytics in both projects.\n    * For each project, register an Android and an iOS app, making sure to use the correct\n      package/bundle IDs:\n        * **Development:** `com.astraen.rainvu.dev` (for both iOS and Android)\n        * **Production:** `com.astraen.rainvu` (for both iOS and Android)\n    * Run the `flutterfire configure` commands below, replacing the `--project` value with your own\n      Firebase project IDs. This will generate the necessary `firebase_options_*.dart` files and\n      native configuration files.\n\n   **Configure Development Firebase:**\n   ```bash\n   flutterfire configure \\\n     --project=\u003cYOUR_DEV_PROJECT_ID\u003e \\\n     --out=lib/firebase_options_dev.dart \\\n     --ios-bundle-id=com.astraen.rainvu.dev \\\n     --android-package-name=com.astraen.rainvu.dev \\\n     --ios-out=ios/Runner/Firebase/dev/GoogleService-Info.plist \\\n     --android-out=android/app/src/dev/google-services.json\n   ```\n\n   **Configure Production Firebase:**\n   ```bash\n   flutterfire configure \\\n     --project=\u003cYOUR_PROD_PROJECT_ID\u003e \\\n     --out=lib/firebase_options_prod.dart \\\n     --ios-bundle-id=com.astraen.rainvu \\\n     --android-package-name=com.astraen.rainvu \\\n     --ios-out=ios/Runner/Firebase/prod/GoogleService-Info.plist \\\n     --android-out=android/app/src/prod/google-services.json\n   ```\n\n4. **Set up Android App Signing:**\n   To build a release version of the Android app, you need to configure an upload keystore.\n\n    1. **Generate an Upload Keystore:**\n       If you don't have one, create a keystore using the following `keytool` command. It will\n       prompt you for passwords and other information. Remember the passwords you choose.\n       ```bash\n       keytool -genkey -v -keystore upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload\n       ```\n\n    2. **Move the Keystore:**\n       Place the generated `upload-keystore.jks` file inside the `android/` directory of the\n       project.\n\n    3. **Configure Signing Properties:**\n       In the `android/` directory, you will find a template file named `key.properties.example`.\n        * Create a copy of this file and rename it to `key.properties`.\n        * Open `key.properties` and fill in the passwords and alias you chose when generating the\n          keystore.\n\n       **Note:** The `key.properties` file is already listed in `.gitignore` and must **never** be\n       committed to version control.\n\n5. **Run code generation:**\n   This project heavily relies on code generation. Run `build_runner` to generate the necessary\n   files:\n   ```bash\n   dart run build_runner build --delete-conflicting-outputs\n   ```\n\n## 💻 Development Workflow\n\nThe app is configured with two environments, called \"flavors\": `dev` and `prod`. You must specify\nwhich flavor you want to run or build.\n\n### Running the App (Flavors)\n\nEnsure an emulator/simulator is running or a device is connected.\n\n* **To run the `dev` flavor:**\n  This version connects to your development Firebase project, has a `.dev` suffix in its application\n  ID, and displays a \"DEBUG\" banner.\n  ```bash\n  flutter run --flavor dev -t lib/main_dev.dart\n  ```\n\n* **To run the `prod` flavor:**\n  This version connects to your production Firebase project and behaves as the release version\n  would.\n  ```bash\n  flutter run --flavor prod -t lib/main_prod.dart\n  ```\n\n### Building for Release\n\n* **To build an Android App Bundle for production:**\n  After completing the app signing setup, run:\n  ```bash\n  flutter build appbundle --flavor prod -t lib/main_prod.dart\n  ```\n* **To build an iOS App for production:**\n  ```bash\n  flutter build ipa --flavor prod -t lib/main_prod.dart\n  ```\n\n### Code Generation\n\nIf you modify any file that uses code generation (e.g., Riverpod providers, Freezed models, Drift\ntables), you must re-run `build_runner`. For continuous development, use the `watch` command:\n\n```bash\ndart run build_runner watch --delete-conflicting-outputs\n```\n\nThis will automatically regenerate files whenever you save a change.\n\n### Localization\n\nThe localization workflow involves several steps to keep the `app_en.arb` file clean and up-to-date.\n\n1. **Remove unused keys (Optional)**:\n   ```bash\n   dart pub global run remove_unused_localizations_keys\n   ```\n2. **Sort keys and generate metadata (Optional)**:\n   ```bash\n   arb_utils generate-meta lib/l10n/app_en.arb\n   arb_utils sort lib/l10n/app_en.arb\n   ```\n3. **Generate Dart localization files:**\n   ```bash\n   flutter gen-l10n\n   ```\n\n### Generating OSS Licenses\n\nThis project uses `dart_pubspec_licenses` to generate a list of open-source licenses for display\nwithin the app. After adding or updating packages, run the following command:\n\n```bash\ndart run dart_pubspec_licenses:generate\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":["Weather"],"sub_categories":["Notes"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastraen-dev%2FRainVu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastraen-dev%2FRainVu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastraen-dev%2FRainVu/lists"}