Task Manager is a lightweight and efficient task management application designed to help users organize, track, and manage their daily tasks with ease. The project is built using Node.js with a custom architecture, focusing on simplicity and performance.
- ✅ Create, read, update, and delete tasks (CRUD operations).
- 🗂️ Organize tasks by categories or status.
- 📅 Track deadlines and progress.
- 🔍 Simple and user-friendly API for task management.
/src
├── /middlewares
│ └── json.js # Middleware for handling JSON requests
├── /utils
│ ├── build-route-path.js # Utility for building route paths dynamically
│ └── validate-task.js # Function to validate task fields
├── database.js # Mock database for task storage
├── routes.js # API route definitions
└── server.js # Server configuration and startup
/streams
├── import-tasks.js # Reads a task file and registers the items in the database using streams
└── tasks.csv # File CSV w/ 250 tasks
Follow the steps below to set up the project locally:
-
Clone the repository:
git clone https://github.com/DevAnseSenior/task-manager.git cd task-manager
-
Install dependencies (if applicable):
npm install
-
Run the server:
node src/server.js
-
Access the API:
The API will be available athttp://localhost:3334
(or the configured port). -
Run the import via .CSV with the project running, in another terminal window run the following command:
node streams/import-tasks.js
Method | Endpoint | Description |
---|---|---|
GET | /tasks |
Retrieve all tasks |
POST | /tasks |
Create a new task |
PUT | /tasks/:id |
Update a task by ID |
DELETE | /tasks/:id |
Delete a task by ID |
PATCH | /tasks/:id/complete |
Update task status by ID |
{
"title": "Complete project",
"description": "Finish the task manager project",
"status": "in-progress"
}
{
"id": 1,
"title": "Complete project",
"description": "Finish the task manager project",
"status": "in-progress",
"createdAt": "2024-11-29T12:00:00Z"
}
- Node.js – Backend runtime environment.
- JavaScript – Main programming language.
- Custom Middleware – JSON handling.
- File-based Mock Database – For lightweight storage.
This project is licensed under the MIT License.
If you have any questions or suggestions, feel free to reach out:
- GitHub: DevAnseSenior
- Linked: Anderson Coelho