saraivais / blogs-api

RESTful API to simulate the management of a Blog. Developed during the Back-end module at Trybe

Home Page:https://documenter.getpostman.com/view/22527487/VVBUx6Ns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BLOG'S API 💻

image

English 🇬🇧

Click to expand!

Description 📝

Blog's API is a RESTful API Developed with the MSC (Model-Service-Controller) layered software architecture, using the Sequelize ORM to manage database queries and manipulation. This project was developed during the Back-end module at Trybe, in August, 2022. The objective of Blog's API was to simulate the system of a blog, managing login, users, post categories and posts.
The following ERD (Entity-Relationship Diagram) was provided for database construction. image

Technologies and Tools 🔧

npm-logo docker-logo mysql-logo nodejs-logo express-logo sequelize-logo jwt-logo postman-logo swagger-logo

Blog's API was developed through Docker to create an isolated development environment. The npm packages dotenv and express-rescue were used to manage environment variables and deal with asynchronous errors, respectively. This project was developed using the MSC (Model-Service-Controller) layered architecture, using the ORM Sequelize to take care of all database manipulation and querying abstration. Also, the jsonwebtoken (JWT) library was used to generate and authenticate tokens, aiming to add a security layer into this API using validation middlewares.
The Express.js framework was used to design and structure this API's endpoints following REST Principles. Nodemon and Postman were used to monitor and test scripts and requests during development. Afterwards, Swagger was used to write this API's documentation.

Installation 📋

  1. Create a directory using the mkdir command:
  mkdir saraivais-projects
  1. Access the directory using the cd command and clone the repository:
  cd saraivais-projects
  git clone https://github.com/saraivais/blogs-api
  1. Access the project directory and install it's dependencies:
  cd blogs-api
  npm i
  1. Lastly, use the npm start command and access the API documentation via browser, using the following url
  http://localhost:3000

🎯 This API's documentation is available here!

Português 🇧🇷

Clique para expandir!

Descrição 📝

Blog's API é uma API RESTful desenvolvida com a arquitetura de software em camadas MSC (Model-Service-Controller), utilizando o Sequelize ORM para gerenciar consultas e manipulação de banco de dados. Este projeto foi desenvolvido durante o módulo Back-end em Trybe, em Agosto de 2022. O objetivo do Blog's API foi simular o sistema de um blog, gerenciando login, usuários , categorias de postagem e postagens.
O seguinte ERD (Diagrama Entidade-Relacionamento) foi fornecido para construção do banco de dados. image

Tecnologias e Ferramentas 🔧

npm-logo docker-logo mysql-logo nodejs-logo express-logo sequelize-logo jwt-logo postman-logo swagger-logo

Blog's API foi desenvolvido por meio do Docker para criar um ambiente de desenvolvimento isolado. Os pacotes npm dotenv e express-rescue foram usados para gerenciar variáveis de ambiente e lidar com erros assíncronos, respectivamente. Este projeto foi desenvolvido utilizando a arquitetura em camadas MSC (Model-Service-Controller), utilizando o ORM Sequelize para cuidar de toda a abstração de consultas e manipulação do banco de dados. Além disso, a biblioteca jsonwebtoken (JWT) foi utilizada para gerar e autenticar tokens, com o objetivo de adicionar uma camada de segurança a esta API utilizando middlewares de validação.
O framework Express.js foi usado para projetar e estruturar os endpoints dessa API seguindo os Princípios REST. O Nodemon e o Postman fora, usados para monitorar e testar scripts e solicitações durante o desenvolvimento. Posteriormente, Swagger foi utilizado para escrever a documentação desta API.

Instalação 📋

  1. Crie um diretório usando o comando mkdir:
  mkdir saraivais-projetos
  1. Acesse o diretório usando o comando cd e clone o repositório:
  cd saraivais-projetos
  git clone https://github.com/saraivais/blogs-api
  1. Acesse o diretório do projeto e instale suas dependências:
  cd blogs-api
  npm i
  1. Por fim, use o comando npm start e acesse a documentação da API pelo navegador, usando o seguinte URL
  http://localhost:3000

🎯 A documentação desta API está disponível aqui!

About

RESTful API to simulate the management of a Blog. Developed during the Back-end module at Trybe

https://documenter.getpostman.com/view/22527487/VVBUx6Ns


Languages

Language:JavaScript 99.0%Language:Shell 0.8%Language:Dockerfile 0.2%