Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axelfrache/task-advisor-api
A simple task management API built with Express.js.
https://github.com/axelfrache/task-advisor-api
api docker-compose expressjs mongodb todo
Last synced: 29 days ago
JSON representation
A simple task management API built with Express.js.
- Host: GitHub
- URL: https://github.com/axelfrache/task-advisor-api
- Owner: axelfrache
- Created: 2024-08-24T18:51:22.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-08-24T20:14:43.000Z (5 months ago)
- Last Synced: 2025-01-02T22:46:12.538Z (29 days ago)
- Topics: api, docker-compose, expressjs, mongodb, todo
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TaskAdvisorAPI
TaskAdvisorAPI is a backend solution built with Express.js, designed to manage tasks efficiently. It supports user authentication, task grouping via lists, and offers features like recurring tasks to streamline your task management workflow.
## đ Get Started
### Prerequisites
- đĸ Node.js
- đŗ Docker
- đĻ Docker Compose### Installation
**Clone the repository:**
```bash
git clone https://github.com/axelfrache/TaskAdvisorAPI.git
cd TaskAdvisorAPI
```### đŗ Running with Docker
**Build and start the application:**
```bash
docker-compose up --build
```The API will be available at http://localhost:5000
### đšī¸ Usage
To interact with the TaskAdvisorAPI, follow these steps:
1. **Register a new user** through the /api/auth/register endpoint.
2. **Log in** to receive a JWT token via the /api/auth/login endpoint.
3. **Create, retrieve, update, and delete tasks and lists** using the provided endpoints.
4. **Organize tasks** by assigning them to lists and manage recurring tasks efficiently.### đ Features
- đ **User Authentication**: Secure registration and login using JWT.
- đ **Task Management**: Create, update, and organize tasks efficiently.
- đī¸ **List Management**: Group tasks into lists for better organization.
- đ **Recurring Tasks**: Support for task repetition with flexible schedules.
- đ ī¸ **Validation**: Robust input validation to ensure data integrity.## đ API Endpoints
### đ Authentication
- **POST /api/auth/register**
- Register a new user.
- **Body: { "username": "John Doe", "email": "[email protected]", "password": "password123" }**
- **POST /api/auth/login**
- Log in and receive a JWT token.
- **Body: { "email": "[email protected]", "password": "password123" }**### đ Tasks
- **POST /api/tasks**
- Create a new task.
- **Headers: Authorization: Bearer **
- **Body**:
```json
{
"name": "Finish report",
"description": "Complete the annual report",
"dueDate": "2024-09-01T00:00:00Z",
"repetition": "ONCE"
}
```
- **GET /api/tasks**
- Retrieve all tasks for the authenticated user.
- **Headers: Authorization: Bearer **- **PUT /api/tasks**
- Update a specific task.
- **Headers: Authorization: Bearer **
- **Body**:
```json
{
"name": "Finish updated report",
"description": "Complete the annual report with the latest data",
"dueDate": "2024-09-05T00:00:00Z",
"completed": true
}
```
- **DELETE /api/tasks**
- Delete multiple tasks.
- **Headers: Authorization: Bearer **
- **Body**:
```json
{
"taskIds": ["", ""]
}
```### đī¸ Lists
- **POST /api/lists**
- Create a new list.
- **Headers: Authorization: Bearer **
- **Body**:
```json
{
"name": "Work Projects",
"description": "Tasks related to work projects."
}
```
- **GET /api/lists**
- Retrieve all lists for the authenticated user.
- **Headers: Authorization: Bearer **- **POST /api/lists/:listId/task**
- Add a task to a specific list.
- **Headers: Authorization: Bearer **
- **Body**:
```json
{
"taskId": ""
}
```
- **DELETE /api/lists/:listId/task**
- Remove a task from a specific list.
- **Headers: Authorization: Bearer **