From 8e38eecf2b89cce90bcabc0969a0ac5f40e319e0 Mon Sep 17 00:00:00 2001 From: Keyla Ferreira Date: Thu, 10 Dec 2020 12:37:20 -0300 Subject: [PATCH] feat: change challenge to add JMS + DB --- README.en.md | 74 ---------------------------------------------------- README.md | 11 ++++++-- 2 files changed, 9 insertions(+), 76 deletions(-) delete mode 100644 README.en.md diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 40b752b3..00000000 --- a/README.en.md +++ /dev/null @@ -1,74 +0,0 @@ -# Backend Code Challenge - -Code challenge designed to evaluate technical knowledge of **Backend** candidates. - -## Content -- [The Challenge](#the-challenge) - - [Scenario](#scenario) - - [APIs](#apis) - - [Features](#features) - - [To Take in Consideration](#to-take-in-consideration) -- [What We Would Like To See](#what-we-would-like-to-see) - - [Nice To Have](#nice-to-have) - - [Technology Stack](#technology-stack) -- [Submission Guidelines](#submission-guidelines) -- [Attention](#attention) - -## The Challenge - -### Scenario -You're part of a team that develops a mobile e-commerce for a huge company. -This project will target **powerful devices** and also devices with **low memory and process capabilities**. -The customer already has a established backend containing all business rules and information but, some systems rely on **legacy technologies** and may be **unstable** too. -**You** are responsible to build the **API** that will integrate with these services and provide all information needed by Mobile. -For the next interactions, the team will work on the **Home Screen** -and you must build all required **endpoint(s)** that will integrate with these services and provide the information needed by this screen. - -### APIs -You will need to integrate with the following APIs: -- **Categories**: [https://cs-hsa-api-categories.herokuapp.com/docs](https://cs-hsa-api-categories.herokuapp.com/docs). -- **Coupons**: [https://cs-hsa-api-coupons.herokuapp.com/docs](https://cs-hsa-api-coupons.herokuapp.com/docs) - -### Features -Mobile needs to build a home screen that will show: - -- Carousel with **Top 5** categories; -- Carousel with coupons that the expiration date is still valid; -- Grid with all **remaining** categories; -- Mobile does not need all images from categories model, but only the **icon** and the **smaller image**. You may need to filter some fields in your response, if you like. - -### To Take in Consideration -- Coupons API is **unstable** and sometimes takes too long to respond; -- Categories API returns a model that seems hard to handle. - -## What We Would Like To See -You are free to implement this solution the way you like taking in consideration only -the scenario, project target, performance implications and proposed technology stack described below. -- We are very focused in **quality** in our projects and we would like to a test strategy applied. You can use test type like, for example **Unit Tests**; -- The services are unstable and we don't want the user experience degrading because an API takes too long to respond; -- **1 week to complete the challenge**. If you need more time, no problem, talk to us and we will see what you can do :) - -### Nice To Have -- An API documentation would be good. Suggestion: [Swagger](https://swagger.io/); -- Running with [Docker](https://www.docker.com/). - -### Technology Stack -- **Java 8** or **newer** versions; -- Any Web Framework. Suggestion: [Spring Boot](https://spring.io/projects/spring-boot); -- Any API Client. Suggestion: [Feign](https://github.com/OpenFeign/feign); -- Preferable [Gradle](https://gradle.org/) as the build system; -- You are free to choose the test libraries and frameworks you like. The stack we suggest is: [JUnit](https://junit.org/junit5/), [Mockito](https://site.mockito.org/). - ---- - -## Submission Guidelines -Follow the steps below to implement and submit this code challenge: -- Fork this repository. Check this guide for how to fork on Github: [How to Fork a repository](https://help.github.com/en/articles/fork-a-repo); -- Implement the proposed challenge; -- After completing the challenge, open a **Pull Request** to this repository, using **Github** interface. [Check this guide for more details](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork); -- If possible, let your repository public to make code review easier :) - -## ATTENTION -Do **NOT** try to PUSH direct to THIS repository! - ---- diff --git a/README.md b/README.md index b10df83c..5ecfbdab 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Recientemente te has unido a un equipo que esta desarrollando una aplicación mo Esta aplicación esta dirigida a dispositivos de **bajo rendimiento** hasta dispositivos con **gran poder de procesamiento**. El cliente ya cuenta con un backend establecido que contiene todas las reglas e información de negocio, pero algunos sistemas dependen de **tecnologías legadas** que pueden ser **inestables**. **Tu** eres responsable de construir la **API** que integrará con estos servicios y proveerá todas las informaciones que Mobile necesita. -Para las próximas iteraciones, el equipo va a trabajar en la **Pantalla de Início** y tu debes construir todo(s) los **endpoint(s)** que se requieran para integrar con los servicios y proveer la información para la pantalla. +Para las próximas iteraciones, el equipo va a trabajar en la **Pantalla de Início** y **Valoración de Cupones**, para ello tu debes construir todo(s) los **endpoint(s)** que se requieran para integrar con los servicios y proveer la información para la pantalla. ### APIs Necesitarás consumir los siguientes servicios: @@ -38,14 +38,19 @@ El equipo Mobile necesita construir una pantalla de inicio que debe mostrar: - Tabla (Grid) con las categorias **restantes**. - Mobile **no** necesita de todas las imagenes del modelo de subcategorías, solamente la **imagen más pequeña**. Tu podrías tener que filtrar la respuesta, si tu quieres. +Adicionalmente, se requiere empezar a crear el sistema de valoración de cupones. Para ello Mobile requiere: + +- Un endpoint que les permita enviar el cupón seleccionado junto con una valoración del 1 al 5. + ### Puntos a Considerar - La API de Cupones es **inestable** y a veces demora en responder. ¿Qué podemos hacer para que este problema no se replique en otras capas? ¿Habrá algún patrón que nos ayude? - La API de Categorias responde un modelo complejo de manejar. ¿Qué podríamos hacer para simplificar este modelo y que las integraciones con su aplicación sean más sencillas? +- Negocio nos ha comentado que se espera que la funcionalidad de valoración de cupones sea altamente utilizada, por lo cual se requiere que estas valoraciones sean enviadas a una cola, y que posteriormente sean procesadas y almacenadas en base de datos. Para esto puedes utilizar una cola local y una base de datos en memoria como H2. ## ¿Qué nos Gustaría Ver? Eres libre para implementar la solución de la forma que consideres mejor, pero debes considerar el escenario, objetivo, implicaciones de performance y stack/pool de tecnología propuesta abajo. -- Nos enfocamos mucho en la **calidad** de nuestros proyectos y nos gustaría ver alguna estrategia aplicada. Puedes usar, por ejemplo, **Pruebas Unitárias**. +- Nos enfocamos mucho en la **calidad** de nuestros proyectos y nos gustaría ver alguna estrategia aplicada. Puedes usar, por ejemplo, **Pruebas Unitarias**. - No queremos que la experiencia de usuario se vea afectada por el rendimiento de los servicios; - **Usted tiene 1 semana para completar el desafio**. Si necesitas mas tiempo, no hay problema, puede hablar con nosotros y veremos que podemos hacer :) - Documentación de como configurar y ejecutar el proyecto. Puede sobrescribir el **README.md** para eso. @@ -56,6 +61,8 @@ pero debes considerar el escenario, objetivo, implicaciones de performance y sta ### Stack/Pool de Tecnologías - **Java 8** o **superiores**. +- Base de Datos **H2**. [Spring Boot + H2](https://www.baeldung.com/spring-boot-h2-database) +- **JMS**. [Spring Boot + JMS](https://www.baeldung.com/spring-jms) - Cualquier Framework Web. Sugerencia: [Spring Boot](https://spring.io/projects/spring-boot). - Cualquier API Client. Sugerencia: [Feign](https://github.com/OpenFeign/feign). - De preferencia [Gradle](https://gradle.org/) como sistema de compilación.