← Back to Projects
Whisker Dairy — PetCare System project screenshot

Whisker Dairy — PetCare System

Health tracking and time-based reminder system for managing pet care.

Live Code

Overview

A full-stack system that converts pet health data into actionable states and automated reminders using scheduling logic and notification workflows. Pet records (vaccines, medications, feeding times) are classified server-side into overdue, due-today, and upcoming states. The frontend dashboard aggregates these states per pet and surfaces them as prioritized action items. Browser push notifications are delivered via the Web Push API and Service Workers, with timezone-aware scheduling to ensure reminders fire at the correct local time.

Key Features

  • Health classification engine — server-side state resolution into overdue, due-today, and upcoming categories per pet record
  • Time-based reminder system for vaccines, medication schedules, and feeding times with configurable intervals
  • Browser push notifications via Service Workers and Web Push API with timezone-aware scheduling
  • Pet profile management with image upload support via Supabase Storage
  • Dashboard aggregation view showing health status across all registered pets at a glance
  • REST API backend with Supabase as the persistent data layer; JWT-based auth for user isolation

Tech Stack

Frontend: React, Tailwind CSS, Vite

Backend: Node.js, Express.js, Supabase

Database: Supabase (PostgreSQL)

Auth: JWT, Supabase Auth

Challenges

  • Timezone accuracy — push notification scheduling had to account for the user's local timezone rather than the server's UTC offset
  • Service Worker lifecycle — the SW needed to handle push events even when the browser tab was closed or backgrounded
  • State classification correctness — health states (overdue vs due-today) depended on precise date comparisons that needed to be consistent between server and client

Solutions

  • Stored all schedule times as UTC in the database; the client sends its timezone offset at registration, and the server computes the correct UTC delivery time for each push subscription
  • Implemented a persistent SW registration pattern that re-subscribes on app load; tested background push delivery across Chrome and Firefox
  • Centralized date comparison logic into a shared utility module used by both the API routes and the frontend display layer — single source of truth for state resolution

Future Improvements

  • Vet appointment scheduling with calendar integration and reminder escalation
  • Multi-pet household support with shared access for family members
  • Health history export as a PDF report for vet visits