Focus in 25-minute blocks. A calm, local-first Pomodoro timer with a built-in task list.
Most timers want an account, a subscription, or a network connection before
they will count down from 25:00. FocusFlow is one static page with no build
step, no framework, and no tracking. Everything you type stays in your
browser's localStorage - there is no backend to send it to.
It is also a small, readable reference for how far you can get with plain HTML, CSS, and modern JavaScript when the state machine is kept separate from the DOM.
The same interface in light theme.
- Pomodoro cycle that keeps count - 25 / 5 / 15 minute blocks, with a long break automatically offered after every fourth completed focus session.
- Built-in task list - add, complete, reopen, delete, and clear tasks. Tasks survive reloads.
- Today's stats - sessions completed and total focused time, reset at local midnight.
- Wall-clock accurate - the countdown is anchored to
Date.now(), so it stays correct even when the tab is throttled or the screen sleeps. - Dark and light themes - remembers your choice, otherwise follows
prefers-color-scheme. - Keyboard first -
Spaceto start or pause,Rreset,Sskip,Nnew task,Ttheme. - Accessible - semantic landmarks, visible focus rings, a skip link,
aria-liveannouncements, and reduced-motion support. - Zero dependencies - no
node_modulesneeded to run or test the app.
| Key | Action |
|---|---|
Space |
Start / pause the timer |
R |
Reset the current block |
S |
Skip to the next block |
N |
Jump to the task input |
T |
Toggle dark / light theme |
← → |
Move between timer modes |
Shortcuts are ignored while you are typing in the task input.
FocusFlow is a static site, so any file server works:
git clone https://github.com/Panz-08/FirstProject.git
cd FirstProject
npm start # python3 -m http.server 4173Then open http://localhost:4173.
There is no install step and no bundler. Opening index.html directly works
too, although a server is recommended so ES modules load with the right MIME
type.
The timer, task model, formatting helpers, and storage wrapper are pure modules, so they can be tested without a browser:
npm testThe suite uses the built-in node:test runner - 34 tests, no dependencies.
CI runs the same command on Node 22 and 24 for every push and pull request.
FirstProject/
├── index.html # single page shell
├── assets/
│ ├── banner.svg # README banner
│ ├── favicon.svg
│ ├── css/style.css # design tokens + layout
│ └── js/
│ ├── main.js # DOM wiring, events, persistence
│ ├── timer.js # Pomodoro state machine (no DOM)
│ ├── tasks.js # immutable task list operations
│ ├── storage.js # safe JSON wrapper around localStorage
│ └── format.js # clock, duration, and date helpers
├── tests/ # node:test suites
└── .github/workflows/ # CI + GitHub Pages deployment
PomodoroTimer never calls setInterval and never reads the clock itself.
Every method takes a now timestamp, and the UI decides when to call tick().
That keeps the cycle logic deterministic:
const timer = new PomodoroTimer();
timer.start(Date.now());
timer.tick(Date.now()); // returns { mode, finished } once the block ends
timer.complete(); // records the session, returns the next modePushes to main are built and published to GitHub Pages by
pages.yml. The workflow copies index.html
and assets/ into an artifact - no build step, no secrets.
FocusFlow stores three keys in localStorage: focusflow:tasks,
focusflow:timer, and focusflow:stats (plus focusflow:theme). Nothing is
sent over the network. Clearing site data resets the app.
MIT © 2026 Panz-08
