THIRST APP

The webapp to quench your thirst! Order a drink, pay and done!

Thirst App is an awesome application that from a few input parameters (drink type and amount of money) is capable to order a drink, to quench your thirst, and show a cool message for the desired drink.

HOW IT WORKS

This app is based in two components:

  • API (Express, Typescript/Javascript)

This API is the core of the app. It contains the business logic of the application and, giving some parameters, returns the desired drink, or an error if something is wrong. Also, is in charge of storing the data to calculate the benefits of the application.

  • Web App (React, Typescript/Javascript)

This is a simple React page where the user enters the parameters (drink and money) and see what the application returns. The page does not validate anything more than the input type, sending the data directly to the API and showing the message to the user.

Time to complete

3h

Ideal for

Junior · Middle 

Available stacks

JavaScript · Python · TypeScript · Ruby

Required experience

Basic knowledge

APPLICATION BUSINESS LOGIC

So, this app is a common vending machine where the user will have to insert money and select the type of drink they want, and it will return that beverage in case you insert the enough money and select an available drink type. Easy peasy :)

  • DrinkType:
  • Type: string
  • Required: true
  • Description: The drink ordered
  • moneyAmount:
  • Type: float
  • Required: true
  • Description: Coins inserted by the user

So, the application will have to accept any of those values and return some error messages once any of them are not correct. The user should receive feedback about their action and see if the beverage is on hold, or the command was failed.

EXTRA POINT

The owner of the business wants to know how much money she earns. So, the application should have a way to show how much money do it earn with all the transactions. So, every time a user buy some product, the application will have to store the amount to show it later.

TIPS

You would have to take some decisions during the Challenge, so here you could find some tips from our side:

  • You would have to decide how the application looks like. Focus on UX and try to create a simple app, less is more. Avoid unnecessary buttons, give feedback to the user, etc...
  • You have to decide what products should be available and how many items contains the application per each one. Try not to hardcode this but initialized with a migration, or a config file. Would be easy to maintain! :)

  • As you would need to store the earnings, you would have to decide how to do so. The most important thing here is not to use one Database or another, but how decoupled is your code from the storage system. You can even use a JSON file to store this information.
HOW IT WORKS
  • Solve this challenge and give it your best
  • Defend your solution by explaining your code
  • Get feedback on your code from experts
  • Build your portfolio with all your completed challenge 
WHAT WILL YOU GET
  • New project built by you to be proud
  • Feedback from Tech Mentors experts
  • Tech report of your skills - option to share it
  • Full portfolio to use it in technical interviews

ABOUT THE CREATOR

Mauro Gómez

Mauro Gómez is the CTO and Co-Founder of Rviewer. Software Engineer with more than 7 years of experience both as a developer and as a researcher in the field.

He has done research in prominent places such as the Barcelona Supercomputing Center, and worked in leading companies such as Adsmurai, as Team Lead and Big Data Developer, or Sabentis, evolving its SaaS platform.

Start now this Thirst App challenge

Ready to challenge yourself and build something you're proud of?

More coding challenges

Icon
Challenge by
Rviewer
Spotlist API
Develop an alternative to the Spotify API that lets indie artists easily manage their playlists.
Medium
  • Backend Developer
  • Middle · Senior
  • Java · JavaScript · Python · + 5
  • 4 h
Icon
Challenge by
Rviewer
Event Emitter
Create an event emitter that lets you launch asynchronous events to teammates.
Medium
  • Backend Developer
  • Senior
  • JavaScript · Vanilla
  • 1 h
Icon
Challenge by
Rviewer
Optional, a new hope
Fight against the evil Lord NullPointerException implementing your own version of the Optional (based on the Star Wars universe)
Medium
  • Backend Developer
  • Middle · Senior
  • Java
  • 3 h

Ready to level up your interview skills?

Gain the confidence you need with our new FREE HANDBOOK on mastering coding interviews.