GithubHelp home page GithubHelp logo

mealpeal-case-study's Introduction

MealPal Code Exercise

Product Brief

Thanks for helping us out! We are building a product to help restaurants with recording the full name and phone number for every restaurant guest.

We would like you to complete the feature below by:

1 - Setting up a component in React to submit full name and phone number with the acceptance criteria below:

  • If a user enters a full name (min. two words) and a valid phone number (10 or 11 digits), they should see the success screen with their name.
  • If a user enters a name that has less than two words, they should see an error message (* must be your first and last name)
  • If a user enters a phone number that is invalid, they should see an error message (* numbers only (ex. 1231231234))

Please check out designs file in the root folder.

2 - Create the API endpoint in Rails to receive the data and validate entry before storing it

  • If a user submits a valid entry, the API should return a 201 OK response and store the user data in the DB
  • If a user submits an invalid entry, the API should return a 400 response and not store the user data in the DB

Technical Details

Please keep it as simple as possible. We favor simple and pragmatic solutions over complicated ones. Use tests where you feel is necessary to make sure the solution works. Follow designs but don't focus on getting a pixel perfect solution. The objective of this exercise is to see how you build the feature more than how good your css skills are.

To submit your response, just compress the whole repository in a .zip file with your name and reply to the email that you have received this into.

Starting the Application

bundle install
yarn build
rails server -p 3000

Accessing the server

open http://localhost:3000/

mealpeal-case-study's People

Contributors

charliebaker9 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.