A lightweight, feature-rich Pomodoro timer built with modern React patterns, Redux Toolkit, and comprehensive testing. Optimized for performance with a focus on clean architecture and developer experience.
- Overview
- Features
- Live Demo
- Quick Start
- Documentation
- Technology Stack
- Project Structure
- Development
- Testing
- Deployment
- Performance
- Contributing
- Roadmap
- License
- Author
- Acknowledgments
PomoBreak is a production-ready Pomodoro timer application that demonstrates modern React development practices. Built as both a functional productivity tool and a learning resource, it showcases:
- Clean Architecture - Separation of concerns with custom hooks and services
- State Management - Redux Toolkit with memoized selectors
- Performance - Code splitting, lazy loading, optimized re-renders (87KB gzipped)
- Testing - Comprehensive test coverage (>80%) with Jest and React Testing Library
- Type Safety - JSDoc annotations for IntelliSense support
- Developer Experience - ESLint, Prettier, pre-commit hooks, CI/CD
Whether you're looking for a productivity tool or a reference implementation of React best practices, PomoBreak has you covered.
- โฑ๏ธ Customizable Timers - Set durations for work sessions (25min), short breaks (5min), and long breaks (15min)
- ๐ Smart Cycles - Automatic progression through pomodoro โ break cycles with long breaks every N cycles
โถ๏ธ Auto-Start - Optional auto-start for breaks and pomodoros- โญ๏ธ Quick Navigation - Forward/backward buttons to skip between modes
- ๐ Audio Notifications - Multiple alarm sounds with volume control and preview
- ๐ต Optional Sounds - Ticking sound and button click feedback
- ๐ Lazy Loading - Routes split into separate bundles, loaded on-demand
- ๐งช 80%+ Test Coverage - Unit, integration, and component tests
- ๐ฆ Tiny Bundle - Only 87KB gzipped (excellent!)
- โฟ Accessible - WCAG AA compliant, keyboard navigation
- ๐ฑ Responsive - Mobile-first design, works on all devices
- ๐จ Theme Support - Clean, modern UI with customizable colors
- ๐ง Custom Hooks - Reusable logic for timers, audio, and state
- ๐๏ธ Centralized State - Redux Toolkit with organized slices
- ๐ต Custom Audio Service - Memory-efficient audio management
- ๐ Comprehensive Docs - Architecture, API, setup, and troubleshooting guides
- ๐ค CI/CD Pipeline - Automated testing and deployment with GitHub Actions
Try it now: https://joshlehman.ca/pomodor
![]() |
![]() |
|---|---|
| Landing Page | Active Timer |
![]() |
![]() |
| Help Page | Settings |
- Node.js >= 17.0.0 (recommended: 18.x or 20.x LTS)
- npm >= 8.0.0
- Git
# Clone the repository
git clone https://github.com/joshl26/pomodoro-app.git
cd pomodoro-app
# Install dependencies
npm install
# Start development server
npm startThe app will open automatically at http://localhost:3000
Using npm (default):
npm install
npm startUsing pnpm:
# Enable via Corepack (Node 16.10+)
corepack enable
corepack prepare pnpm@latest --activate
# Install and run
pnpm install
pnpm startNote: If you encounter pnpm version mismatch errors, remove the
packageManagerfield frompackage.jsonor update it to match your installed version.
Comprehensive documentation is available in the /docs directory:
| Document | Description |
|---|---|
| SETUP.md | Installation, IDE setup, troubleshooting |
| ARCHITECTURE.md | System design, component hierarchy, data flow |
| API.md | Redux actions, selectors, hooks, utilities |
| DEPLOYMENT.md | Deploy to GitHub Pages, Netlify, Vercel, AWS |
| TROUBLESHOOTING.md | Common issues and solutions |
| FAQ.md | Frequently asked questions |
| CHANGELOG.md | Version history and release notes |
| CONTRIBUTING.md | Contribution guidelines |
| ROADMAP.md | Development roadmap and progress |
{
"React": "18.3.1",
"Redux Toolkit": "2.3.0",
"React Router": "6.28.0",
"React Testing Library": "16.1.0",
"Jest": "27.5.1"
}- State Management: Redux Toolkit with custom hooks
- Routing: React Router v6 with lazy loading
- Testing: Jest + React Testing Library
- Styling: CSS Modules with theme support
- Audio: Custom audio service (no external library)
- Build: Create React App with optimizations
- Linting: ESLint + Prettier
- CI/CD: GitHub Actions
React 18: Concurrent features, automatic batching, improved performance
Redux Toolkit: Reduced boilerplate, built-in best practices, DevTools integration
Custom Audio Service: Better memory management than libraries, easier testing, no extra dependencies
CRA: Zero-config setup, battle-tested build pipeline, easy ejection if needed
See ARCHITECTURE.md for detailed design decisions.
pomodoro-app/
โโโ public/ # Static assets
โ โโโ index.html # HTML template
โ โโโ favicon.ico # App icon
โ โโโ sounds/ # Audio files (if not in src)
โโโ src/
โ โโโ assets/ # Images, sounds, fonts
โ โ โโโ sounds/ # Audio files
โ โโโ components/ # React components
โ โ โโโ Timer.jsx # Main timer component
โ โ โโโ Settings.jsx # Settings page
โ โ โโโ SecondaryButtons.jsx
โ โ โโโ Report.jsx
โ โ โโโ Help.jsx
โ โโโ hooks/ # Custom React hooks
โ โ โโโ useAudioManager.js
โ โ โโโ useTimerMode.js
โ โ โโโ useTimerControls.js
โ โ โโโ useAutoStartCycle.js
โ โโโ services/ # Business logic
โ โ โโโ audioService.js # Audio management
โ โโโ store/ # Redux state
โ โ โโโ index.js # Store configuration
โ โ โโโ settingsSlice.js # Settings reducer
โ โ โโโ selectors.js # Memoized selectors
โ โโโ utilities/ # Helper functions
โ โ โโโ util.js # Time formatting, etc.
โ โโโ __tests__/ # Test files
โ โ โโโ components/
โ โ โโโ hooks/
โ โ โโโ store/
โ โ โโโ utilities/
โ โโโ App.jsx # Root component
โ โโโ App.css # Global styles
โ โโโ index.jsx # App entry point
โ โโโ setupTests.js # Test configuration
โโโ .eslintrc.json # ESLint config
โโโ .prettierrc # Prettier config
โโโ package.json # Dependencies
โโโ README.md # This file
โโโ ARCHITECTURE.md # Architecture docs
โโโ API.md # API reference
โโโ ROADMAP.md # Development plan
โโโ CHANGELOG.md # Version history
/components - Presentational and container components
- Each component in its own file
- Co-located styles (
.cssfiles) - Memoized with
React.memo()where beneficial
/hooks - Custom React hooks for reusable logic
useTimerMode- Mode transitions (pomodoro/break)useTimerControls- Start/pause/reset logicuseAudioManager- Audio playback interface
/services - Business logic and external integrations
audioService.js- Singleton audio manager
/store - Redux state management
settingsSlice.js- All app settingsselectors.js- Centralized state selectors
# Development
npm start # Start dev server (http://localhost:3000)
npm run build # Production build
npm test # Run tests in watch mode
npm run lint # Run ESLint
npm run format # Format code with Prettier
# Testing
npm test -- --coverage # Test with coverage report
npm test -- --watchAll=false # Run tests once (CI mode)
npm test -- --testPathPattern=Timer # Run specific test file
# Analysis
npm run analyze # Analyze bundle size-
Create Feature Branch
git checkout -b feature/my-feature
-
Make Changes
- Write code following existing patterns
- Add tests for new functionality
- Update documentation if needed
-
Test Changes
npm test # Run all tests npm run lint # Check for linting errors npm run format # Auto-format code
-
Commit Changes
git add . git commit -m "feat: add my feature"
Follow Conventional Commits:
feat:New featurefix:Bug fixdocs:Documentationtest:Testsrefactor:Code refactoringperf:Performance improvement
-
Push and Create PR
git push origin feature/my-feature
Then open a Pull Request on GitHub.
Components:
import React from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { selectValue } from './store/selectors';
import './Component.css';
/**
* Component description
* @param {Object} props - Component props
*/
const Component = ({ prop1, prop2 }) => {
const value = useSelector(selectValue);
const dispatch = useDispatch();
return (
<div className="component">
{/* JSX */}
</div>
);
};
export default React.memo(Component);Custom Hooks:
import { useState, useEffect, useCallback } from 'react';
/**
* Hook description
* @returns {Object} Hook return value
*/
export const useCustomHook = () => {
const [state, setState] = useState(null);
const method = useCallback(() => {
// Logic
}, []);
return { state, method };
};Current coverage: >80% across the codebase
# Run tests with coverage
npm test -- --coverage --watchAll=false
# Coverage by category:
# - Utilities: 95%+
# - Reducers: 95%+
# - Hooks: 80%+
# - Components: 70%+- Jest - Test runner and assertions
- React Testing Library - Component testing
- @testing-library/user-event - User interaction simulation
- @testing-library/react-hooks - Hook testing
Component Test Example:
import { render, screen } from '@testing-library/react';
import { Provider } from 'react-redux';
import { configureStore } from '@reduxjs/toolkit';
import Timer from './Timer';
import settingsReducer from './store/settingsSlice';
const createMockStore = () => configureStore({
reducer: { settings: settingsReducer }
});
test('renders timer display', () => {
const store = createMockStore();
render(
<Provider store={store}>
<Timer />
</Provider>
);
expect(screen.getByText(/25:00/)).toBeInTheDocument();
});Hook Test Example:
import { renderHook, act } from '@testing-library/react';
import { useTimerMode } from './useTimerMode';
test('advances to next mode', () => {
const { result } = renderHook(() => useTimerMode());
act(() => {
result.current.advanceMode();
});
expect(result.current.timerMode).toBe('shortBreak');
});See ARCHITECTURE.md - Testing Strategy for detailed patterns.
GitHub Pages (Current):
npm run deployNetlify:
npm install -g netlify-cli
netlify deploy --prodVercel:
npm install -g vercel
vercel --prodDetailed deployment instructions for:
- GitHub Pages (automated with GitHub Actions)
- Netlify (with
netlify.tomlconfig) - Vercel (with
vercel.jsonconfig) - AWS S3 + CloudFront
- Docker containerization
See DEPLOYMENT.md for complete guides.
Create .env.production for production builds:
# Public URL (for subdirectory deployments)
PUBLIC_URL=/pomodor
# Disable source maps (security)
GENERATE_SOURCEMAP=false
# API endpoint (if backend added)
REACT_APP_API_URL=https://api.yourdomain.com
# Analytics (optional)
REACT_APP_GA_ID=G-XXXXXXXXXXMain bundle: ~250KB (uncompressed)
Main bundle: ~87KB (gzipped) โ
CSS bundle: ~15KB (gzipped)
Total load: ~102KB (excellent!)
Performance: 95/100 โ
Accessibility: 100/100 โ
Best Practices: 100/100 โ
SEO: 92/100 โ
- Code Splitting - Routes lazy-loaded with
React.lazy() - Memoization -
React.memo(),useMemo(),useCallback() - Selector Optimization - Memoized Redux selectors with Reselect
- Asset Optimization - Compressed images, optimized audio files
- Tree Shaking - Unused code eliminated in production
- Caching - Proper cache headers for static assets
# Run Lighthouse audit
npm install -g lighthouse
lighthouse http://localhost:3000 --view
# Analyze bundle
npm run build
npx webpack-bundle-analyzer build/static/js/*.jsSee ARCHITECTURE.md - Performance Optimizations for details.
We welcome contributions! Here's how to get started:
- Fork the repository
- Clone your fork
- Create a feature branch
- Make changes with tests
- Submit a pull request
Good First Issues:
- ๐ Documentation improvements
- ๐ Bug fixes
- ๐จ UI/UX enhancements
- โ Additional tests
Advanced Contributions:
- ๐ Performance optimizations
- โ๏ธ New features from roadmap
- ๐๏ธ Architecture improvements
- ๐ง Build/tooling enhancements
- Follow existing code style (ESLint + Prettier enforced)
- Write tests for new features
- Update documentation as needed
- Keep PRs focused and atomic
- Link PRs to relevant issues
See CONTRIBUTING.md for detailed guidelines.
Progress: 97/147 tasks completed (66%)
Completed Phases:
- โ Phase 1: Performance & Code Quality (13/13)
- โ Phase 2: State Management (14/14)
- โ Phase 3: Audio Management (11/11)
- โ Phase 4: Modernization (36/36)
- โ Phase 5: Testing & Quality (15/15)
In Progress:
- โณ Phase 6: Performance Optimization (8/12)
- โณ Phase 8: Developer Experience (8/14)
Planned:
- ๐ Phase 7: Features & UX (0/16)
- ๐ Phase 9: Documentation (8/8) โ COMPLETE
- ๐ Phase 10: Maintenance & Monitoring (0/8)
Next Release (v2.1.0):
- Keyboard shortcuts (Space, Escape, arrows)
- Desktop notifications
- CSS optimization
- Performance profiling improvements
Future Releases:
- localStorage persistence
- Dark mode toggle
- Session history and statistics
- Export/import settings
- PWA support (offline mode)
- Multi-language support (i18n)
See ROADMAP.md for the complete development plan.
This project is licensed under the MIT License.
MIT License
Copyright (c) 2025 Joshua Lehman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
What this means:
- โ Commercial use
- โ Modification
- โ Distribution
- โ Private use
- โ Liability
- โ Warranty
See LICENSE file for full text.
Joshua Lehman
- ๐ Portfolio: joshlehman.ca
- ๐ผ LinkedIn: joshrlehman
- ๐ GitHub: @joshl26
- ๐ง Email: Available on portfolio
If you find PomoBreak helpful:
- โญ Star this repository
- ๐ Report bugs and suggest features
- ๐ป Contribute code or documentation
- ๐ข Share with others
- ๐ฌ Provide feedback
- The Pomodoro Technique by Francesco Cirillo
- Open-source Pomodoro timer projects
- React and Redux community best practices
- React - UI library and excellent documentation
- Redux Toolkit - State management made easy
- React Router - Client-side routing
- Jest & React Testing Library - Testing tools
- Create React App - Zero-config build setup
Thanks to:
- All contributors (past, present, and future)
- Users who report bugs and suggest features
- The open-source community for tools and inspiration
- React/Redux communities for guidance and best practices
- ๐ Documentation: Check the docs folder for detailed guides
- ๐ Bug Reports: Open an issue
- ๐ก Feature Requests: Open an issue
- โ Questions: See FAQ.md or open a discussion
- Watch this repository for updates
- Star to show support and bookmark
- Check CHANGELOG.md for version updates
New to React/Redux? This project can help you learn:
- Modern React patterns (hooks, functional components)
- Redux Toolkit state management
- Custom hooks for reusable logic
- Testing React applications
- Project structure and architecture
- Performance optimization techniques
Recommended Learning Path:
- Read ARCHITECTURE.md for system overview
- Explore components in
src/components/ - Study custom hooks in
src/hooks/ - Review tests in
src/__tests__/ - Try making small changes and seeing results
PomoBreak aims to be:
- The reference implementation for modern React + Redux apps
- A learning resource for developers at all levels
- A production-ready tool for productivity
- An open-source community for collaboration
Long-term goals:
- PWA with offline support
- Mobile apps (React Native)
- Cloud sync capabilities
- Team collaboration features
- Plugin/extension system
Lines of Code: ~5,000
Test Coverage: >80%
Bundle Size: 87KB (gzipped)
Dependencies: 25 (minimal!)
Dev Dependencies: 45
Contributors: 1+ (you?)
Stars: โญ (add yours!)
If you like this project:
# Give it a star on GitHub โญ
# Fork it and try new ideas ๐ด
# Share it with friends ๐ข
# Contribute improvements ๐ป
# Report bugs and suggest features ๐Ready to boost your productivity? Try PomoBreak now!
Want to contribute? Check out CONTRIBUTING.md and ROADMAP.md
Need help? See TROUBLESHOOTING.md and FAQ.md
Made with โค๏ธ by Joshua Lehman
Live Demo โข Documentation โข Report Bug โข Request Feature
โญ Star this repo if you find it helpful!



