This repository contains a Todo Web App and a Todo CLI Tool for managing tasks. The Web App uses JWT Authentication, while the CLI Tool provides advanced task management features like categorization, due dates, priorities, and recurring tasks.
The Todo Web App is built with Node.js, Express, MongoDB, and JWT for secure user authentication. It offers a RESTful API for managing tasks with additional features.
- User Registration and Login
- JWT Authentication
- CRUD Operations for tasks
- Task Prioritization and Categorization
- Task Recurrence
- Node.js
- Express
- MongoDB & Mongoose
- JWT (JSON Web Token)
- Zod (schema validation)
- dotenv (environment variables)
- Node.js (v14 or higher)
- MongoDB (local or Atlas)
- npm (Node Package Manager)
- Clone the repository:
git clone https://github.com/your-username/todo-app.git cd todo-app
- Install dependencies:
npm install
- Set up environment variables:
- Create a
.env
file and add:PORT=5000 MONGO_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret
- Create a
- Start the server:
npm start
- Register:
/api/users/register
(POST) - Login:
/api/users/login
(POST)
- Add Task:
/api/tasks
(POST) - Get All Tasks:
/api/tasks
(GET) - Get Task by ID:
/api/tasks/:id
(GET) - Update Task:
/api/tasks/:id
(PUT) - Delete Task:
/api/tasks/:id
(DELETE)
Test API endpoints with tools like Postman or curl. Include the JWT token in the Authorization header for protected routes.
The CLI Tool provides a command-line interface for task management with a range of powerful features.
- Add Tasks with Priority
- List Tasks (sorted by priority and due date)
- Mark Tasks as Done/Undone
- Remove Tasks
- Due Dates for tasks
- Status Filtering (done/not done)
- Edit Tasks
- Search for Tasks
- Group Tasks by Category
- Recurring Tasks
- Color-Coded Priority
- Reminders for deadlines
- Backup and Restore
- Task History
- Clone the repository:
git clone https://github.com/your-username/todo-cli-tool.git cd todo-cli-tool
- Install dependencies:
npm install
- Link the CLI Tool globally:
npm link
-
Add a Task:
todo add "Task description" --priority <priority> --due <dueDate> --category <category> --recurring
<priority>
: Priority level (default is 1)<dueDate>
: YYYY-MM-DD format (optional)<category>
: Task category (optional)--recurring
: Recurring task (optional)
-
List Tasks:
todo list
-
Mark as Done/Undone:
todo done <index> todo undone <index>
-
Remove a Task:
todo remove <index>
-
Edit a Task:
todo edit <index> --task "<newDescription>" --priority <newPriority> --due <newDueDate>
-
Search Tasks:
todo search "<keyword>"
-
Filter by Status:
todo filter --done todo filter --undone
-
Backup & Restore:
todo backup todo restore
- Colors: Customize priority color codes in
config.json
. - Reminders: Configure reminder settings in
config.json
.
For feedback, reach out to edushrijak@gmail.com.