Features | API Reference | Technologies | Installation
This is a complete application for a task/to-do app. You can create your account, and start following your tasks.
The main actions as create, update and delete are implemented for users and tasks.
Some key features are:
- Password are encrypted with Bcrypt package.
- Authenticated routes using JWT Token.
- Codebase is cover by tests with Jest and supertest.
- Avatar upload for your user.
- Email service for welcome and goodbye messages are connected using Nodemailer.
The application is built using Node.JS with Express framework. The database is the MongoDB. The entire codebase is written using Javascript.
Checkout the API Live version hosted on:
You also can check the complete Application Live version hosted on:
The email service I used suspends the KEY if don't use it regularly, so if you don't get any emails it's because of that.
GET /
POST /users
Body | Type | Description |
---|---|---|
name |
string |
Required. Name of the user |
email |
string |
Required. Email of the user |
password |
string |
Required. Password of the user |
POST /users/login
Body | Type | Description |
---|---|---|
email |
string |
Required. Email of the user |
password |
string |
Required. Password of the user |
GET /users/:id/avatar
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of the user |
All next routes need authentication!
POST /users/logout
POST /users/logoutAll
GET /users/me
PATCH /users/me
Body | Type | Description |
---|---|---|
name |
string |
Optional. New name of the user |
email |
string |
Optional. New email of the user |
password |
string |
Optional. New password of the user |
DELETE /users/me
POST /users/me/avatar
Body | Type | Description |
---|---|---|
avatar |
file |
Required. Image file for use as avatar |
GET /users/me/avatar
DELETE /users/me/avatar
POST /tasks
Body | Type | Description |
---|---|---|
description |
string |
Required. Description of the task |
GET /tasks
GET /tasks/:id
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of the task |
PATCH /tasks/:id
Parameter | Type | Description |
---|---|---|
id |
string |
Required. ID of the task |
Body | Type | Description |
---|---|---|
description |
string |
Optional. New description for the task |
completed |
string |
Optional. Set task as completed |
DELETE /tasks/:id
Parameter | Type | Description |
---|---|---|
id |
string |
Required. ID of the task |
This is what i used and learned with this project:
- Node.JS
- Express
- MongoDB
- Mongoose
- JWT
- Bcrypt
- Multer
- Nodemailer
- Jest
- Supertest
- Javascript
To use this project, first you need NodeJS and MongoDB running in your device, the mail service is optional, then you can follow the commands below:
# Clone this repository
git clone https://github.com/areasflavio/task-app-server.git
# Go into the repository
cd task-app-server
# Install dependencies for the backend
npm install
# Copy the .env.example to the .env file and inject your credentials
cp .env.example .env
# To start the express development server, run the following command
npm run dev
This project is under the MIT license. See the LICENSE for more information.
Build by Flávio Arêas 👋 Get in touch!