eliveltonsf / todo-izi-api

Creating an API with good practices containing JWT authentication, communication with a relational database, implementing user functionalities and CRUD (Create, Read, Update, Delete) tasks associated with the logged in user.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Challenge Implement JWT and CRUD task authentication

Task Control Server #todoIzi





🚀 Used technologies

  • Node.js using the framework Fastify
  • Prisma is an open-source ORM for Node.js and TypeScript.
  • Typescript for element typing
  • Docker to work with containers and upload postgres without the need for local installation
  • Swagger to document all methods implemented in the api

🎯 What I learned from this project

The objective of this challenge is to assess the participant's ability to develop a robust and secure web service application, using Node.js and implementing secure authentication practices with JWT, as well as CRUD operations in a database.


⌨️ Prerequisites

Before starting, you will need to have the following tools installed on your machine: GIT, Node.js and the Docker

You will also need to place the ".env" file in the root of the project, this file will be sent via email, as it contains confidential data

Furthermore it is recommended to use an editor to work with the code as VSCode.

🎉 Start the project and generate the database

Remembering that you need to have a Docker instance open to run the command:
docker-compose up --build -d
# Clone the repository in some directory of your computer
$ git clone https://github.com/eliveltonsf/todo-izi-api.git

# Enter in the repository
$ cd todo-izi-api

# Install the dependencies
$ npm install

# Start the database for docker
$ docker-compose up --build -d

# Start the server
$ npm run dev

▶️ Application Demonstration

⚙️ You can test the API

Importing the json link into insomnia:
load the Insomnia-todo-izi.json file



🚦 Routes

The server will start on port 4444, every request is sent by parameters, body, query or header to the back end, whether by insomnia or in a web application, always taking into account the rules developed in the routes

⌨️ Documentation of routes in swagger

After starting the project, you will have access to an endpoint configured to document and test all the functioning of your routes.

http://localhost:4444/docs


Made with 🧡 By Elivelton Ferreira. Get in touch! 📲

About

Creating an API with good practices containing JWT authentication, communication with a relational database, implementing user functionalities and CRUD (Create, Read, Update, Delete) tasks associated with the logged in user.


Languages

Language:TypeScript 100.0%