Skip to content

Commit 739d25b

Browse files
author
Anderson Coelho
committed
add README on project
1 parent 6349dfb commit 739d25b

File tree

1 file changed

+109
-0
lines changed

1 file changed

+109
-0
lines changed

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
2+
# Task Manager
3+
4+
## 📋 Project Description
5+
6+
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.
7+
8+
## 🚀 Features
9+
10+
- ✅ Create, read, update, and delete tasks (CRUD operations).
11+
- 🗂️ Organize tasks by categories or status.
12+
- 📅 Track deadlines and progress.
13+
- 🔍 Simple and user-friendly API for task management.
14+
15+
## 🛠️ Project Structure
16+
17+
```
18+
/src
19+
├── /middlewares
20+
│ └── json.js # Middleware for handling JSON requests
21+
├── /utils
22+
│ ├── build-route-path.js # Utility for building route paths dynamically
23+
│ └── validate-task.js # Function to validate task fields
24+
├── database.js # Mock database for task storage
25+
├── routes.js # API route definitions
26+
└── server.js # Server configuration and startup
27+
/streams
28+
├── import-tasks.js # Reads a task file and registers the items in the database using streams
29+
└── tasks.csv # File CSV w/ 250 tasks
30+
```
31+
32+
33+
34+
## 🔧 Installation and Setup
35+
36+
Follow the steps below to set up the project locally:
37+
38+
1. **Clone the repository**:
39+
```bash
40+
git clone https://github.com/DevAnseSenior/task-manager.git
41+
cd task-manager
42+
```
43+
44+
2. **Install dependencies** (if applicable):
45+
```bash
46+
npm install
47+
```
48+
49+
3. **Run the server**:
50+
```bash
51+
node src/server.js
52+
```
53+
54+
4. **Access the API**:
55+
The API will be available at `http://localhost:3334` (or the configured port).
56+
57+
5. **Run the import via .CSV** with the project running, in another terminal window run the following command:
58+
```bash
59+
node streams/import-tasks.js
60+
```
61+
62+
63+
## 📄 API Endpoints
64+
65+
| Method | Endpoint | Description |
66+
|--------|-------------------------|--------------------------|
67+
| GET | `/tasks` | Retrieve all tasks |
68+
| POST | `/tasks` | Create a new task |
69+
| PUT | `/tasks/:id` | Update a task by ID |
70+
| DELETE | `/tasks/:id` | Delete a task by ID |
71+
| PATCH | `/tasks/:id/complete` | Update task status by ID |
72+
73+
### Request Example (POST `/tasks`)
74+
```json
75+
{
76+
"title": "Complete project",
77+
"description": "Finish the task manager project",
78+
"status": "in-progress"
79+
}
80+
```
81+
82+
### Response Example
83+
```json
84+
{
85+
"id": 1,
86+
"title": "Complete project",
87+
"description": "Finish the task manager project",
88+
"status": "in-progress",
89+
"createdAt": "2024-11-29T12:00:00Z"
90+
}
91+
```
92+
93+
## 📚 Technologies Used
94+
95+
- **Node.js** – Backend runtime environment.
96+
- **JavaScript** – Main programming language.
97+
- **Custom Middleware** – JSON handling.
98+
- **File-based Mock Database** – For lightweight storage.
99+
100+
## 📝 License
101+
102+
This project is licensed under the [MIT License](LICENSE).
103+
104+
## 📞 Contact
105+
106+
If you have any questions or suggestions, feel free to reach out:
107+
108+
- **GitHub**: [DevAnseSenior](https://github.com/DevAnseSenior)
109+
- **Linked**: [Anderson Coelho](https://www.linkedin.com/in/devanse)

0 commit comments

Comments
 (0)