Git Product home page Git Product logo

pomodoro-timer's Introduction

๐Ÿ… Pomodoro Timer

โญ React Project for Thinkful's Software Engineering program โญ

โ— Project Prompt:

The Pomodoro Technique is a time-management method developed by Francesco Cirillo in the late 1980s. The technique uses a timer to break down work into intervals, traditionally 25 minutes in length, separated by short breaks. Each interval is known as a pomodoro, from the Italian word for tomato, after the tomato-shaped kitchen timer that Cirillo used as a university student. For this project, you will implement a simplified version of Cirillo's original Pomodoro technique.

This project is designed to test your ability to work with rendering and state management using React. Before taking on this project, you should be comfortable with the learning objectives listed below:

  • Installing packages via NPM
  • Running tests from the command line
  • Writing React function components
  • Using hooks like useState()
  • Debugging React code through console output

You will implement a Pomodoro timer that follows these steps (simplified from the original technique):

  • Set the focus duration (default to 25 minutes, no less than 5 or more than 60).
  • Set the break duration (default to 5 minutes, no less than 1 or more than 15).
  • When the user clicks the Play button, the timer starts.
  • When the focus time expires, an alarm plays and then the break timer starts.
  • When the break time expires, the alarm plays again and then the focus timer starts.

Additional Instructions:

  • Break up the code into at least two additional components that have a single responsibility.
  • The user cannot change the duration of the focus or break during a focus or break session.
  • Display durations as mm:ss. That is, 05:00 for 5 minutes or 18:45 for eighteen minutes and forty-five seconds.
  • This application should use Bootstrap 4 for styling and Open-Iconic icons for icons.

๐Ÿ… Initial Screen

  • The initial screen lets the user set the length of the focus and break and break sessions. initial screen
  • The Stop button is disabled on the initial screen because the user has not yet started the timer.
  • When the user clicks the Play button, the timer will always start a new focus session.

๐Ÿ… Active Session Screen

  • After the user clicks the Play button, the buttons to change the focus and break duration are disabled, and the session timer appears. active session
  • The session timer shows the type of session, either "Focusing" or "On Break", the total duration of the session, the time remaining, and a progress bar showing how much of the session is complete.

๐Ÿ… Paused Session Screen

  • If the user clicks the Pause button, "paused" appears below the time remaining and the Pause button becomes Play button. paused session
  • The session timer shows the type of session, either "Focusing" or "On Break", the total duration of the session, the time remaining, and a progress bar showing how much of the session is complete.

๐Ÿ… Stopping a Session

  • Stopping a session returns the application to the initial screen and the user is able to change the focus and break duration.
  • Clicking the Play button will always start a new focus session.

โญ๏ธ Demo

โญ๏ธ Click here for live demo โญ๏ธ

๐Ÿ… Focusing

pomodoro focusing

๐Ÿ… Adjust Focus and Break Time

pomodoro adjust focus and break time

๐Ÿ… Play, Pause, and Stop Timer

play, pause, and stop pomodoro timer

๐Ÿ’ป Tech Stack

  • React
  • React Hooks
  • JavaScript
  • HTML
  • CSS

๐Ÿ“ธ Screenshots

๐Ÿ… Initial Screen

pomodoro initial screen

๐Ÿ… Play Screen: Focusing

pomodoro play screen: focusing

๐Ÿ… Play Screen: Break

pomodoro play screen: break

๐Ÿ… Paused Screen

pomodoro paused screen

๐Ÿ–ฅ Run Locally

Clone the project

  git clone https://link-to-project

Go to the project directory

  cd my-project

Install dependencies

  npm install

Start the server

  npm run start

๐Ÿ“ˆ Running Tests

To run tests, run the following command

  npm run test

๐Ÿ““ Project Requirements and Acceptance Criteria

๐Ÿ… Project rubric

For your project to pass, all of the following statements must be true:

  • All tests are passing.
  • All props are treated as read-only.
  • Audio plays when the focus timer expires.
  • Audio plays when the break timer expires.
  • All state is updated using callbacks to avoid race conditions. Allowable exceptions are cases where the next state is not determined by the current state. For example, when disabling the timer, it is okay to just call setIsTimerRunning(false).
  • There are at least three components.
  • Each component has a single responsibility.
  • The main Pomodoro is free of any conditional display logic. This means that there aren't any if statements in the render function; each component determines its own visibility.

pomodoro-timer's People

Contributors

nikki-mac avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.