Skip to content

Repositório com a resolução do desafio de programação do processo seletivo da Plataforma Ivera.

Notifications You must be signed in to change notification settings

brseghese/desafio-ivera-2022

Repository files navigation

Tech test to integrate the iVera Team 🏡

🚀 Clique aqui para acessar a aplicação!!!

Aplicação hospedada em Railway


​👷‍♂️​ Acessar o Projeto

◽ Clonar o repositório:

git clone https://github.com/brseghese/ivera-fullstack-test.git

◽ Instalar dependências:

npm install

◽ Criar arquivo config.env na raiz do projeto e definir as variáveis:

NODE_ENV=development
PORT=3000

DATABASE=******
DATABASE_PASSWORD=******

JWT_SECRET=******
JWT_EXPIRES_IN=90d
JWT_COOKIE_EXPIRES_IN=90

MARVEL_PUBLIC_KEY=******
MARVEL_PRIVATE_KEY=******

MongoDb | JWT | Marvel Api

◽ Executar o script:

npm run start

Funcionalidades Backend

Acesse aqui o Postman para ver a documentação.

🔴 A route to create admin users;

Cadastrar novo usuario:

http://127.0.0.1:3000/api/v1/user

{
    "name": "Usuário",
    "email": "user@ivera.com",
    "password": "12345678",
    "passwordConfirm": "12345678",
    "role": "user"
}
  • Administrador = "role": "admin"
  • Usuário: "role": "user"

Para cadastrar usuário é preciso estar logado como administrador.

Use o email e a senha abaixo no endpoint de login para logar:

  • email: admin@ivera.com
  • senha: 12345678

Obs. a senha é salva no banco criptografada.


🔴 A route to login with admin users (Use the login method that you prefer);

Login:

http://127.0.0.1:3000/api/v1/login

{
    "email": "usuario@ivera.com",
    "password": "12345678"
}

JSON Web Tokens usado como método de login.


🔴 A route of character list, accepting parameters of filters and pagination;

http://127.0.0.1:3000/api/v1/characters

Parametros:

&limit=20 : limita a paginação em 20;
&offset=20 : avança 20 personagens para a próxima página;
&nameStartsWith : pesquisa por nome do personagem;

🔴 A route of character details, taking the character id as a parameter;

http://127.0.0.1:3000/api/v1/characters/id

🔴 A middleware for log requests, containing request method, url and parameters saved;

🔴 A route (authenticated only admin users) of history, containing all the log requests saved on MongoDB (No need front-end, only back-end call. Only admin profile)

http://127.0.0.1:3000/api/v1/logs

Para acessar essa rota é preciso estar logado como administrador.


Funcionalidades Frontend

🔴 A page of character list, using parameters, filters and pagination created before;

🔴 A page of character details, that shows all info returned from the backend by clicking on a character on the list created before;

Com a aplicação em execução, abra http://localhost:3000 no seu navegador para ver a aplicação.

🟢 SITE RESPONSIVO


Preview:



Desenvolvido com ❤️ por Bruno Seghese


Tech test to integrate the iVera Team 🏡

SoExcited~GIF


Create a Rest API and a SPA that consumes and shows the official Marvel Comics API.

💻 Functionalities (Back-end)

🔴 A route to create admin users;
🔴 A route to login with admin users (Use the login method that you prefer);
🔴 A route of character list, accepting parameters of filters and pagination;
🔴 A route of character details, taking the character id as a parameter;
🔴 A middleware for log requests, containing request method, url and parameters saved;
🔴 A route (authenticated only admin users) of history, containing all the log requests saved on MongoDB (No need front-end, only back-end call. Only admin profile)

💻 Functionalities (Front-end)

🔴 A page of character list, using parameters, filters and pagination created before;
🔴 A page of character details, that shows all info returned from the backend by clicking on a character on the list created before;

Technologies and tools you have to use:

☑️ Javascript ES6+
☑️ Nodejs
☑️ MongoDB
☑️ Any front-end framework/library (feel free to use Vuejs, Reactjs, EJS or any other 🚀)
☑️ Express (for the back-end)
☑️ Be free to use any other tools/tecs if you need

Start instructions

  • Create a fork of this project
  • Do all the tasks to complete the application
  • Create a README.md showing the steps to run the application
  • Make a merge request on the main branch
  • Send us the link of the merge request

desafio-ivera-2022

About

Repositório com a resolução do desafio de programação do processo seletivo da Plataforma Ivera.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published