Skip to content

Este es un repositorio que utiliza las mejores prácticas en la construcción de servicios rest, ci-cd, pruebas unitarias, coverage y patrones de diseño.

Notifications You must be signed in to change notification settings

efarias04/mutant-meli-app

Repository files navigation

LinkedIn


Table of Contents
  1. About The Project
  2. Getting Started
  3. Continuous Integration
  4. Testing and Coverage
  5. Usage
  6. License
  7. Design Decisions

About The Project

Product Name Screen Shot

This is a backend technical test for a position in Mercado Libre.

Why?:

  • I want to improve my Backend skills.
  • To learn new technologies.

(back to top)

Built With

This project is built with the following languages ,databases and cloud platform:

  • Node
  • Monlgo
  • Express
  • Typescript
  • Heroku

(back to top)

Getting Started

To start, you must take into account the following recommendations and prerequisites

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

Installation

Follow the steps as shown below.

  1. Clone the repo
    git clone https://github.com/efarias04/mutant-meli-app.git
  2. Install NPM packages
    npm install
  3. set your host connection database MongoDB to variable:
    DATABASE_CONNECTION
  4. Start application with next command
    npm run start-dev
  5. Test your API. please view the 'Usage' section an d test in your local environment

(back to top)

Continuous Integration

Product Name Screen Shot

This app is integrated with continuous delivery from GitHub Actions and Heroku. ✅

(back to top)

Testing and Coverage

Product Name Screen Shot Product Name Screen Shot

This application has unit tests and coverage of more than 96%. ✅

(back to top)

Usage

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'

(back to top)

License

Distributed under the MIT License.

Design Decisions

  1. Node JS was chosen for its response time for large amounts of traffic.
  2. Typescript: it offers a strong typing, to perform model validations and make a robust development.
  3. OpenAPI: Offers a clear and concise contract of what the API offers, both inputs and outputs.
  4. Express: A middleware that offers several interesting options, among which request interceptors and OAS validation stand out.
  5. 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.
  6. Heroku: It is a cloud platform, which allows you to host APIs with a complete, robust and secure free layer.
  7. 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.
  8. SOLID principles applied.

(back to top)

About

Este es un repositorio que utiliza las mejores prácticas en la construcción de servicios rest, ci-cd, pruebas unitarias, coverage y patrones de diseño.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published