Skip to content

โฑ๏ธ๐Ÿง  A simple task timer app where users can track time spent on tasks, mark them as completed, and remove them when finished. ๐Ÿ‘จโ€๐Ÿ’ป All task data is stored in API I set up myself on AWS - served securely over HTTPS using Nginx as a reverse proxy.

Notifications You must be signed in to change notification settings

marrcelp/Task-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

demo gif

TasksManager โ€“ Your Personal Task Timer

See the live version of this project:

The goal of this project is to create a simple but functional task timer app that demonstrates interaction with a REST API. Users can add tasks, track the time spent on them, and mark tasks as completed or removed. All operations are persisted via a backend API.

Each task has a built-in stopwatch, which can be started and stopped manually. Once a task is marked as done, it becomes eligible for deletion from the UI. However, all tasks (including removed ones) are still stored in the backend for future reference.

Main features:

  • Adding new tasks with a custom name.
  • Tracking time for each task individually with start/stop buttons.
  • Marking tasks as completed (displays a green tick).
  • Removing completed tasks from the list (but not from the database).
  • Persisting all task data to an external API (https://13.60.90.67/data).

โ—๏ธ First-time setup notice

For security reasons, the API is hosted with a self-signed HTTPS certificate.
Before using the app for the first time, you need to manually visit the API link and confirm your browser's security exception:

๐Ÿ”— https://13.60.90.67

Steps:

  1. Open the link above in your browser.
  2. Click โ€œAdvancedโ€ โ†’ โ€œProceed to 13.60.90.67 (unsafe)โ€.
  3. Return to the app โ€“ it will now be able to fetch data from the API correctly.

โœ… This only needs to be done once per browser.

๐Ÿ’ก Technologies

React JavaScript REST API AWS


๐Ÿ’ฟ Installation

The project uses npm. To install it, type into the terminal:

npm install

To run the project locally:

npm start

Then open:

  • http://localhost:4000 to view the app in the browser.

To start the backend, you don't need to run anything locally. The API is already live and running on a server I configured myself on AWS using json-server. It is served over HTTPS with a self-signed certificate using Nginx as a reverse proxy.

API endpoints:

๐Ÿ”— https://13.60.90.67/data

๐Ÿ› ๏ธ AWS Server Configuration (short overview)

I manually set up an Ubuntu-based EC2 instance on AWS to host the API for this project.

After configuring the firewall and opening the necessary ports (4000 for the app and 443 for HTTPS), I:

  • Installed Node.js on the server.
  • Globally installed json-server for quick REST API setup.
  • Created a data.json file to store the task data.
  • Used PM2 to run the json-server process in the background and keep it alive after reboots.

The API runs on port 4000, and I configured Nginx as a reverse proxy to expose it securely via HTTPS on port 443.

๐Ÿ‘‡ Example PM2 setup command:

pm2 start json-server --name tasks-api -- \
  --watch /home/ubuntu/tasksmanager/data.json --port 4000
pm2 save

๐Ÿ”ง Core functionality

Feature Implementation Code Snippet
Add a task Using form and POST request to the API sendTask(url, newTask)
Track time with timer setInterval updates time every second this.timer = setInterval(...)
Mark task as done PATCH with isDone: true updateTask(url, id, { isDone: true })
Remove task PATCH with isRemoved: true updateTask(url, id, { isRemoved: true })

โฑ Time formatting

Each task's time is displayed in hh:mm:ss format. Example output: 00:10:32

formatTime = (totalSeconds) => {
  const hours = String(Math.floor(totalSeconds / 3600)).padStart(2, '0');
  const minutes = String(Math.floor((totalSeconds % 3600) / 60)).padStart(2, '0');
  const seconds = String(totalSeconds % 60).padStart(2, '0');
  return `${hours}:${minutes}:${seconds}`;
}

๐Ÿ”ฎ Future Improvements

In future versions of the TasksManager, I would like to enhance the app with the following features:

๐Ÿ“… Task Date & Time History

Currently, the app tracks the total time spent on a task, but it doesnโ€™t store when the task was performed. I want to implement:

  • Saving the exact date and time range (start โ†’ stop) for each session a task is running.
  • Creating a list of time entries for each task โ€“ so users can view the full history of when a task was worked on.

Example:

โœ… Task: "Write blog post"
โ–ถ 2025-04-24 | 14:03 โ€“ 14:45
โ–ถ 2025-04-25 | 09:00 โ€“ 09:25

This will make the app more useful for time reporting and personal productivity.


๐Ÿ™‹โ€โ™‚๏ธ Feel free to contact me

Write sth nice ;) Find me on:

LinkedIn Gmail


๐Ÿ‘ Special thanks

Thanks to my Mentor - devmentor.pl โ€“ for support and code review.

About

โฑ๏ธ๐Ÿง  A simple task timer app where users can track time spent on tasks, mark them as completed, and remove them when finished. ๐Ÿ‘จโ€๐Ÿ’ป All task data is stored in API I set up myself on AWS - served securely over HTTPS using Nginx as a reverse proxy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •