Skip to content
/ smartmenu Public

Restaurant 2.0: use your smartphone to browse the menu, order and pay

Notifications You must be signed in to change notification settings

uzak/smartmenu

Repository files navigation

SmartMenu

Welcome to smartmenu.

It implements the idea of a Restaurant 2.0, where you can use your smartphone to browse the menu, order and pay. This is a technology demonstrator, showing the use case of a customer and core implementation for use cases of the waiter and manager. It is web based and mobile enabled.

Usage

Installation

To try it out, you will need:

  • python >= 2.7
  • django >= 1.9
  • gettext
  • pillow
  • python-dateutil
  • qrcode
  • django-countries

First checkout the sources:

git clone https://github.com/uzak/smartmenu
cd smartmenu

Create translations for various UI languages (requires gettext):

django-admin compilemessages

Then generate test data:

python manage.py migrate
python manage.py createsuperuser --username admin # type email, password and then repeat password
python manage.py makemigrations main
python manage.py migrate
python manage.py genrestaurants 5
python manage.py genusers 20
python manage.py genorders 60
python manage.py genreviews 40

Finally start the application:

python manage.py runserver 0.0.0.0:8000

It needs to be started on all interfaces and not only on localhost, because check-in functianality of the waiter will require a second browser to connect, preferably from a mobile device equiped with a camera.

Demo

  • Navigate to the main page:
  • Click on Login:
  • Click on register. Enter your data and click submit:
  • A user for you will be created and you will be sent to his profile. Click on the allergens tab, choose some and click save. Don't forget about clicking the save button, otherwise changes to allergens won't be saved!
  • Go back homepage by clicking on the house icon in the left upper corner. In the search dialog press a. This input will be matched and filtered against all available restaurants and the results will be shown:
  • Click on a restaurant of your liking. All data is generated by the scripts run by manage.py, so your restaurant names will be different than those in the picture. As names and descriptions are generated, they are not supposed to make sense, only to demonstrate functionality.
  • Browse the menu. Some menu categories will have no pictures: some will have:
  • There are three ways how categories can be rendered (text only, prominent image, compact image). Allergens from your profile are highlighted, i.e. underlined. You can switch languages of the menu. Because data is generated, the names in the menu are only in english and for other languages suffix denoting the language is added in parentheses. This is generated data, so it can be changed in the DB, i.e. translation of menu is possible and is covered by manager's functionality.
  • Of course, the menu is available on any web enabled device, here a smartphone version. Here the compact category view for a different restaurant:
  • Text only category view:
  • Promiment image category view:

Now let us see the ordering and paying functionality. For this we need to check-in at a restaurant. This is done by a waiter and ensures that one has to be physically present at the restaurant in order to place orders.

Waiter

  • Logout and login as administrator in django's admin interface:
  • Find and click on UserRoles. There click on ADD USER ROLE:
  • Here we will enable our user who we registered recently to act as a waiter for the restaurant you want to check in at:
  • Logout the administrator and relogin as the created user.
  • Now you can also access the waiter's interface. Preferably from a mobile device as it needs a working camera for scanning QR codes. You can also use a different browser instance on your computer. In any case, you will need a camera:
  • Log into the standard homepage, but now you will see that are are enlisted as a waiter at your restaurant. Click on the link:
  • Now you are in the waiter's interface. You can see that nobody has checked in yet:
  • Back in the first browser, go to the restaurant's menu and press "check-in". A QR code is displayed:
  • The code needs to be scanned by the waiter, who clicks on check-in customer in order to do so:
  • After a successfull scan the waiter needs to select a free table for the guest. In our case, all the tables at the restaurant are free:

Now the we can order:

  • After scanning the code, the customer is checked in and can order. This happens automatically for the user:
  • By clicking on the order button next to an item, the item can be ordered. Ordered items need to be confirmed, before they are sent to kitchen for execution. This is to provide a correction possibility for invalid orders. For this, click on the cart icon with the total sum or your order in left upper corner:
  • Here you can either confirm or delete an item. A confirmed item will appear under Invoice and will be processed in the kitchen and delivered:
  • From here you can either go back to ordering or checkout and pay:
  • After paying you can post a review of the items in your order (you can do so any time later from your profile):
  • Once a customer has paid he will be automatically checked out in waiter's interface too:

Manager

  • There is also an interface for the manager, which provides only raw functionality and therefore, is not documented. Use at your own risk, by creating a UserRole for the Manager and logging under /manager, just like with waiter.

Docs

The implementation provides three roles (user, manager, waiter) with the basic use-cases described below. Wireframes are also included.

Client

  • Login
  • Browse
    • images + text
    • allergens
    • languages
  • Order
  • Review

Client's wireframes

Waiter

  • check-in customer
  • check-out customer

Waiter's wireframes

Manager

  • manage restaurant
  • manage menu

Manager's wireframes

Code

.
├── customer                   - customer's logic (views.py, urls.py)
├── locale                     - locale files
│   ├── de
│   ├── en
│   └── sk
├── main                       - functionality shared among all roles
│   ├── management
│   │   └── commands           - CLI commands for creating test data
│   ├── templates              - templates for all roles
│   │   ├── customer
│   │   ├── main
│   │   ├── manager
│   │   ├── registration       - contains login.html for accounts module
│   │   └── waiter
│   └── templatetags
├── manager                    - manager's logic (views.py, urls.py)
├── smartmenu                  - app's settings
├── static
│   ├── css
│   ├── fonts
│   └── js
└── waiter                     - waiter's logic (urls.py, views.py)

About

Restaurant 2.0: use your smartphone to browse the menu, order and pay

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published