Skip to content

miARTre/notes-app-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—’οΈ Notes App (Node.js CLI)

A simple and elegant command-line application for managing notes.
Built using Node.js, with support from yargs for argument parsing, chalk for colored output, and native fs for file operations.


βš™οΈ Features

  • βž• Add new notes via terminal
  • ❌ Remove notes by title
  • πŸ“ƒ List all notes in storage
  • πŸ” Read a specific note
  • 🚫 Prevents duplicate titles
  • πŸ’Ύ Saves notes in notes.json file (local JSON DB)

πŸ“ Project Structure

node-course/
β”œβ”€β”€ notes-app/
β”‚   β”œβ”€β”€ app.js              # Main CLI entry point (with yargs setup)
β”‚   β”œβ”€β”€ notes.js            # Core logic for add, remove, list, read
β”‚   β”œβ”€β”€ notes.json          # Stores all notes locally (acts as a DB)
β”‚   β”œβ”€β”€ utils.js            # Optional utilities
β”‚   β”œβ”€β”€ package.json        # Dependencies and metadata
β”‚   └── node_modules/       # Installed npm packages
β”œβ”€β”€ playground/
β”‚   β”œβ”€β”€ 1-json.js
β”‚   β”œβ”€β”€ 1-json.json
β”‚   β”œβ”€β”€ 2-arrow-function.js
β”‚   └── 3-arrow-challenge.js

πŸš€ Getting Started

πŸ“¦ Install dependencies

npm install

▢️ Run the CLI

node app.js <command> [options]

πŸ’‘ Available Commands

βž• Add a Note

node app.js add --title="Shopping" --body="Buy milk and bread"

❌ Remove a Note

node app.js remove --title="Shopping"

πŸ“ƒ List All Notes

node app.js list

πŸ” Read a Specific Note

node app.js read --title="Shopping"

πŸ“š Dependencies

Package Purpose
yargs For parsing command-line arguments
chalk For styled and colored terminal output
Built-in fs Node’s file system module for reading and writing files

πŸ§ͺ Playground Folder

The playground/ folder is used for practice and testing.

It contains:

  • πŸ“„ JSON parsing examples (1-json.js, 1-json.json)
  • 🏹 Arrow function challenges (2-arrow-function.js, 3-arrow-challenge.js)

These files are not part of the main app logic.


βœ… TODO

  • Add note editing/updating feature
  • Add timestamps for each note
  • Export notes to .txt or .md
  • Support tags or categories

πŸ’¬ This project is ideal for Node.js beginners practicing modules, JSON, command-line tools and basic file handling.

About

🌀️ A simple weather app built with Node.js and Express, fetching real-time weather data via API.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •