📝api: Register Employees and Products

Overview

📝 Register Employees and Products

Bem-vindo(a). Este é o desafio da 4° sprint!

Opa dev tudo bem?! Este é o grupo03, que através desse repositório vem entregar o 3° desafio do programa de bolsas. O desafio que foi construído com o conteúdo aprendido ao decorrer das Sprints. Colocando dessa vez o trabalho em grupo no desenvolvimento dessa api. Esperamos que goste!!

Vamos ao projeto! #dreamBigger🚀💛


Status code: Finalizada!!


Indice



🧠 Contexto

Neste desafio em grupo do programa de bolsas, será a criação de uma api de cadastro de funcionários e produtos. Neste projeto estamos incluído paginação na busca por funcionários e produtos, e fluxos de:

  • Interação de métodos http. (criar, buscar, editar e remover);
  • Query params nas rotas de buscar;
  • validações dos campos;

• Rotas:

- employee

Id Request Endpoint
1 POST cadastrar um funcionário
2 GET listar funcionários
3 PUT atualizar funcionários
4 DELETE deletar funcionário

- product

Id Request Endpoint
5 POST cadastrar um produto
6 GET listar produtos


💻 Baixar e executar o projeto

Pré-requisitos

Antes de começar, você vai precisar ter instalado em sua máquina as seguintes ferramentas: Git, Node.js, Postman e MongoDB. Além disto é bom ter um editor para trabalhar com o código como VSCode.

O Docker é opicional. Mas caso opte por utilizalo, o Node.js e MongoDB viram opcionais.

🎲 Setup da aplicação

1. Clonando a aplicação localmente

O primeiro passo para começar a configurar o servidor é clonar o repositório na sua máquina.

# Clone este repositório
$ git clone <https://github.com/grupo0003/register-Employees-Products-.git>

# Acesse a pasta do projeto no terminal
$ cd register-Employees-Products-

2. Configurar as variáveis de ambiente

O servidor usa de variáveis de ambiente para transportar dados sensíveis pela aplicação.

Será necessário criar na raiz do projeto um arquivo .env configurar as variáveis:

# Porta que o servidor irá rodar.
PORT=3000

# Driver de conexão com o mongo.
# Caso opte por MongoDB Cluster, DB_DRIVE = mongodb+srv
DB_DRIVE=mongodb

# Endereço do serviço do MongoDB
# No docker, "mongo" é o endereço para fazer a
# comunicação com o container do MongoDB
DB_HOST=mongo

# Este campo é opcional, valor padrão é 27017
DB_PORT=27017

# Usuário para se conectar com o MongoDB
DB_USER=user

# Senha para se conectar com o MongoDB
DB_PASS=pass

# Database que será guardada as Coleções
DB_DATABASE=desafio-03

Utilizando o docker, DB_USER e DB_PASS podem ser qualquer valor.

Iniciando a aplicação

Depois de ter as variáveis de ambiente configuradas, basta iniciar o servidor.

Para subir em modo produção, basta executar:

# Sem docker
$ npm run start

# Com docker
$ npm run docker:up

Para subir em modo desenvolvimento:

# Sem docker
$ npm run dev

# Com docker
$ npm run docker:up:dev

Para iniciar em todo de test (Teste de feature):

# Sem docker
$ npm run test

# Com docker
$ npm docker:up:test

🛠 Tecnologias

As seguintes ferramentas/tecnologias foram usadas na construção e testagem do projeto. Clicando no icone da tecnologia, você será redirecionado para o site oficial para instalação:

logo Framework Version
nodeJs NodeJs 16.13.1
mongo MongoDB 5.0.5
postman Postman 9.6.2
VsCode VsCode 1.63.2
docker Docker xx.x.x

🌟 Agradecimentos

CompassUol Felipe Thais Diego Bruna Gabriel Giovanni

Contribuintes

Nos do grupo 03 queremos agradecer a toda a equipe da compasso pelo suporte dado a nós ao decorrer desse programa de bolsas e desafios, é muito gratificante termos concluído o projeto dessa sprint, usando o trabalho em grupo e o scrum como metodologia para o desenvolvimento da aplicação.

Obrigado mais uma vez e vamos para o próxima!!#dreamBigger🚀💛

  • Desenvolvido por:

    📝 Brendson 🧪 Diogo 📖 Felipe 💻 Leandro 💻 Washington

    Code review - dev

    QA - dev

    SM-CR-dev

    Deployer - dev

    Developer


📃 LICENÇA

Esse repositório está licenciado pela MIT LICENSE. Para mais informações detalhadas, leia o arquivo LICENSE contido nesse repositório.


🎁 Bonus

You might also like...

👍 💰 Market place for products with MERN stack

react-md Create an accessible React application with the material design specifications and Scss. Installing packages - How to install related compone

Sep 22, 2022

Free Next.js responsive landing page template for SaaS products made using JAMStack architecture.

 Free Next.js responsive landing page template for SaaS products made using JAMStack architecture.

✨ Free Next.js marketing website template for SaaS startups ✨ Everything you need to build a great landing page / marketing website for your startup.

Nov 5, 2022

This Application provides basic authentication features like you can register and create account and then login and access your profile.

  This Application provides basic authentication features like you can register and create account and then login and access your profile.

Authentication API This Application provides basic authentication features like you can register and create account and then login and access your pro

Jan 17, 2022

A back-end web app allows you to register and login to access a secrets page

A back-end web app allows you to register and login to access a secrets page

Oct 30, 2022

A progressive web app to help volunteers track their volunteering activities, register vet concerns and log incident reports.

POOPS - Pets of Older Persons 2022 Introduction This is a Next.js project bootstrapped with create-next-app. Getting Started First, install yarn: npm

Jan 3, 2023

Register your username, log into the app and create your list of a to-do with local storage.

Register your username, log into the app and create your list of a to-do with local storage.

Todofy Todofy is a web app to create your to-do list with local storage. Explore the docs » View Demo · Report Bug · Request Feature Table of Contents

Jun 30, 2022

We are creating a Library that would ensure developers do not reinvent the wheel anymore as far as Authentication is concerned. Developers can easily register and download authentication codes that suits their need at any point.

We are creating a Library that would ensure developers do not reinvent the wheel anymore as far as Authentication is concerned. Developers can easily register and download authentication codes that suits their need at any point.

#AuthWiki Resource Product Documentation Figma Database Schema First Presentation Live Link API Documentation Individual Contributions User Activity U

Dec 2, 2022

End-to-End type safety for REST APIs written in Fastify. Only problem is you have to explicity export and register route handlers. LOL

Chino intelligence in japaneese End-to-End type safety for REST APIs written in Fastify. Only problem is you have to explicity export and register rou

Sep 12, 2022

An obsidian plugin allowing you to register and view different file extensions in a modular manner.

Obsidian Custom File Extensions Plugin This is a plugin for Obsidian to allow associaton of file type extensions with different in-app views via setti

Dec 6, 2022
Comments
  • Story/33c373b/access control allow methods

    Story/33c373b/access control allow methods

    The Access-Control-Allow-Methods header is used to indicate which HTTP methods are permitted while accessing the resources in response to the cross-origin requests.

    opened by ghost 0
Owner
Group-03
Desafio em grupo da compasso 🚀
Group-03
🍺 A public REST API for retrieving information about Systembolaget's products, and which products that are available in which store

?? systembolaget-api A public REST API for retrieving information about Systembolaget's products, and which products that are available in which store

Daniel Cronqvist 9 Nov 22, 2022
A product system made with NestJS. It's a service where you list products, create products or even delete them.

Products-API A product system made with NestJS. It's a service where you list products, create products or even delete them. What I used in this proje

Luiz Sanches 4 May 18, 2022
This is a decentralised application that allows you to pay your employees salary in Ethereum.

This is our project for Ethernals Hackathon. Built on Polygon and deploye dusing Spheron. You can check out live project here: https://ethernals_dapp-

Kushagra Sarathe 3 Sep 20, 2022
dashboard to help admin control their system users & employees

Reno Dashboard ?? Table of Contents About getting started Demo screenshots ?? About dashboard to help admin control their system users & employees it

Omar Mohamed 8 Nov 22, 2022
An automated crawler that extracts products and categories from Digikala!

Digikala-Crawler The purpose of this project is to conduct research and we are not responsible for any misuse of this project. This is not a very clea

Ali Azizi 5 Feb 16, 2022
iX is a design system for designers and developers, to consistently create the perfect digital experience for industrial software products.

Siemens Industrial Experience (iX) monorepo iX is an open source design system for designers and developers, to consistently create the perfect digita

Siemens 54 Dec 26, 2022
An E-commerce website that allows to Buy/Sell products, designed to strengthen small vendors to enhance their business

Developed using MERN Stack, an E-commerce website that allows to Buy/Sell products, designed to strengthen small vendors to enhance their business, fu

Inderjit Shahi 5 Jun 25, 2022
Open source infrastructure for scalable, reliable native integrations in B2B SaaS products

Open-source infrastructure for native integrations Native, customer-facing integrations for your B2B SaaS made simple, reliable and extensible. Explor

Nango 225 Jan 2, 2023
🐷 Collect historical performance data on your products via Lighthouse CI & Github Actions

Datahog ?? Datahog is a template repo, configured to collect historical performance data on your products via Lighhouse CI & Github Actions. Setup Cli

Jacob Størdahl 5 Sep 21, 2022