Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📋 Node.js CLI Task Manager

A beginner-friendly Command-Line Interface (CLI) Task Management System built with Node.js using only built-in Node.js modules. This project demonstrates JavaScript fundamentals, modular programming, file handling, input validation, and persistent data storage without using any external libraries or databases.


✨ Features

  • ✅ Add new tasks

  • ✅ Auto-generated unique task IDs

  • ✅ Prevent duplicate tasks (same title & due date)

  • ✅ View all tasks grouped by priority

  • ✅ Search tasks by:

    • Title (partial & case-insensitive)
    • Status
    • Priority
  • ✅ Update task status

  • ✅ Delete tasks with confirmation

  • ✅ Automatic JSON file storage

  • ✅ Load saved tasks on application startup

  • ✅ Input validation

  • ✅ Modular project structure

  • ✅ Beginner-friendly source code


🛠️ Built With

  • Node.js

  • JavaScript (ES6)

  • Built-in Node.js Modules

    • fs
    • path
    • readline

No external npm packages are used.


📂 Project Structure

task-manager/
│
├── app.js
├── taskService.js
├── fileHandler.js
├── utils.js
├── tasks.json
└── README.md

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/iamdeveloperrayhan/nodejs-cli-task-manager.git

2. Navigate to the Project

cd nodejs-cli-task-manager

3. Run the Application

node app.js

📌 Main Menu

========= TASK MANAGER =========

1. Add Task
2. View Tasks
3. Search Task
4. Update Task Status
5. Delete Task
6. Exit

================================

📖 Available Operations

➜ Add Task

Create a new task with:

  • Title
  • Description
  • Priority
  • Due Date

Example

Title: Fix Login Bug
Description: Login fails on Chrome
Priority: High
Due Date: 2026-04-15

➜ View Tasks

Display all tasks in a clean CLI format.

Tasks are automatically grouped by priority:

  • High
  • Medium
  • Low

➜ Search Tasks

Supports searching by:

  • Title
  • Status
  • Priority

Search is case-insensitive.


➜ Update Task Status

Update task status using Task ID.

Available statuses:

  • Pending
  • In Progress
  • Completed

➜ Delete Task

Delete any task by its unique ID.

Confirmation is required before deletion.


💾 Data Storage

All task data is stored inside:

tasks.json

The file is automatically updated whenever a task is:

  • Added
  • Updated
  • Deleted

When the application starts, existing tasks are loaded automatically.

If the file does not exist, a new one will be created automatically.


✅ Validation Rules

The application validates user input before saving data.

  • Title cannot be empty

  • Priority must be:

    • Low
    • Medium
    • High
  • Due date format:

    • YYYY-MM-DD
  • Duplicate tasks are not allowed

  • Task IDs are generated automatically


🎯 Learning Objectives

This project was built to practice:

  • JavaScript Fundamentals
  • Node.js Basics
  • File System (fs)
  • Modular Programming
  • Arrays & Objects
  • Input Validation
  • CRUD Operations
  • CLI Application Development

🤝 Contributing

Contributions, issues, and feature requests are welcome.

Feel free to fork this repository and submit a Pull Request.


👨‍💻 Author

Developer Rayhan

GitHub:

https://github.com/iamdeveloperrayhan

Linkedin:

https://linkedin.com/in/iamdeveloperrayhan


📄 License

This project is licensed under the MIT License.


⭐ If you found this project helpful, consider giving it a Star on GitHub!

About

A beginner-friendly Task Management CLI application built with Node.js. Manage tasks with add, update, delete, search, and file-based storage using only built-in Node.js modules.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages