Table of Contents
This is a backend technical test for a position in Mercado Libre.
Why?:
- I want to improve my Backend skills.
- To learn new technologies.
This project is built with the following languages ,databases and cloud platform:
To start, you must take into account the following recommendations and prerequisites
It is recommended to install the following versions for the correct operation of the software.
* Node JS >= v12.22.0
* git >= v2.30.0
* npm >= v6.14.13
Follow the steps as shown below.
- Clone the repo
git clone https://github.com/efarias04/mutant-meli-app.git
- Install NPM packages
npm install
- set your host connection database MongoDB to variable:
DATABASE_CONNECTION
- Start application with next command
npm run start-dev
- Test your API. please view the 'Usage' section an d test in your local environment
This app is integrated with continuous delivery from GitHub Actions and Heroku. ✅
This application has unit tests and coverage of more than 96%. ✅
To learn more about the OpenAPI Specification, please refer to the service inputs and outputs. OpenAPI Specification
For more examples, please refer to the Documentation
Follow the steps as shown below.
- cURL POST /mutant DNA [ Cloud Platform ]
curl --location --request POST 'https://mutant-meli-app.herokuapp.com/mutant' \ --header 'Content-Type: application/json' \ --data-raw '{ "dna": [ "ATGCGA", "CAGTGC", "TTATGG", "AGAAGG", "CCCCTA", "TCACTG" ] }'
- cURL GET /stats DNA [ Cloud Platform ]
curl --location --request GET 'https://mutant-meli-app.herokuapp.com/stats'
Distributed under the MIT License.
- Node JS was chosen for its response time for large amounts of traffic.
- Typescript: it offers a strong typing, to perform model validations and make a robust development.
- OpenAPI: Offers a clear and concise contract of what the API offers, both inputs and outputs.
- Express: A middleware that offers several interesting options, among which request interceptors and OAS validation stand out.
- MongoDB: It is a NoSQL database, which allows high traffic, horizontal scaling and a dynamic scheme ideal for robust developments. In addition, there are no relationships with other entities.
- Heroku: It is a cloud platform, which allows you to host APIs with a complete, robust and secure free layer.
- The suggested design pattern for this solution is the "Strategy Pattern" given that the inputs and outputs are similar, what changes is the way in which each one performs its validation.
- SOLID principles applied.