https://github.com/tasbeehismail/task-manager
A RESTful API for efficient task and category management with user authentication, sharing options, and advanced filtering
https://github.com/tasbeehismail/task-manager
authentication authorization error-handling express filtering mongoose nodejs pagination sorting validation
Last synced: 2 months ago
JSON representation
A RESTful API for efficient task and category management with user authentication, sharing options, and advanced filtering
- Host: GitHub
- URL: https://github.com/tasbeehismail/task-manager
- Owner: tasbeehismail
- Created: 2024-07-14T02:58:03.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-15T01:34:33.000Z (almost 2 years ago)
- Last Synced: 2025-05-29T15:15:09.295Z (about 1 year ago)
- Topics: authentication, authorization, error-handling, express, filtering, mongoose, nodejs, pagination, sorting, validation
- Language: JavaScript
- Homepage:
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Task-Manager
A RESTful API for efficient task and category management with user authentication, sharing options, and advanced filtering.
## Features
- **User Authentication**: Basic HTTP authentication (username and password).
- **Email Verification**: Users can verify their email addresses.
- **Task Management**: Create, read, update, and delete tasks.
- **Category Management**: Organize tasks into categories with full CRUD support.
- **Task Sharing**: Tasks can be shared (public) or private.
- **Task Types**: Support for text tasks and list tasks.
- **Filtering**: Filter tasks by category name and shared options (public/private).
- **Sorting**: Sort tasks by category name and shared options (public/private).
- **Pagination**: Efficiently paginate through tasks and categories.
## Models
- **User**
- name: String
- email: String
- password: String
- **Category**
- name: String
- user: Reference to User
- **Task**
- title: String
- body: String (for text tasks)
- items: Array of Strings (for list tasks)
- category: Reference to Category
- shared: Boolean (public/private)
- user: Reference to User
## Schema Diagram

## Endpoints
### User
- `POST /users/signup`: Create a new user
- `POST /users/login`: User login
- `POST /users/verify-email`: Verify user email
### Categories
- `GET /categories`: Get all categories
- `POST /categories/add`: Create a new category
- `GET /categories/:id`: Get a category by ID
- `PATCH /categories/update/:id`: Update a category by ID
- `DELETE /categories/delete/:id`: Delete a category by ID
### Tasks
- `GET /tasks`: Get all tasks
- Supports query parameters for filtering, sorting, and pagination:
- `page`: Page number (default: 1)
- `limit`: Number of tasks per page (default: 10)
- `category`: Filter by category name
- `shared`: Filter by shared option (`public` or `private`)
- `sortBy`: Sort by `category` or `shared` (default: `category`)
- `order`: Order of sorting (`asc` or `desc`, default: `asc`)
- `POST /tasks/create`: Create a new task
- `GET /tasks/:id`: Get a task by ID
- `PATCH /tasks/update/:id`: Update a task by ID
- `DELETE /tasks/delete/:id`: Delete a task by ID
### Filtering and Sorting
- `GET /tasks?category=:categoryName`: Get tasks filtered by category name
- `GET /tasks?shared=:sharedOption`: Get tasks filtered by shared option (public/private)
- `GET /tasks?sortBy=category&order=asc`: Get tasks sorted by category name
- `GET /tasks?sortBy=shared&order=desc`: Get tasks sorted by shared option (public/private)
- `GET /tasks?page=:page&limit=:limit`: Paginate through tasks
# API Documentation
[Link to Detailed Postman Documentation](https://documenter.getpostman.com/view/34627138/2sA3kPoiux)