Skip to content

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Seachem Dosing and Water Tester and Alert

Android Kotlin API Material Design 3 License

A dual-platform application (Android & Web) for aquarium enthusiasts to calculate precise dosing amounts for Seachem supplements based on water volume and parameters.

App Icon


Features

Dosing Calculators

  • 13+ Products Supported - Flourish series, Reef series, buffers, conditioners
  • 3 Aquarium Profiles - Freshwater/Planted, Saltwater/Reef, Sand & Gravel
  • Real-time Calculations - Instant results as you type (debounced for performance)
  • Smart Recommendations - Automatic dosing suggestions based on readings

Water Parameters

  • Track 13+ parameters per profile (Ammonia, Nitrite, Nitrate, pH, GH, KH, etc.)
  • Visual status indicators (Good/Warning/Danger)
  • Profile-specific parameter sets

User Experience

  • Light/Dark theme with system-aware switching
  • Multi-language support (English + Kannada)
  • Unit conversions (Volume, Hardness, Temperature)
  • Material Design 3 UI

Screenshots

Dashboard Calculators Settings
Water parameters & recommendations Dosing cards Theme & units

Tech Stack

Android App

Language Kotlin 2.0.21
Min SDK 33 (Android 13.0)
Architecture MVVM/UDF hybrid: legacy MainViewModel uses LiveData/SavedStateHandle; History uses StateFlow/Flow
UI Jetpack Compose screens hosted in the Fragment/XML Navigation shell through ComposeView; ViewBinding remains in MainActivity shell
Design Material Design 3
Async Kotlin Coroutines
Storage Room v2 for history/audit persistence; selected profile uses SharedPreferences; active screen/settings state uses SavedStateHandle and in-memory fragment state

Web App

Stack Legacy static JavaScript app in Base_Template/
Framework None
Testing scripts/verify-sync.js checks Android legacy math against Base_Template/js/dosingCalculations.js

Quick Start

Android

# Clone
git clone https://github.com/GurucharanSavanth/Seachem-Dosing.git
cd Seachem-Dosing

# Build & Install
./gradlew :app:installDebug

Web

cd Base_Template

# Option 1: Open directly
open index.html

# Option 2: Local server
python -m http.server 8000

Project Structure

Seachem-Dosing/
├── app/src/main/java/com/example/seachem_dosing/
│   ├── MainActivity.kt
│   ├── data/local/               # Room v2 history/audit persistence
│   ├── logic/
│   │   ├── Calculations.kt          # Core math (SYNC POINT)
│   │   ├── SeachemCalculations.kt
│   │   └── SaltMixCalculations.kt
│   ├── ui/
│   │   ├── MainViewModel.kt         # State management
│   │   ├── dashboard/
│   │   ├── calculators/
│   │   ├── profile/
│   │   └── settings/
│   └── util/
│       └── DebouncedTextWatcher.kt  # Performance utility
│
├── Base_Template/
│   ├── index.html
│   └── js/
│       ├── dosingCalculations.js    # Core math (SYNC POINT)
│       ├── app.js
│       └── uiHandlers.js
│
└── docs/
    ├── architecture/  # ADRs
    └── sbom/          # SBOM generation notes

Supported Products

Freshwater/Planted
  • Flourish (comprehensive)
  • Flourish Iron, Nitrogen, Phosphorus, Potassium, Trace
  • Equilibrium (GH booster)
  • Alkaline Buffer, Acid Buffer
  • Neutral Regulator
  • Potassium Bicarbonate (KHCO₃)
Saltwater/Reef
  • Reef Advantage Calcium, Magnesium, Strontium
  • Reef Buffer, Builder, Carbonate
  • Reef Calcium, Complete
  • Reef Fusion 1 & 2
  • Reef Iodide, Strontium
  • Salt Mix Calculator
Universal
  • Prime (dechlorinator)
  • Stability (beneficial bacteria)
  • Safe (concentrated conditioner)
  • Water Change Calculator

Contributing

Contributions are welcome! Please read the guidelines:

Before You Start

  1. Check Issues for existing discussions
  2. Read SPEC.md and the accepted ADRs before changing calculator behavior

Important Rules

Calculation Sync Required Changes to dosing math must update BOTH files:

  • app/.../logic/Calculations.kt
  • Base_Template/js/dosingCalculations.js

Code Guidelines

  • Use DebouncedTextWatcher for new text inputs (250ms default)
  • Clean up resources in onDestroyView()
  • Validate inputs at ViewModel level
  • Follow existing code style

Pull Request Process

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Build Commands

# Debug build
./gradlew :app:assembleDebug

# Release build
./gradlew :app:assembleRelease

# Run tests
./gradlew :app:testDebugUnitTest

# Install on device
./gradlew :app:installDebug

Acknowledgments


License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details, and NOTICE for attribution.


Developed with ❤️ by Gurucharan.S

Report Bug · Request Feature

About

No description, website, or topics provided.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages