$ show TTLApp/time-to-leave
Time to Leave is a cross-platform Electron desktop application for tracking work hours and calculating when it is time to leave. The code implements a classic Electron main-process/renderer split: main-process modules handle window creation, menus, system tray, native notifications, update checks, import/export, and persistent JSON storage via electron-store, while renderer windows provide the calendar, preferences, and workday-waiver UIs. Users can record punch in/out times, manage waived workdays and holidays, view day and month calendar breakdowns, and receive notifications when their calculated leave time arrives. All data is stored locally, with optional export/import through a .ttldb JSON format that is schema-validated on import.
The LLM identified 3 files worth highlighting for reuse:
Self-contained module for parsing, validating, subtracting, adding, multiplying, and formatting time values. It has no Electron or DOM dependencies and is used by both main and renderer processes, making it easy to extract into any JavaScript project that needs robust time math. The defensive validation and pure-function style are test-covered and non-obvious.
Schema-driven validator for the app's .ttldb import format. It extends JSON Schema with custom formats for date and time-array fields, producing clear errors on malformed user-supplied files. This is a generic, reusable safeguard for any application that needs to validate JSON payloads or untrusted user imports.
Python utility that compares translation files across locale bundles and reports missing or extra keys. It solves a recurring localization-maintenance problem and can be adapted to any JSON-based i18n structure. Its parameterized design makes it suitable for CI integration and it demonstrates lightweight data-quality tooling for multi-language projects.