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