CalcKit
Technical documentation for CalcKit — a static, offline-first PWA built with vanilla JavaScript modules.
Module Architecture
app.js— app shell, tab switching, and shared UI logic.calc.js— the basic calculator engine and expression evaluation.convert.js— unit conversion logic and conversion tables.health.js— health calculators (BMI, BMR, and more).tools.js— additional utility tools.
PWA Setup
- Service worker (
sw.js) — cache-first for the app shell, network-first for navigation, so the app works offline. - Manifest (
manifest.json) — installable with standalone display and app icons. - Dark mode —
data-themeattribute with CSS custom properties from the shared design system.
Design System
All styling uses the root design tokens from /assets/css/base.css — no hardcoded colors or spacing.