Skip to content

About

Interactive cross-platform desktop & mobile wellness companion (Windows, Android, macOS, iOS). Tracks hydration, posture breaks, and includes 18 pixel mascots.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Companion Hub (Desktop & Mobile Pet) πŸ’§

A lightweight, secure, and interactive cross-platform wellness companion for Windows, Android, macOS, and iOS that keeps you hydrated, reminds you of posture and eye breaks, and brings life to your workspace.

Release v2.0.0 CodeQL Platforms Mascots Portal Security Policy Contributing Guidelines License


🌐 Official Web Portal & Downloads

Live Production Portal: https://mycompanionhub.web.app

  • Smart OS Auto-Detection: Automatically identifies visitor operating systems (Windows, Android, macOS, iOS) and highlights the corresponding download card.
  • Handcrafted 3D Isometric Platform Cards: Built with high-fidelity, responsive 3D SVG vectors and uniform, straight-aligned download action buttons.
  • 10 Pixel Companions Showcase: Interactive browser preview of all 10 procedural companion characters with live petting reactions, heart particles (❀️), and unique personality quotes.
  • Free Community Avatar Extension Pack: Dedicated download card for Companion-Avatar-Pack.zip (~12 KB) featuring 8 extra animated companions and a 1-click batch installer for existing users that preserves configurations without reinstallation.
  • On-Screen Dual QR Code Hub: Point your phone camera directly at the screen to instantly download the Android APK or Apple SwiftUI packages.
  • Quick Start & Customization Guide: Built-in instructions covering accessory evolution (sunglasses & golden crown), meeting mode snoozing, working/quiet hours, custom avatar importing, and clean uninstallation.
  • Hardened Web Security & Anti-Abuse: Strict Content Security Policy (CSP), HSTS preload, zero-clickjacking headers, verified search engine & social media bot permissions in robots.txt, and complete bandwidth shielding for binary downloads.

🐾 Mascot & Avatar System

Desktop Companion includes 18 ready-to-use companions out of the box, with full support for custom animated imports:

1. 10 Built-In Procedural Pixel Mascots

Procedurally drawn pixel art with zero image asset load overhead and crisp scaling across Retina and high-DPI displays. Tap or click any mascot in-app or on the Web Portal to trigger live petting hearts (❀️) and unique personality quotes:

  1. 🧒 Pixel Guy (Focus Desk Buddy) β€” "Stay focused and drink high quality H2O!"
  2. 🐱 Cute Kitty (Gentle Nap & Sip Pet) β€” "Purr... don't forget your water glass!"
  3. πŸ€– Robo Buddy (Cyber Wellness AI) β€” "System check 100%... Hydration required!"
  4. πŸ’§ Water Slime (Pure Hydration Mascot) β€” "Splish splash! Feed the machine!"
  5. 🐸 Forest Frog (Zen Stretch Master) β€” "Ribbit! 20-20-20 eye rest & neck roll!"
  6. πŸ‘» Spooky Ghost (Posture Reminder) β€” "Booo! Don't slouch at your screen!"
  7. 🐢 Playful Puppy (Loyal Hydration Buddy) β€” "Woof! Time for a cool fresh water break!"
  8. πŸ¦† Rubber Duck (Debug & Waddle Pal) β€” "Quack! Let's debug this problem together!"
  9. πŸ¦– Mini Dino (Prehistoric Focus Coach) β€” "Rawr! Stand up, stretch tall, and hydrate!"
  10. 🐻 Honey Bear (Warm & Cozy Rest Friend) β€” "Yawn... restful breaks make great work!"

2. 8 Pre-Bundled Community Animated GIFs

Fresh installations automatically bundle 8 animated pixel companions into assets/custom_avatars/:

  • πŸ• Shiba Inu (shiba_inu.gif)
  • 🐲 Baby Dragon (baby_dragon.gif)
  • 🐼 Bouncing Panda (bouncing_panda.gif)
  • 🐧 Waddling Penguin (waddling_penguin.gif)
  • 🦫 Chill Capybara (chill_capybara.gif)
  • 🦎 Pink Axolotl (pink_axolotl.gif)
  • ⭐ Golden Star (golden_star.gif)
  • πŸ§ͺ Magic Potion (magic_potion.gif)

3. Standalone Avatar Pack for Existing Users (Option 3)

Existing users can download Companion-Avatar-Pack.zip (12.7 KB) directly from GitHub Releases or from the Web Portal. Running Install-Avatars.bat automatically injects all 8 animated mascots into %LocalAppData%\Programs\Desktop Companion\assets\custom_avatars\ without touching config.json. Existing schedules, cup counts, and user names remain 100% intact.

4. Custom Avatar Importer

Drop any animated .gif or .png into assets/custom_avatars/ or use the in-app file browser in Settings. The companion automatically loads and walks with your custom avatar!


πŸš€ Quick Start & Customization Guide

Tips to get the most out of your companion immediately after installation:

