Skip to main content

A beautiful animated desktop water reminder built with Python and PySide6.

Project description

๐Ÿ’ง Water Companion

Your beautiful, animated desktop hydration reminder

Python 3.12+ PySide6 MIT License PyPI

A polished open-source desktop application that gently reminds you to drink water โ€” with a cute animated mascot drawn entirely in code.


โœจ Features

  • ๐ŸŽจ Animated Water-Drop Mascot โ€” Drawn 100% with QPainter. No images, no assets. Blinking eyes, floating animation, smiling when you drink, sad when you skip.
  • ๐Ÿ”” Smart Reminders โ€” Configurable intervals from 5 minutes to 2 hours.
  • ๐Ÿ’ซ Particle Effects โ€” Hearts & sparkles fly when you drink. Sad rain drops fall when you skip.
  • ๐Ÿ–ฅ๏ธ System Tray โ€” Lives quietly in your tray. Pause, resume, or change interval without opening the window.
  • ๐Ÿ’ป Full CLI โ€” Control everything from your terminal with water-companion commands.
  • ๐Ÿ“ Offline-First โ€” Settings stored locally in JSON. No cloud, no account, no internet.
  • ๐Ÿš€ PyPI-Ready โ€” Install with a single pip install command.
  • ๐Ÿ“ฆ Standalone Binary โ€” Build a .exe with PyInstaller.

๐Ÿš€ Quick Start

Install from PyPI

pip install water-companion
water-companion

That's it! The app launches, shows the setup window, and quietly moves to your system tray.

Install for Development

git clone https://github.com/yourusername/water-companion
cd water-companion
pip install -e ".[dev]"
water-companion

๐Ÿ’ป CLI Reference

water-companion                    Launch the app (default)
water-companion start              Launch the app
water-companion stop               Stop the running instance
water-companion pause              Pause reminders
water-companion resume             Resume paused reminders
water-companion status             Show current state and next reminder
water-companion config             Interactively change the interval
water-companion reset              Reset all settings to defaults
water-companion version            Print version

Examples

# Check if it's running and when the next reminder fires
water-companion status

# Pause while you're in a meeting
water-companion pause

# Come back after the meeting
water-companion resume

# Change to every 15 minutes
water-companion config

๐ŸŽฎ How It Works

  1. Launch โ€” Run water-companion from terminal or double-click.
  2. Setup โ€” Choose your reminder interval (5 min to 2 hours).
  3. Click "Start" โ€” App minimises to system tray. Timer begins.
  4. Reminder fires โ€” Animated water drop slides in from the bottom-right corner.
  5. Respond:
    • Yes โœ… โ†’ Drop smiles โ†’ Hearts & sparkles fly โ†’ Timer restarts
    • No โŒ โ†’ Drop looks sad โ†’ Sad drops fall โ†’ Timer restarts

๐Ÿ—๏ธ Architecture

water_companion/
โ”œโ”€โ”€ main.py                   # App controller + IPC server
โ”œโ”€โ”€ cli.py                    # Typer CLI
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ reminder_manager.py   # QTimer state machine (IDLE/RUNNING/PAUSED)
โ”‚   โ””โ”€โ”€ messages.py           # Encouragement + gentle reminder text
โ”œโ”€โ”€ mascot/
โ”‚   โ”œโ”€โ”€ water_drop_widget.py  # QPainter mascot (no assets)
โ”‚   โ””โ”€โ”€ animations.py        # Slide, float, particle animations
โ”œโ”€โ”€ ui/
โ”‚   โ”œโ”€โ”€ setup_window.py       # First-run setup window
โ”‚   โ”œโ”€โ”€ reminder_window.py    # Animated reminder popup
โ”‚   โ”œโ”€โ”€ tray_manager.py       # System tray icon + menu
โ”‚   โ””โ”€โ”€ styles.py             # QSS design system
โ”œโ”€โ”€ settings/
โ”‚   โ””โ”€โ”€ config.py             # JSON config (load/save/reset)
โ””โ”€โ”€ utils/
    โ”œโ”€โ”€ constants.py          # App-wide constants
    โ””โ”€โ”€ logger.py             # Rotating file + console logger

Design principles:

  • SOLID โ€” each class has one responsibility
  • Qt Signals/Slots โ€” zero tight coupling between UI and logic
  • No global state โ€” everything passes through the controller
  • Clean Architecture โ€” UI, core, and data layers are fully independent

๐Ÿงช Running Tests

pip install pytest pytest-qt
pytest tests/ -v

Expected output:

tests/test_config.py            โœ“  10 passed
tests/test_reminder_manager.py  โœ“  12 passed
tests/test_messages.py          โœ“   6 passed

๐Ÿ“ฆ Building a Standalone Binary (Windows)

pip install pyinstaller
pyinstaller build.spec

The binary will be at dist/water-companion/water-companion.exe.


๐Ÿ“ค Publishing to PyPI

pip install build twine
python -m build
twine upload dist/*

โš™๏ธ Configuration

Settings are stored at ~/.water-companion/config.json:

{
  "interval_minutes": 30,
  "reminders_enabled": true,
  "first_run": false
}

Logs are at ~/.water-companion/app.log (rotating, max 6 MB).


๐Ÿ› ๏ธ Requirements

Dependency Version Purpose
Python 3.12+ Language
PySide6 6.7+ GUI framework
Typer 0.12+ CLI
Rich 13.7+ CLI formatting

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes with tests
  4. Run pytest tests/ -v
  5. Submit a pull request

๐Ÿ“„ License

MIT ยฉ Water Companion Contributors


Made with ๐Ÿ’ง and Python

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

water_companion-1.0.0.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

water_companion-1.0.0-py3-none-any.whl (35.2 kB view details)

Uploaded Python 3

File details

Details for the file water_companion-1.0.0.tar.gz.

File metadata

  • Download URL: water_companion-1.0.0.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.0

File hashes

Hashes for water_companion-1.0.0.tar.gz
Algorithm Hash digest
SHA256 08f574b5f50c521c896586727f2155d1b89f6635d71cd0edab3d77f213f17e78
MD5 9e55473068095806ca8dfc70acb76010
BLAKE2b-256 a13d46c5f12ede9a5b4f76ff621ea41e73791f2706a4bd7bc288fad81996c869

See more details on using hashes here.

File details

Details for the file water_companion-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for water_companion-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daa4b5e5bcd72ca55771e4f4bf5d03e0320bb0d43c35ac0bb9e92a976bf87ff4
MD5 62e794e7126c5eafc7066db6e04eaf83
BLAKE2b-256 221529c3e2a0d86dc307292360bb158aba3245362221b8a0a76022d5b4bd904d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page