A simple Pomodoro timer application to help you manage your time effectively using the Pomodoro Technique.
This configurable Pomodoro timer built with React + TypeScript and Vite.
This app provides a focused-timer experience with configurable work/short-break/long-break durations, an auto-break option, and lightweight statistics persisted to the browser's localStorage.
- Configurable durations for: Work, Short Break, Long Break
- Configurable number of cycles before a long break
- Start / Pause / Reset controls
- Auto-start break option
- Visual progress bar and remaining time in the document title
- Rounds counter and simple statistics (work sessions, focus time, breaks, rounds, long breaks)
- Statistics persisted in
localStorageso they remain between sessions - Desktop notifications
- Set the minutes for Work, Short Break and Long Break fields.
- Set how many cycles (work sessions) you want before a Long Break.
- Use the "Auto-break" switch to automatically start a break when a work session ends.
- Click Start to begin a work session. Click Pause to pause the timer, Reset to stop and reset the state.
- When the timer runs out, the app records elapsed time into the statistics and switches to the next mode (short or long break depending on cycles).
- Statistics are automatically saved to
localStorageso closing the tab won't lose your totals.
The app also updates the browser tab title to show the remaining time and current mode (e.g. "24:12 — Focus").
Statistics are managed by src/context/StatsContext.tsx and saved to the browser's localStorage key pomodoro_stats.
The tracked metrics include:
- workSessions — number of completed work sessions (increments each finished or partially recorded work period)
- totalFocusSeconds — sum of all focused seconds recorded
- totalBreakSeconds — sum of all break seconds recorded
- roundsCompleted — number of full rounds/cycles completed
- longBreaksTaken — how many long breaks were taken
- React + TypeScript
- Vite (dev server + build)
- Tailwind CSS + utility components
- Radix UI components (Dialog, Label, Progress, Switch) and small UI primitives in
src/components/ui - Class Variance Authority for component variants
- React Hook Form with resolvers for form handling
- Command palette (cmdk) for keyboard shortcuts
- Date-fns for date manipulation
lucide-reactfor icons- Jest for testing
Prerequisites: Node.js (>= 18 recommended) and npm.
- Clone the repo
git clone https://github.com/sametcelikbicak/pomodoro.git
cd pomodoro- Install dependencies
npm install- Run the dev server
npm run devOpen http://localhost:5173 (or the address printed by Vite) to view the app.
npm run dev— start Vite dev servernpm run build— run TypeScript build and produce a production-readydistvia Vitenpm run preview— preview a production build locallynpm run deploy— runpredeploy(build) then publish thedistfolder to GitHub Pages (usesgh-pages)npm run format— run Biome lint and prettier rules
The project includes a deploy script which publishes the dist folder to GitHub Pages using the gh-pages package. Ensure your repository settings / homepage (if needed) are configured for GitHub Pages.
To deploy:
npm run deploysrc/
├── components/ # React components
│ ├── CommandPalette/ # Command palette component for keyboard shortcuts
│ ├── Footer/ # Footer component
│ ├── Header/ # Header component
│ ├── Pomodoro/ # Main Pomodoro timer component
│ ├── Statistics/ # Statistics display component
│ └── ui/ # Reusable UI components (buttons, cards, inputs, etc.)
├── context/ # React context for state management
│ └── stats-context # Statistics context and provider
├── hooks/ # Custom React hooks
│ └── use-stats # Hook for accessing statistics
├── lib/ # Utility functions and helpers
└── utils/ # Additional utilities (notifications, etc.)
- The main app entry is
src/main.tsxand the top-level UI lives insrc/App.tsx. - The Pomodoro logic is implemented in
src/components/Pomodoro/Pomodoro.tsx. - Lightweight UI primitives are under
src/components/ui(tailwind + Radix patterns). - Statistics are provided by
src/context/StatsContext.tsx.
If you change timers or how sessions are recorded, make sure to update StatsContext so stored metrics remain consistent.
Contributions are welcome. Please open an issue for bigger changes or a PR with a clear description of the change and why it's needed.
Suggested workflow:
- Fork the repository and create a feature branch
- Run and test locally (
npm install && npm run dev) - Keep code formatted with
npm run formatbefore submitting a PR
MIT