Guide Card Description How to Use
🎨 Custom Avatars Import your own animated pixel pets or custom sprites. Right-click the system tray icon > Settings... > Avatars > tap "Import Custom Avatar", or drop any animated .gif / .png into assets/custom_avatars/.
πŸ‘‘ Accessory Evolution Earn visual trophies by hitting hydration milestones throughout the day. Reaching 4 cups unlocks pixel sunglasses πŸ•ΆοΈ on your character. Hitting your daily goal unlocks a golden celebration crown πŸ‘‘ with confetti!
⏸️ Meeting Mode / Pause Silence popups during Zoom/Teams calls, screen sharing, or presentations. Right-click the πŸ’§ tray icon (or Mac menu bar) > Meeting Mode / Pause to snooze reminders for 30 minutes, 1 hour, or 2 hours. Automatically resumes.
πŸŒ™ Working & Quiet Hours Keep reminders aligned with your productive routine and sleep schedule. Default office schedule runs Mon–Fri, 9:00 AM – 6:30 PM. Automatic Quiet Hours (10:00 PM – 8:00 AM) strictly silences all popups and droplet sounds.
❀️ Interactive Petting Show love and boost your companion's mood anytime. Click or tap on the walking character anytime to pat it! Floating hearts (❀️) burst upward and your companion lights up with gratitude.
πŸ—‘οΈ Clean Uninstallation Zero residual bloat, zero background services, zero orphaned registry keys. Fully registered in Windows Settings > Apps > Installed apps. You can uninstall it cleanly anytime directly from Windows Settings or your Start Menu.

πŸ“± Multi-Platform Architecture

Desktop-Companion/
β”œβ”€β”€ companion.py, settings_dialog.py # Windows Desktop App (PyQt6 / Python)
β”œβ”€β”€ installer.py, uninstaller.py     # Windows Setup Wizard & System Uninstaller
β”œβ”€β”€ Desktop Companion*.spec          # PyInstaller build recipes
β”œβ”€β”€ build_windows.py                 # Automated one-click build script
β”œβ”€β”€ phone-companion/                 # Android Native App (Kotlin, Jetpack Compose, Material3)
β”œβ”€β”€ apple-companion/                 # Apple Universal App (SwiftUI, macOS AppKit Overlay, iOS)
β”œβ”€β”€ .github/workflows/               # GitHub Actions CI/CD (Automated macOS & iOS builds)
β”œβ”€β”€ public/                          # Firebase Hosting portal (HTML5, PWA manifest, robots.txt)
β”‚   β”œβ”€β”€ downloads/                   # Downloadable ZIPs (Windows, Android, Apple, Avatar Pack)
β”‚   └── assets/                      # Web icons, OpenGraph cards, audio
β”œβ”€β”€ firebase.json, .firebaserc       # Firebase hosting, CSP & security configuration
└── assets/                          # App audio, tray icons, and bundled custom avatars

πŸ’» 1. Windows Desktop App

  • Daily Goal & Cup Tracker: Progress badge (e.g. πŸ₯› 3 / 8 Cups Today) with high-precision system clock synchronization. Automatically resets daily intake to 0 at midnight (00:00:00) and upon PC wake from sleep or hibernation.
  • πŸ‘‘ Accessory Evolution: Reaching 4 cups unlocks pixel sunglasses πŸ•ΆοΈ; completing your daily goal unlocks a golden celebration crown πŸ‘‘ with confetti!
  • πŸŒ™ Working & Quiet Hours: By default, runs during office hours (Mon–Fri, 9:00 AM – 6:30 PM) and completely silences reminders during quiet rest hours (10:00 PM β€” 8:00 AM).
  • ⏸️ Meeting Mode / Smart Snooze: Right-click tray menu > Meeting Mode / Pause to snooze reminders for 30m, 1h, 2h, or today without closing the application.
  • Multi-Break Variety: Rotates between Hydration reminders, 20-20-20 Eye Strain breaks (Look 20 feet away for 20 seconds πŸ‘οΈ), and Posture Stretches (Roll shoulders & stretch 🧘).
  • Gentle Droplet Chime: Native droplet sound (drip.wav) plays softly when the companion walks onscreen.
  • Interactive Petting: Click the avatar to pet it and watch floating hearts (❀️) float up with cute responses!
  • Zero Idle CPU: Animation timers stop completely when offscreen, ensuring zero background CPU drain.

Windows Development & Building on a New PC:

# 1. Setup Python Virtual Environment
python -m venv .venv
.venv\Scripts\activate

# 2. Install Dependencies
pip install -r requirements.txt

# 3. Run Directly
python companion.py

# 4. Automate Full Build (App, Uninstaller, Setup.exe, and Download Zip)
python build_windows.py

πŸ€– 2. Android App (Phone Companion)

  • Built with Jetpack Compose, Kotlin Coroutines, and Material Design 3.
  • Includes full hydration progress cards, character selection across native pixel skins, alarm/notification manager, and sound/haptics.
  • Supports Android 8.0 (API 26) through Android 15+.

Android Development & Building on a New PC:

cd phone-companion

# Build Debug APK
./gradlew assembleDebug

# Build Release APK
./gradlew assembleRelease

Or open the phone-companion directory in Android Studio and click Run.


