A NodeJS and Express Api to create, retrieve, update and delete tasks and projects. It performers user authentication trought JSON Web Tokens and functionalities to register users and reset passwords.
-
CRUD operations for Tasks and Projects entities
-
User authentication with JSON Web Tokens. Functionalities:
- User register
- User authentication
- Forgot Password
- Reset Password
This project provides a complete feature to reset passwords throught /auth/forgot_password
endponits wich sends an email to the current user containing a token, that will be used later on /auth/reset_password
endpoint to validate the user action to reset the password. More details can be found at Postman Task Board Server public documentation
To get a development env running, follow these next steps, and next continue to How to use section to have a complete developement environment running:
- Clone the repo:
git clone [email protected]:dhfuzari/task-board-server.git
- Navigate to root folder:
cd task-board-server
- Then, run
npm i
to install all required packages and wait a few minutes to complete the process - Then, before to start, you must to create a mailtrap account and replace the current environment
xpto
variables values fromuser
andpass
properties atsrc/config/mailtrapServer.json
file, with the new values created at mailtrap.xpto
isn't a valid mailtrap user and isn't even a valid mailtrap password. Now, you're almost ready to go. - This project uses MongoDB as a database in a docker container, so if you're runing this project locally in a Microsoft Windows or Mac OS system, you need to start Docker Desktop before performing the next step.
- Now, to start a server listing the door number 3000, run
npm run dev
- That's it, the server is ready and now you can send requests trought Postman to access the endpoints described below in the next section "How to use?"
To test the API locally I like to use Postman. It offers a sleek user interface with which to make HTML requests, without the hassle of writing a bunch of code just to test an API's functionality.
- First of all, access our Postman Task Board Server public documentation
- Now, you can see all availables endpoints
- Click at
Run in Postman
button, at the top right of the page, and open this collection in your Postman. - Now, you can send requests to registers users, authenticate, retrieve and reset passwords, and perform CRUD operations in the Tasks and Projects entities
- If you want to track the data created directly in the database, access the Mongo Express and open the
task_board
database for more details - Let's go for it.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
MIT.