π Pomodoro Focus Timer¶
URL: aguidetocloud.com/pomodoro/
Status: β Built, not yet integrated into site nav/toolkit
Accent:#EF4444(Tomato Red)
Cost: $0/month β 100% client-side
Pipeline: None (browser JS + static WAV files)
Overview¶
A beautiful Pomodoro productivity timer with customisable focus sessions, ambient sounds, task tracking, and detailed statistics. Everything runs in the browser β no accounts, no API calls, all data stays in localStorage.
Architecture¶
Files¶
| File | Size | Purpose |
|---|---|---|
content/pomodoro/_index.md |
3KB | Front matter + 8 FAQ items |
layouts/pomodoro/list.html |
~14KB | Hugo template β timer card, tabs, settings modal, JSON-LD |
static/css/pomodoro.css |
~14KB | Full dark theme, glassmorphism, fullscreen mode |
static/js/pomodoro.js |
~42KB | Timer core, tasks, settings, stats, ambient sound engine |
static/audio/pomo-*.wav |
~714KB | 6 pre-generated ambient WAV loops (for future realistic sounds) |
scripts/gen-ambient.py |
~12KB | Python/scipy script to regenerate WAV files |
CSS Namespace¶
All classes use .pomo-* prefix. Body class: page-pomodoro.
Data Storage (localStorage)¶
| Key | Contents |
|---|---|
pomo_settings |
JSON β all timer/sound preferences |
pomo_tasks |
JSON array β task list with estimated/actual pomodoros |
pomo_current_task |
Task ID string |
pomo_stats |
JSON object β keyed by date YYYY-MM-DD, each has focusMin, sessions, tasksDone |
Layout Design¶
The page uses a single-page timer approach β no tab switching needed for core features:
[Tool Hero β shared partial, Tomato Red accent]
[Timer Card β glassmorphism, always visible]
βββ Duration presets: 25/5 | 50/10 | 90/15 | βοΈ Custom
βββ Phase label: FOCUS / SHORT BREAK / LONG BREAK
βββ SVG ring timer (260Γ260, animated stroke-dashoffset)
βββ Session dots (π
β β β)
βββ Controls: βΊ Reset | βΆ Start | β Skip
βββ Quick task input (inline, click to expand)
βββ Ambient sound pills (6 synthetic: Focus/Calm/Bright/Deep/Static/Warm)
βββ Volume slider
βββ Bottom row: π
count | Auto toggle | Mute | Fullscreen | βοΈ Settings
βββ Break quote (hidden during focus)
βββ Keyboard shortcuts hint (desktop only)
[Two Tabs below timer card]
βββ π Tasks β full task list management
βββ π Stats β today/week/all-time/heatmap
[Settings Modal β opens via βοΈ button]
βββ Timer durations (4 sliders)
βββ Automation toggles
βββ Alert sound type + volume
βββ Reset to defaults
Features¶
Timer (always visible)¶
- SVG ring countdown β
stroke-dashoffsetanimation, phase-coloured (red/green/blue) - Duration presets β 25/5, 50/10, 90/15 quick-switch pills, plus βοΈ Custom opens settings
- Phase indicator β colour-coded uppercase label
- Session dots β π for completed, β for remaining (count matches "long break every N" setting)
- Auto-start toggle β continues automatically between focus/break
- Fullscreen mode β hides nav/footer/tabs, centres timer
- Browser tab title β updates to
25:00 - Focus | Pomodoro - Browser notifications β when timer ends (requires permission)
- Break quotes β 20 motivational quotes shown during breaks
Ambient Sounds (6 synthetic)¶
Uses Web Audio API β no external files needed:
| Sound | Colour | Technique |
|---|---|---|
| Focus | #EF4444 red |
Pink noise, mid-bandpass (warm, focused hum) |
| Calm | #34D399 green |
Brown noise, lowpass + slow LFO (soothing deep drone) |
| Bright | #FBBF24 gold |
White noise, highpass 3kHz+ (sparkly, airy) |
| Deep | #3B82F6 blue |
Brown noise, lowpass 150Hz + volume swell (rumbling depth) |
| Static | #A78BFA purple |
Clean white noise (simple, electronic) |
| Warm | #F97316 orange |
Muffled brown noise + Cmaj7 chord tones (tonal, cozy) |
Each pill has colour-matched border, background tint, hover glow, and pulsing active animation using CSS color-mix() + --pill-color custom property.
Future: Pre-generated WAV files exist in static/audio/ for realistic ambient sounds (rain, cafΓ©, forest, ocean). The JS has startRealAmbient() ready to use them β just needs UI pills to be re-added.
Tasks¶
- Add with Enter, set estimated pomodoros
- Click to set as current focus (shown on timer)
- Drag-to-reorder (mobile: β²/βΌ buttons)
- Mark complete (β), delete, clear completed
- Track actual vs estimated pomodoros per task
Settings (modal)¶
- Work duration: 1β90 min (default 25)
- Short break: 1β30 min (default 5)
- Long break: 1β60 min (default 15)
- Long break interval: 2β8 sessions (default 4)
- Auto-start breaks/focus toggles
- Browser notifications toggle + test button
- Alert sound: Chime, Bell, Digital, None
- Alert volume + preview
Stats¶
- Today: Focus minutes, sessions, tasks done, day streak
- This Week: Bar chart (MonβSun, Canvas-rendered, today highlighted red)
- All Time: Total hours, total sessions, longest streak, avg daily focus
- Heatmap: GitHub-style 365-day grid, 5 intensity levels
- Export CSV β date/focusMin/sessions/tasksDone
- Clear all data β with confirmation
Keyboard Shortcuts¶
| Key | Action |
|---|---|
| Space | Start/Pause |
| R | Reset |
| S | Skip phase |
| F | Fullscreen toggle |
| M | Mute toggle |
| Escape | Exit fullscreen / close settings |
SEO¶
WebApplication+FAQPageJSON-LD schema- 8 FAQ items (visible + structured data)
- Pagefind searchable hidden block
Alert Sounds (Web Audio API)¶
All synthesised β no audio files:
| Type | Technique |
|---|---|
| π Chime | 3 ascending sine tones (C5, E5, G5), 180ms apart, exponential decay |
| ποΈ Bell | 4 harmonics (A4 + octaves), long 3s decay |
| π Digital | 3 short square wave beeps at 880Hz |
| π None | Silent |
Pre-Generated WAV Files (for future use)¶
Script: scripts/gen-ambient.py β requires Python 3 + numpy + scipy.
Generates 6 WAV files in static/audio/:
| File | Duration | Size | Technique |
|---|---|---|---|
pomo-rain.wav |
2.9s | 89KB | Pink noise + resonant drop impulses + intensity LFO |
pomo-cafe.wav |
3.8s | 119KB | Formant-filtered noise + metallic clink impulses + espresso burst |
pomo-forest.wav |
4.8s | 148KB | Subtle wind + bird chirps (3 types) + AM cricket tones |
pomo-ocean.wav |
5.7s | 178KB | Brown noise + asymmetric wave envelope + foam spray |
pomo-whitenoise.wav |
1.9s | 61KB | Clean white noise |
pomo-lofi.wav |
3.8s | 119KB | Lowpass Cmaj7 chord + vinyl crackle + bass pulse |
All are mono 16kHz 16-bit, crossfade-looped for seamless playback.
Integration Status¶
| Item | Status |
|---|---|
| Content + template + CSS + JS | β Created |
| Tool hero (shared partial) | β
Uses tool-hero.html |
| Body class in baseof.html | β Not added (page-pomodoro β needs one line) |
| toolkit_nav.toml | β Not added |
| Free tools page | β Not added |
| Homepage card | β Not added |
| Nav dropdown | β Not added |
| tool_count bump | β Not done |
| cache_version bump | β Not done |
| Smoke test coverage | β Not added |
| Git commit | β Not committed |
Maintenance¶
- No pipeline β fully static, no data to refresh
- Settings/stats in localStorage β clearing browser data resets everything
- Sound quality β synthetic sounds are abstract/labelled honestly. Realistic WAV files parked for future improvement (would need better source audio or ML-based generation)
Design Decisions¶
- Single-page timer β tasks + ambient sounds visible without switching tabs. Users who just want a timer get everything on one screen.
- Settings in modal β keeps the timer page clean. Power users find βοΈ, casual users get smart defaults.
- Synthetic sound labels β "Focus", "Calm", "Bright" etc. instead of pretending to be rain/forest. Honest naming for what they are.
- Duration presets β 25/5, 50/10, 90/15 covers most use cases without opening settings.
- Colourful ambient pills β each sound has its own colour for visual distinction. Uses CSS
color-mix()for tinted backgrounds/borders from a single--pill-colorvariable.