The Synced Pomodoro Timer is a collaborative productivity tool that allows multiple users to join a shared session and synchronize their Pomodoro timers. It supports real-time updates, customizable presets, and session persistence.
- Real-Time Synchronization: Multiple users can join the same session and see timer updates in real-time.
- Customizable Presets: Adjust Pomodoro, short break, and long break durations to suit your workflow.
- Session Persistence: Automatically reconnect to the last session using local storage or URL parameters.
- Frontend: A web-based interface built with HTML, Bootstrap, and JavaScript.
- Backend: A WebSocket server implemented in Node.js to handle real-time communication.
- Dockerized Deployment: Easily deployable using Docker and Docker Compose.
- Docker installed on your machine.
git clone https://github.com/YTKacperSKY/pomodoro-timer.git
cd pomodoro-timerEdit the script.js file in the pomodoro-frontend directory to set the correct backend WebSocket URL:
// filepath: pomodoro-frontend/script.js
// ...existing code...
ws = new WebSocket('wss://your-backend-url'); // Replace 'your-backend-url' with your backend's actual URL
// ...existing code...Edit the docker-compose.yml file to match your domain and email setup:
# filepath: docker-compose.yml
# ...existing code...
environment:
- VIRTUAL_HOST=your-frontend-domain
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=your-frontend-domain
- LETSENCRYPT_EMAIL=your-email
# ...existing code...
environment:
- VIRTUAL_HOST=your-backend-domain
- VIRTUAL_PORT=8080
- LETSENCRYPT_HOST=your-backend-domain
- LETSENCRYPT_EMAIL=your-email
# ...existing code...Use Docker Compose to build and start the frontend and backend services.
docker-compose up --buildThis will:
- Build the frontend and backend Docker images.
- Start the services on the specified ports.
- Frontend: Open your browser and navigate to
https://your-frontend-domain. - Backend: The WebSocket server will be running at
wss://your-backend-domain.
Alternatively, you are free to use my own timer at https://pomodoro.ytkacpersky.de.
To stop the services, run:
docker-compose downThe frontend code is located in the pomodoro-frontend directory. To make changes:
- Navigate to the directory:
cd pomodoro-frontend - Edit the
index.htmlorscript.jsfiles as needed. - Rebuild the Docker image:
docker-compose up --build frontend
The backend code is located in the backend directory. To make changes:
- Navigate to the directory:
cd backend - Edit the
server.jsfile as needed. - Rebuild the Docker image:
docker-compose up --build backend
Contributions are welcome! Please fork the repository, create a feature branch, and submit a pull request.
This project is licensed under the MIT License.
