Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pomodoro Timer App

A cross-platform Pomodoro timer application built with Electron for desktop (Windows, macOS, Linux) and ready for mobile development with React Native.

Features

  • Classic Pomodoro Technique: 25-minute work sessions with 5-minute breaks
  • Customizable Durations: Adjust work, break, and long break durations
  • Visual Progress: Real-time progress bar and timer display
  • Sound Notifications: Audio alerts when sessions complete
  • Desktop Notifications: System notifications for session completion
  • Statistics Tracking: Track completed sessions and total work/break time
  • System Tray: Minimize to system tray with quick access
  • Cross-Platform: Works on Windows, macOS, and Linux

Installation

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn

Setup

  1. Clone or download this repository
  2. Navigate to the project directory
  3. Install dependencies:
npm install

Running the App

npm start

Usage

  1. Start Timer: Click the "Start" button to begin a work session
  2. Pause/Resume: Use the "Pause" button to pause and resume the timer
  3. Reset: Click "Reset" to stop the current session and reset the timer
  4. Customize Settings:
    • Work Duration (1-60 minutes)
    • Break Duration (1-30 minutes)
    • Long Break Duration (1-60 minutes)
  5. View Statistics: Track your productivity with session counts and time tracking

How the Pomodoro Technique Works

  1. Work for 25 minutes on a single task
  2. Take a 5-minute break
  3. After 4 work sessions, take a longer 15-minute break
  4. Repeat the cycle

File Structure

pomodoro/
├── main.js              # Electron main process
├── index.html           # Main application window
├── renderer.js          # Timer logic and UI interactions
├── package.json         # Project configuration
├── assets/
│   └── icon.svg         # Application icon
└── README.md           # This file

Development

Adding New Features

The application is structured for easy extension:

  • Timer Logic: All timer functionality is in renderer.js
  • UI Components: HTML structure in index.html with CSS styling
  • Electron Integration: Window and system tray management in main.js

Building for Distribution

To create distributable packages for different platforms:

  1. Install electron-packager:
npm install --save-dev electron-packager
  1. Add packaging scripts to package.json:
"scripts": {
  "package-win": "electron-packager . pomodoro-timer --platform=win32 --arch=x64",
  "package-mac": "electron-packager . pomodoro-timer --platform=darwin --arch=x64",
  "package-linux": "electron-packager . pomodoro-timer --platform=linux --arch=x64"
}
  1. Run the appropriate package command for your target platform.

Mobile Version (Future Development)

The application is designed to be easily ported to mobile platforms using React Native. The timer logic and state management can be reused with platform-specific UI components.

Troubleshooting

  • Timer not starting: Make sure you have notification permissions enabled
  • No sound: Check your system volume and audio settings
  • App won't minimize: Ensure your system supports system tray functionality

Contributing

Feel free to submit issues and enhancement requests. If you'd like to contribute code:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

This project is open source and available under the ISC License.

About

Claude code + GLM4.5 implemented a simple Pomodoro clock project with just one line "create a pomodoro application", with only one error: index.js was named main.js, preventing it from starting. After correction, there were only warnings.claude code + GLM4.5仅仅用一句create a pomodoro application实现一个简单的番茄时钟项目,只有一个错误index.js命名为main.js导致无法启动,修改后仅仅有警告

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages