<LEARN/>
← /paths/backend

<project · beginner>

Command-line to-do list

Add, list and remove tasks from the terminal, saved to a file.

Build command-line to-do list one manageable milestone at a time. Keep your decisions, tests and finished work together so your portfolio shows what you learned, not only the final result.

Build it step by step

  1. Define the commands

    Create a Node.js project with add, list and remove commands. Document their arguments and choose a tasks.json file location before building the parser.

  2. Store tasks safely

    Represent tasks with stable IDs and text. Read and write JSON using node:fs/promises, create the file when absent and report malformed JSON without overwriting it.

  3. Add and list tasks

    Parse process.argv and reject blank task text. Display task IDs with their text, and show a friendly empty-list result.

  4. Remove by ID

    Delete a task using its stable ID rather than its position in the list. Handle an unknown ID with a clear message and a nonzero exit code.

  5. Test persistence

    Use a temporary directory in automated tests. Cover adding two tasks, deleting one, starting a new process and reading the remaining task back.

  6. Share your finished work

    Commit your source and a README explaining setup, decisions, tests and limitations. Remove secrets and personal data, credit dependencies and assets, then add the public repository or portfolio link and an optional working demo to LEARN Showcase. Hosting is optional; a clear repository or design case study is enough.

// done when

  • Tasks survive a new process
  • Blank tasks are rejected
  • Unknown IDs do not delete anything
  • Malformed files are not silently overwritten
  • README includes setup, credits and limitations; shared links are safe and accessible

// stretch goals

  • Add completed status
  • Add due dates

Finished? Show it off

Add your project to the LEARN showcase so other learners and employers can see it.

Sign in to add your finished project to the showcase.