An open API service indexing awesome lists of open source software.

https://github.com/blordeus/pomodoro-app

A Pomodoro timer app with customizable fonts, accent colors, and adjustable session times. Built with React and Vite.
https://github.com/blordeus/pomodoro-app

css frontend-mentor javascript pomodoro productivity react responsive timer vite

Last synced: 14 days ago
JSON representation

A Pomodoro timer app with customizable fonts, accent colors, and adjustable session times. Built with React and Vite.

Awesome Lists containing this project

README

          

# Frontend Mentor โ€” Pomodoro App

![Challenge Difficulty](https://img.shields.io/badge/Difficulty-Advanced-red?style=flat-square)
![Status](https://img.shields.io/badge/Status-Completed-4F8EF7?style=flat-square)
![React](https://img.shields.io/badge/React-20232A?style=flat-square&logo=react&logoColor=61DAFB)
![Vite](https://img.shields.io/badge/Vite-646CFF?style=flat-square&logo=vite&logoColor=white)
![CSS3](https://img.shields.io/badge/CSS3-1572B6?style=flat-square&logo=css3&logoColor=white)

This is my solution to the [Pomodoro App challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/pomodoro-app-KBFnycJ6G).

## ๐Ÿ“ธ Preview

![App Preview](./preview.jpg)

## โœ… Features

- Three timer modes โ€” Pomodoro (25 min), Short Break (5 min), Long Break (15 min)
- Animated SVG circular progress ring that drains as time counts down
- START / PAUSE / RESUME / RESTART timer controls
- Settings modal with:
- Adjustable times for each mode via custom +/โˆ’ inputs
- Three font options (Kumbh Sans, Roboto Slab, Space Mono)
- Three accent color options (Red, Cyan, Purple)
- Settings persist across sessions via localStorage
- Font and color apply globally on the fly without page reload
- Fully responsive โ€” mobile, tablet, and desktop layouts

## ๐Ÿ› ๏ธ Built With

- React 18 (functional components, custom hooks)
- Vite
- CSS3 (custom properties, flexbox)
- SVG `stroke-dashoffset` for the circular progress ring

## ๐Ÿ’ก What I Learned

- **SVG circular progress** โ€” calculating `stroke-dasharray` and `stroke-dashoffset` to animate a ring that drains clockwise from 12 o'clock
- **Custom hooks** โ€” separating timer logic (`useTimer`) and settings persistence (`useSettings`) into reusable hooks keeps `App.jsx` clean
- **CSS custom properties at runtime** โ€” applying font and color changes globally by setting `--accent` and `--font-app` on `:root` via `document.documentElement.style.setProperty`
- **Timer state machine** โ€” managing idle โ†’ running โ†’ paused โ†’ complete states cleanly with `useEffect` and `useRef` for the interval

## ๐Ÿš€ Getting Started

```bash
git clone https://github.com/blordeus/pomodoro-app.git
cd pomodoro-app
npm install
npm run dev
```

Open `http://localhost:5173` in your browser.

## ๐Ÿ”— Links

- [Live Demo](https://pomodoro-app-one-phi.vercel.app/)
- [Frontend Mentor Challenge](https://www.frontendmentor.io/challenges/pomodoro-app-KBFnycJ6G)

## ๐Ÿ‘ค Author

**Bryan Lordeus**
[Portfolio](https://bryanlordeus.com) ยท [Frontend Mentor](https://www.frontendmentor.io/profile/blordeus) ยท [GitHub](https://github.com/blordeus)