$ show victrme/Bonjourr
Bonjourr is a browser extension that replaces the default new tab page with a highly customizable, privacy-focused dashboard. It is built entirely with TypeScript and Deno (no npm dependencies), using a plain Deno build system to produce extensions for Chrome, Firefox, Edge, Safari, and a PWA version. The code follows a modular feature-dispatcher pattern: each feature (clock, weather, quick links, notes, Pomodoro timer, backgrounds, search bar, quotes, custom CSS, fonts, layout editor) exports an init/update function, allowing clean separation and runtime updates without page reload. A unified storage layer (`storage.ts`) abstracts over `chrome.storage.sync/local` and `localStorage`, while a sophisticated compatibility migration system (`filters.ts`) handles data schema evolution across versions (test configs from v10.0.0 to v20.4.2 confirm backward compatibility). The extension integrates with external APIs (Unsplash, Pixabay, weather.bonjourr.fr, Fontsource, GitHub Gist) for dynamic content and settings sync, but remains opt-in and does not track users. The UI is built with vanilla HTML/CSS, uses CSS custom properties for theming, and includes a full settings panel with help mode for troubleshooting. Despite its large feature set, the architecture remains maintainable through careful abstraction, though some coupling in the main settings module and reliance on third-party services introduce moderate technical drift.
The LLM identified 6 files worth highlighting for reuse:
Unified storage abstraction providing a consistent API over chrome.storage.sync, chrome.storage.local, and window.localStorage. Supports automatic namespace prefixing, batch get/set, and observability via custom events. Reusable in any web extension or progressive web app needing transparent storage persistence with fallback.
Implements a series of filter functions that transform user data from older formats to current schema across extension versions. Each filter is self-contained, clearly named (e.g., `newLinkIcons`, `newBackgroundsField`), and composed into a pipeline. This pattern is directly reusable in any application that needs to safely migrate stored data across breaking changes without losing user settings.
A clean, generic debounce utility with a simple interface (returns a function). No dependencies on internal modules. Reusable in any TypeScript/JavaScript project for throttling rapid events like input, resize, or scroll.
Provides a unified cache with pluggable backends: IndexedDB (via idbcache.ts) and CacheStorage, selecting the best available option. Handles serialization, expiration, and cache invalidation. Demonstrates a pattern for building reliable client-side caching layers that work across different browsers and storage limits.
A self-contained class that creates and manages a seamless looping video background. Handles mobile restrictions, autoplay, caching, and cross-origin video. Can be extracted as a standalone component for any project needing a reliable video background with loop and fade transitions.
Implements a 'NetworkForm' pattern: a reusable helper that manages form states for async network operations (submitting, success, warning, error). Automatically disables forms, shows loading spinners, and displays server responses. Reusable in any web application that makes API calls from within forms.