Skip to content

Recruiting exercise for Full-Stack Developer position at LOFINO GmbH

Notifications You must be signed in to change notification settings

parasmehta/cocktail-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the LOFINO Coding Assignment!

Your task is to complete the implementation of a Cocktail Finder service :-)

Prerequisites

  • an installation of Node.js (10+) and npm
  • a GitHub account
  • your favorite IDE

Overview

The repository contains a database of cocktails in JSON format inside db.json.

Each entry in the file is a cocktail containing an id, a name and an array of ingredients.

{
  "drinks":
    [
      {
        "id": ...,
        "name": ...,
        "ingredients": [...],
      },
    ]
}

We have provided starter code in the server.js file. The getAllDrinks() function returns a Promise with an array of all cocktails in the database.

server.test.js contains unit tests to test your implementation. We use jest for this. Feel free to add more tests if you want.

Getting started

  • run npm install inside the project folder to install dependencies
  • run npm run test to run the tests or npm run test -- --watch to watch for changes of the file
    cd cocktail-finder
    npm install
    npm run test -- --watch

Your tasks

  1. Write a function to retrieve all the cocktails that can be prepared using a given set of ingredients. Use the provided function getAllDrinks() to get all the cocktails from the database and complete the implementation of the getMatchingDrinks() function.

NOTE

Remember to call the provided getAllDrinks() function in your implementation of getMatchingDrinks()


  1. Review this open merge request for a new feature. While reviewing, your focus should be on checking code quality and adherence to best practices.

What we expect

  • make a copy of this repository by forking it and submit your changes by making a pull request via GitHub
  • make sure all tests are passing
  • write clean code following best practices
  • feel free to add comments on the code if you want to explain something or on a place that could be improved
    • you can also add comments at the bottom of this document
  • feel free to add more tests to check the robustness of your solution
  • in case of questions, open an issue in the repository or send an email to paras.mehta@lofino.de or tobias.hann@lofino.de
  • when you're done send an email to paras.mehta@lofino.de or tobias.hann@lofino.de

Your Notes

Here you can add your own notes and comments about the project.

For example, what trade offs did you have to decide for? What would you have done differently/better if you had more time?

About

Recruiting exercise for Full-Stack Developer position at LOFINO GmbH

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published