I built this because my day looks like a bunch of mini clock‑ins and clock‑outs. When it’s time to update my invoice, adding up all those ranges was a tiny, annoying time sink. This little app lets me punch in start/end times fast and instantly see my total in decimal hours. Fewer sighs, faster invoices.
• Demo: https://workhourstracker.netlify.app/
- dev: Start the dev server
- build: Type-check and build for production
- preview: Preview the production build locally
- lint: Run ESLint
npm install
npm run devThen open the URL printed in the terminal.
- Click "+ Add range" to add more rows.
- For each range, type hours and minutes, then tap the AM/PM toggle (no fiddly native time pickers).
- The total updates automatically as soon as times are entered/changed.
- Click "Clear" to reset all rows for a new day.
Notes:
- Incomplete rows are ignored in the total.
- End time must be after start time (no overnight support yet).
- Total is rounded to exactly 2 decimals (e.g., 1:15 → 1.25, 2:30 → 2.50).
Because invoices. 1h 15m = 1.25, 45m = 0.75 — quick to multiply by your rate and drop into an invoice.
src/App.tsx– main app: rows list, add/remove, clear, and totalsrc/components/TimeRangeRow.tsx– a single time range row with validationsrc/utils/time.ts– minutes math, 12‑hour input → minutes, and decimal roundingsrc/types.ts– shared typessrc/App.css,src/index.css– light blue theme and layout
- React + TypeScript (Vite)
- 100% client‑side — no backend needed
- Minimal, light‑blue UI that stays out of your way