🍎 3. Apple App (macOS & iOS)

  • Built with pure SwiftUI and native Combine architecture.
  • macOS Target: Floats as a transparent desktop pet overlay across multi-monitor spaces with taskbar dock/menu bar controls.
  • iOS Target: Interactive wellness tracker, home screen widgets, and lock screen hydration notifications.
  • Automated Cloud CI/CD: Pushing to main runs .github/workflows/build-apple.yml on a GitHub macos-latest runner with Xcode to build .dmg and .ipa artifacts automatically.

Apple Development on a Mac:

cd apple-companion
open "Apple Companion.xcodeproj"
# Press Cmd + R in Xcode to build and run

πŸ”₯ 4. Firebase Web Portal & Hosting

Live Production Portal: https://mycompanionhub.web.app

  • Progressive Web App (PWA): Built with an installable manifest.json allowing visitors to install Companion Hub as a standalone desktop or mobile web app directly from Chrome, Edge, or Safari with offline caching and deep space navy theme styling (#080C15).
  • Smart Device Auto-Detection: Automatically identifies visitor operating systems (Windows, Android, macOS, iOS) using browser user-agent parsing and highlights the matching platform download card.
  • Dual QR Code Hub: Allows desktop visitors to toggle between Android (.apk) and Apple (.zip) QR codes to download directly to their phones using their camera.
  • Interactive Petting Preview: Click or tap any of the 10 mascots in the browser showcase to preview heart burst particle effects and character voice lines.
  • Global CDN & Bandwidth Shielding: All download buttons point to GitHub Releases CDN assets, keeping monthly Firebase outbound bandwidth virtually untouched.
  • Analytics & Social Graph: Integrated Google Analytics 4 (G-DDFQ122CDZ), OpenGraph 1200x630 cards, and Twitter summary cards for rich link unfurling on WhatsApp, Slack, LinkedIn, and Discord.

Deploying to Firebase on a New PC:

npm install -g firebase-tools
firebase login
firebase deploy --only hosting

πŸ›‘οΈ Security & Bot Defense Configuration

Companion Hub enforces defense-in-depth across the desktop app, mobile targets, and web portal:

Desktop & Client Hardening

  • Non-Elevated Execution: Windows app runs strictly in user space with zero administrator or UAC prompts.
  • Zip-Slip Traversal Protection: Canonical path validation during archive extraction.
  • Safe Avatar Importation: Strict file extension whitelisting (.gif, .png), 15 MB file size limit, and header validation via QImageReader.
  • Hardened Local IPC: Local communication channel (companion_ipc) is restricted to whitelisted commands (SUMMON), rate-limited to 1.5s, with bounded buffers to prevent buffer overflows or local DoS.
  • Memory & GDI Leak Prevention: All drawing routines explicitly terminate painters to prevent Windows GDI handle exhaustion over long multi-day runtimes.
  • Continuous CodeQL SAST Analysis: Automated GitHub CodeQL semantic scanning runs on every push and pull request to detect and prevent security flaws and supply chain vulnerabilities.

Web Infrastructure & Crawler Defense

  • HTTP Security Headers: HSTS (max-age=31536000; preload), X-Frame-Options: DENY (anti-clickjacking), X-Content-Type-Options: nosniff, and strict Permissions-Policy.
  • Content Security Policy (CSP): Whitelists only trusted origins ('self', Google Tag Manager, Google Analytics, QR Server).
  • Crawler Policy (robots.txt): Allows verified search crawlers (Google, Bing, Apple) and social preview bots (WhatsApp, Twitter/X, LinkedIn, Slack) while strictly blocking aggressive SEO scrapers (Ahrefs, Semrush, Bytespider), AI harvesters (GPTBot, CCBot, ClaudeBot), and exploit scanners (sqlmap, Nmap, WPScan).
  • Download Abuse Safeguards: Route /downloads/** enforces X-Robots-Tag: noindex, nofollow, Content-Disposition: attachment, and 24-hour Edge CDN caching to eliminate server bandwidth exhaustion.

πŸ“¦ Official Downloads & Distribution Package

You can download pre-compiled packages directly from the official v2.0.0 GitHub Release (unlimited, fast global CDN) or through the Web Portal:

Platform / Target Package Type Direct CDN Download Link Size
Windows 10 / 11 Setup Wizard (.exe) πŸ“₯ Desktop.Companion.Setup.exe ~72 MB
Windows 10 / 11 Portable Bundle (.zip) πŸ“₯ Desktop-Companion-Windows.zip ~71 MB
Android Phone Direct APK (.apk) πŸ“₯ Phone.Companion.apk ~8.1 MB
Android Phone Package (.zip) πŸ“₯ Phone-Companion-Android.zip ~7.6 MB
Apple (macOS & iOS) SwiftUI & Overlay (.zip) πŸ“₯ Apple-Companion.zip ~29 KB
Community Avatars Extension Pack (.zip) 🎁 Companion-Avatar-Pack.zip ~12.7 KB

πŸ“œ Community & Legal

About

Interactive cross-platform desktop & mobile wellness companion (Windows, Android, macOS, iOS). Tracks hydration, posture breaks, and includes 18 pixel mascots.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages