Build Status

Pizzeria (Demo)

A pizza ordering web application.

Home page

The app features a pizza builder that lets the user build a custom pizza from a number of ingredients, select a crust, size, bake and cut styles and desired quantity.

Pizza Builder

The user can also opt for one of the specialty pizzas, and either order one of those predefined templates or customize it however they like.

Pizza Builder on iPad

Pizza Builder on iPad

Pizza Builder on iPhone

Pizza Builder on iPhone

Pizza Template

Pizza Builder for a template

Checkout

Checkout

Write a Review

Write a review

Registration

Registration

Login

Login

Design

High-level Package Diagram

Package diagram

Domain Model Class Diagram

Domain model class diagram

Database Schema

Database schema

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

1. Maven

2. Node.js and npm

3. Braintree API keys

  1. Go to the sandbox version of Braintree.

  2. Sign up / log in.

  3. Go to Settings - API Keys and get the following:

    1. Merchant ID
    2. Public key
    3. Private key (you'll have to click 'View' to see it)

      4. Google reCAPTCHA keys

  4. Go to Google reCAPTCHA and register a new site.

recaptcha site registration

  1. Get the public (site) and private (secret) keys.

recaptcha keys

The keys above are not valid, so don't try to use them.

Running the app

1. Clone the repository

git clone https://github.com/pzinsta/pizzeria.git

2. Build the .war file

mvn clean package

3. Launch the app

The application won't start unless all the following properties are provided.

Property Description
braintree.merchantId Braintree merchant ID
braintree.publicKey Braintree public key
braintree.privateKey Braintree private key
recaptcha.public.key Google reCAPTCHA public (site) key
recaptcha.private.key Google reCAPTCHA private (secret) key

We have two options here.

Option 1. Set the properties as environment variables.

If you've set the properties as environment variables, you can run the following command to start the app:

java -jar webapp/target/dependency/webapp-runner.jar --port 8081 --path pizzeria webapp/target/*.war
Option 2. Pass the properties as JVM arguments

In this case the command is going to be a bit more complicated.

java -Dbraintree.merchantId=<your Braintree merchant ID> -Dbraintree.publicKey=<your Braintree public key> -Dbraintree.privateKey=<your Braintree private key> -Drecaptcha.private.key=<your reCAPTCHA private key> -Drecaptcha.public.key=<your reCAPTCHA public key> -jar webapp/target/dependency/webapp-runner.jar --port 8081 --path pizzeria webapp/target/*.war

You can modify the port and the context path. Also, there are other options available.

4. Verify

Go to http://localhost:8081/pizzeria/ to check that the app is up and running.

Built With

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments