$ show morkro/happy-plants
HappyPlants is a mobile-first progressive web application (PWA) for managing houseplant care. The core functionality allows users to create and organize plant entries, tracking details like watering schedules, sunlight requirements, growth cycles, notes, and photos. It is implemented as a Vue.js 2 SPA with Vuex state management and vue-router, using Firebase (Authentication, Firestore, Storage) for cloud sync with an offline-first fallback via localforage (IndexedDB). The repository is a monorepo managed by Lerna, containing two parallel application versions: an archived v1 (JavaScript) and an evolving v2 alpha (TypeScript with @vue/composition-api), plus a landing page (Nuxt.js), an unused Express server, Firebase Cloud Functions, and shared packages for components and styles. Key entry points include main.js/main.ts bootstrapping, router definitions, and a Vuex store organized by domain modules. The app relies heavily on the Vue ecosystem, Firebase, and utility libraries like anime.js for animations and localforage for local storage. While the core concept is well-executed with tests and responsive design, the codebase exhibits duplication between v1 and v2, some deprecated dependencies, and an incomplete v2 rewrite, limiting overall craftsmanship.
The LLM identified 3 files worth highlighting for reuse:
Implements Hermite interpolation for high-quality image resizing in pure JavaScript. This is a self-contained, reusable algorithm that avoids external dependencies. It is well-tested (with a spec file) and can be extracted into any project needing fast, client-side image downsizing. Demonstrates non-trivial mathematical understanding and performance awareness.
A Web Worker that fetches plant image URLs in the background, isolating network I/O from the main thread. This pattern is reusable for any PWA or web app requiring non-blocking file downloads. It demonstrates awareness of performance and user experience in a browser context, and can be adapted to other download scenarios with minimal changes.
A fuzzy search utility that matches strings against a query with case-insensitivity and partial matching. The implementation is clean, typed, and self-contained. It can be reused in any TypeScript project needing lightweight, client-side search without external libraries. Shows good algorithmic design and TypeScript usage.