Skip to content

πŸ… 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-dashoffset animation, 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 + FAQPage JSON-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.

cd C:\ssClawy\aguidetocloud-revamp
python scripts/gen-ambient.py

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

  1. Single-page timer β€” tasks + ambient sounds visible without switching tabs. Users who just want a timer get everything on one screen.
  2. Settings in modal β€” keeps the timer page clean. Power users find βš™οΈ, casual users get smart defaults.
  3. Synthetic sound labels β€” "Focus", "Calm", "Bright" etc. instead of pretending to be rain/forest. Honest naming for what they are.
  4. Duration presets β€” 25/5, 50/10, 90/15 covers most use cases without opening settings.
  5. Colourful ambient pills β€” each sound has its own colour for visual distinction. Uses CSS color-mix() for tinted backgrounds/borders from a single --pill-color variable.