Git Product home page Git Product logo

rick-and-morty-api-challenge's Introduction

Rick and Morty API Challenge

Created by Fábio Leite [email protected] linkedin.com/fabioleitedev

Pre-requisites

Get started (100% Containerized)

  • 📂   Go to the source folder /src
  • ⚙️   Create the .env file following the .env.sample file.
  • 📂   Go to the root folder.
  • 🏃🏻   Run ./start.sh
  • 🚀   Start using the API

Get started (Local)

  • 📂   Go to the source folder /src
  • ⚙️   Create the .env file following the .env.sample file.
  • 📂   Go to the root folder.
  • 🏃🏻   Run ./start-local.sh
  • 📂   Go to the source folder /src
  • 🏃🏻   To run tests, type npm run test or yarn test
  • 🚀   Start using the API

Kubernetes

I left a deployment.yaml as an example to deploy it in K8S.

Using the API

GET /v1/characters/locations

  • Returns characters by name with other characters residing in the same location.
  • Send a GET request to localhost:5000/v1/characters/locations?name=Alan Rails

GET /v1/characters/episodes

  • Returns characters by name with the first episode that they appeared and other characters that appeard in the same episode
  • Send a GET request to localhost:5000/v1/characters/episodes?name=Rick

My Considerations

  • I decided to use Redis to cache results in memory, because it's a kind of data that don't change very often. In a microservices approach, would became a cache microservice.
  • I decided to remove the character search from the list of other characters, avoind data replicated.
  • I created a ParseService to handle the transformation of the data comming from the external API to the internal model of the app. In a more complex architecture, we could use some ETL technology or a microservice with this reponsability.

rick-and-morty-api-challenge's People

Contributors

fabioleitedev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.