Skip to content

jmsmarcelo/task-tracker-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Task Tracker CLI

A command-line application for tracking and managing tasks, developed in C++ as part of the Task Tracker Project by Roadmap.sh.

Version with database: Task Tracker CLI - MySQL Version

📋 Features

  • Add, Update, and Delete tasks
  • Mark a task as in progress or done
  • List all tasks
  • List all tasks are not done
  • List all tasks are in progress
  • List all tasks are done

⚙️ Technologies and Tools

  • Language: C++
  • CLI Structure: Input/output handling
  • Data Persistence: Store the tasks in a JSON file

🛠️ How to Run the Project

Prerequisites

  • For compile:
    • Windows: MSVC (Visual Studio Developer Command Prompt)
    • Linux: GCC (GNU Compiler Collection)
  • For execute:
    • Read/write permission

Steps to Execute

  1. Clone the repository:
    git clone https://github.com/jmsmarcelo/task-tracker-cli-cpp.git
    cd task-tracker-cli-cpp
  2. Compile the project:
    mkdir bin
    cd bin
    
    # Linux:
    g++ -o task-cli ../src/*.cpp
    
    # Windows (Visual Studio Developer Command Prompt):
    cl /EHsc /Fe:task-cli.exe ..\src\*.cpp
  3. Run the application:
    # Linux:
    ./task-cli help
    
    # Windows:
    .\task-cli help

📌 Usage

# Adding a new task
task-cli add "Buy groceries"
# output: Task added successfully (ID: 1)

# Updating task
task-cli update 1 "Buy groceries and cook dinner"
# output: Task updated successfully

# Deleting task
task-cli delete 1
# output: Task deleted successfully

# Marking a task as in progress
task-cli mark-in-progress 1
# output: Task marked as in-progress successfully

# Marking a task as done
task-cli mark-done 1
# output: Task marked as done successfully

# Listing all tasks
task-cli list
# output: ┌────────┬────────────────────────────────────────────────────┬─────────────┬─────────────────────┬─────────────────────┐
#         │   ID   │                    Description                     │    Status   │     Created At      │     Updated At      │
#         ├────────┼────────────────────────────────────────────────────┼─────────────┼─────────────────────┼─────────────────────┤
#         │ 1      │ Buy groceries and cook dinner                      │ todo        │ 2024-12-31 09:14:19 │ 2024-12-31 09:24:32 │
#         └────────┴────────────────────────────────────────────────────┴─────────────┴─────────────────────┴─────────────────────┘

# Listing tasks by status
task-cli list todo
task-cli list in-progress
task-cli list done

📦 Project Structure

task-tracker-cli-cpp/
└─ src/
   ├─ main.cpp             # Application entry point
   ├─ task_cli.hpp         # User input handling declaration header
   ├─ task_cli.cpp         # User input handling definition file
   ├─ TaskModel.hpp        # Domain model declaration header
   ├─ TaskModel.cpp        # Domain model definition file
   ├─ TaskStatus.hpp       # Status enum declaration header
   ├─ TaskStatus.cpp       # Status enum definition file
   ├─ TaskService.hpp      # Service logic declaration header
   ├─ TaskService.cpp      # Sask service logic definition file
   ├─ TaskRepository.hpp   # File persistence handling declaration header
   └─ TaskRepository.cpp   # File persistence handling definition file

🖼️ Screenshots

Screenshot 2024-12-31 181609 Screenshot 2024-12-31 091602

📖 How to Contribute

Contributions are welcome!

To contribute:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b my-new-feature
  3. Commit your changes:
    git commit -m "add new feature"
  4. Push to the branch:
    git push origin my-new-feature
  5. Open a Pull Request.

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

🙋‍♂️ Author

Created by Jose Marcelo. Feel free to get in touch or explore more of my projects!

Releases

No releases published

Packages

No packages published

Languages