Skip to content

extrawest/daily-water-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

306 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Daily Water Tracker

A Flutter app for tracking daily water intake. Backed by Firebase, with real-time sync, push reminders, server-driven UI and a full Codemagic CI/CD pipeline for Android and iOS

🎬 Demo

app-demo.mp4

πŸš€ Features

  • Sign in with email/password, Google, Apple or Facebook (Facebook is dev-only)
  • Real-time hydration log on Firestore, with hydration coefficients per drink type (water, tea, coffee, milk)
  • Daily goal: either calculated from weight or set manually
  • Push reminders via FCM with quiet hours and topic subscription
  • Local scheduled reminders, timezone-aware
  • Remote Config for switching the progress indicator style (circular / linear) and showing an emergency banner without shipping a new build
  • Shareable "today" link that opens straight into the app (App Links via Firebase Hosting, dev-only)
  • Profile + avatar upload to Firebase Storage
  • Account deletion flow with reauthentication
  • EN / UK localisation
  • Light / dark theme
  • Firebase Analytics screen tracking and Crashlytics non-fatal reporting
  • Offline banner when the device loses connectivity

πŸ›  Tech Stack

  • Flutter (stable) and Dart 3.8
  • State management: flutter_bloc
  • DI: RepositoryProvider for the stateful stuff (repositories, services), get_it for the stateless platform utilities
  • Routing: go_router with an Analytics observer
  • Networking: dio with a refresh-token interceptor
  • Firebase: Auth, Firestore, Storage, Messaging, Remote Config, Analytics, Crashlytics, App Check
  • Notifications: firebase_messaging, flutter_local_notifications, flutter_timezone
  • Localisation: easy_localization
  • CI/CD: Codemagic

πŸ— Project Structure

.
β”œβ”€β”€ android/                  Android platform code, Gradle config
β”œβ”€β”€ ios/                      iOS platform code, CocoaPods
β”œβ”€β”€ assets/                   Fonts, images, SVGs, i18n JSON, runtime config
β”œβ”€β”€ docs/                     Internal notes (flavors etc.)
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ common/               App-wide widgets, services, utils, DI, router
β”‚   β”œβ”€β”€ data/repositories/    Firestore / Storage / Messaging repositories
β”‚   β”œβ”€β”€ features/             Feature-first modules (cubit + screens + widgets)
β”‚   β”‚   β”œβ”€β”€ account/
β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”œβ”€β”€ home/
β”‚   β”‚   β”œβ”€β”€ history/
β”‚   β”‚   β”œβ”€β”€ statistics/
β”‚   β”‚   β”œβ”€β”€ preferences/
β”‚   β”‚   β”œβ”€β”€ profile/
β”‚   β”‚   β”œβ”€β”€ notifications/
β”‚   β”‚   β”œβ”€β”€ locale/
β”‚   β”‚   β”œβ”€β”€ theme/
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ firebase/             Firebase services and models
β”‚   β”œβ”€β”€ network/              Dio client, interceptors, WebSocket
β”‚   └── main.dart             Entry point - DI, Firebase init, EasyLocalization
β”œβ”€β”€ scripts/                  Codegen, l10n, Firebase Hosting helpers
β”œβ”€β”€ codemagic.yaml            CI/CD pipelines (dev + prod)
└── pubspec.yaml

πŸ“‹ Prerequisites

  • Flutter SDK 3.41.x (or compatible)
  • Dart SDK ^3.8.0
  • Android Studio / Xcode for native builds
  • A Firebase project (Auth, Firestore, FCM, Storage, Remote Config, Crashlytics, App Check)

πŸ”§ Getting Started

1. Pull packages

flutter pub get

2. Drop in the Firebase configs

These are gitignored, you bring your own:

android/app/src/dev/google-services.json
android/app/src/prod/google-services.json
ios/config/dev/GoogleService-Info.plist
ios/config/prod/GoogleService-Info.plist

3. Add the local runtime config

Two files under assets/ (also gitignored):

  • assets/config_development.json
  • assets/config_production.json

Example:

{
  "appName": "Daily Water Tracker",
  "apiBaseUrl": "https://your-api-url.com",
  "googleServerClientId": "YOUR_CLIENT_ID.apps.googleusercontent.com"
}

4. Run

The project has dev and prod flavors

flutter run --flavor dev
flutter run --flavor prod

For web (single artifact, flavor goes through dart-define):

flutter run --dart-define FLAVOR=dev
flutter run --dart-define FLAVOR=prod

βš™οΈ Development

Generate models, assets, etc.

sh ./scripts/generate.sh

Update localisation keys

sh ./scripts/generate_l10n.sh

Generate launcher icons

flutter pub run flutter_launcher_icons -f flutter_launcher_icons-dev.yaml
flutter pub run flutter_launcher_icons -f flutter_launcher_icons-prod.yaml

Deploy .well-known/assetlinks.json (App Links)

sh ./scripts/firebase_hosting_deploy.sh

πŸ€– CI/CD

Pipelines live in codemagic.yaml and are split in two:

  • Development workflow - runs on every push to master. Builds Android and iOS in dev flavor with --build-name=0.0.<BUILD_NUMBER>, then ships the artifacts to the Firebase App Distribution internal-testers group
  • Production workflow - runs on a Git tag (v*.*.*). Takes the version from the tag, builds release Android/iOS in prod flavor, ships to Firebase App Distribution and TestFlight

Both workflows read release notes from a single release_notes.json

πŸ“ License

Licensed under the BSD-3-Clause License - see LICENSE.txt for details

πŸ‘€ Author

Created by Mykola Shchypailo

Extrawest.com, 2026

About

Flutter app for daily water intake tracking with Firebase backend

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors