GithubHelp home page GithubHelp logo

patricklkkgpl / greasy-spoon-pos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andyfrith/greasy-spoon-pos

0.0 1.0 0.0 244 KB

This demo is a React Redux application that provides minimal features of a very basic restaurant Point of Sale system.

HTML 2.55% JavaScript 97.45%

greasy-spoon-pos's Introduction

Greasy Spoon


Greasy Spoon

greasy-spoon-pos

This demo is a React Redux application that provides minimal features of a very basic restaurant Point of Sale system.

Implemented Business Requirements:

  • Servers should be able to open a new check against a table (see POST /checks).
    • The restaurant has a fixed number of tables (see GET /tables). These tables never change.
    • Each check is associated with one and only one table.
    • Each table may have at most one open check associated with it at a time.
    • Each table may have any number of closed checks associated with it.
    • The restaurant may have multiple open checks at the same time, up to the number of tables.
  • Servers should be able to add menu items to an open check (see POST /checks/:id/addItem).
    • The restaurant has a fixed set of menu items (see GET /items). These menu items never change.
    • A check may have any number of menu items associated with it.
    • The same menu item may appear any number of times on a check (a table may order 3 burgers and 2 sodas).
  • Servers should be able to void an item on an open check (see POST /checks/:id/voidItem).
    • Voiding an item does not remove it from the check, but rather changes the “voided” property to true. That is an important distinction, and the UI should faithfully represent it.
    • You cannot void an item that does not appear on the check (if there is no burger on the check, I should not be able to void a burger on the check).
    • You cannot void an item more than once.
  • Servers should be able to close a check (see POST /checks/:id/close)
    • Once a check is closed, it may no longer be edited in any way (items cannot be added or voided, it cannot be closed again, etc).
    • Once a check is closed, tax and tip will be calculated automatically on the server-side.
  • Servers should be able to view all checks in the system, open and closed.
    • Typically, servers will be working on open checks. This is the primary use case. Think about how you will facilitate easily viewing and switching between open checks.
    • Sometimes servers will need to view closed checks - perhaps to confirm a charge or check a total. Think about how servers will navigate & distinguish between a potentially large number of closed checks.
  • Servers should be able to view the details of a check
    • When viewing a check’s details, each charge should appear as a separate line item.
    • If a check is closed, tax and tip should be displayed as separate line items.
  • All servers in the restaurant will be using the same UI. You may assume that only those servers will have access to this UI. You do not need to deal with identity management, authentication, authorization, login, etc. in any way.

Why Did I Build This?

This app was built to demonstrate an understanding of best practices relating to:

  • How to use React’s state and props
  • The React Redux lifecycles
  • ES6 Javascript
  • Implementing Material-UI components
  • The react-router library
  • Use of Axios HTTP client

Environment

This project template was built with Create React App, which provides a simple way to start React projects with no build configuration needed.

Install

Follow the following steps to get development environment running.

  • Clone 'greasy-spoon-pos' repository from GitHub

    git clone [email protected]:andyfrith/greasy-spoon-pos.git
  • Install node modules

    cd greasy-spoon-pos
    yarn install

Run

  • Run start

    yarn start

License

This project is licensed under the MIT license, Copyright (c) 2018 Andy Frith.

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.