react-tasks-manager

TasksManager

đź§­ Project Overview

This project involves creating a single, comprehensive React component called TasksManager. Its primary purpose is to manage a list of tasks, allowing users to add new tasks and track the time spent on each. This application serves as an exercise in building stateful components, handling user interactions, and integrating with a mock backend API (json-server).

✨ Key Features & Components

đź›  Tech Stack

HTML5 CSS3 JavaScript React Webpack Babel

🚀 Getting Started

Prerequisites

Installation

  1. Clone the repository (if applicable) or navigate to the project directory.
  2. Install the project dependencies:
    npm install
    

Setup Backend (JSON Server)

  1. In the project’s root directory, create a db folder if it doesn’t exist.
  2. Inside the db folder, create a data.json file. Per the original task instructions, structure it like this to store your tasks:
    {
      "data": [
        {
          "id": 1,
          "name": "Sample Task",
          "time": 0,
          "isRunning": false,
          "isDone": false,
          "isRemoved": false
        }
      ]
    }
    

    (You can start with an empty data: [] array or pre-populate it with sample tasks.)

Running the Application

  1. Start the JSON Server: Open a terminal window, navigate to the project root, and run:
    json-server --watch ./db/data.json --port 3005
    

    The API will be available at http://localhost:3005/data.

  2. Start the React Development Server: Open another terminal window, navigate to the project root, and run:
    npm run start
    

    The application will then be accessible in your web browser, usually at http://localhost:8080 (this is the default for webpack serve --open).

🎨 Styling

Styling for this project is handled via CSS:

⚙️ Webpack Configuration

The project uses Webpack, configured via webpack.config.js, for the following:

📌 Lessons Learned (from this project)

🙏 Acknowledgements