Skip to content

An example application of how to use Semantic Kernel in a pizza eCommerce shop

Notifications You must be signed in to change notification settings

Azure-For-Everyone/pizza-shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsoft's Pizza Shop

Welcome to the Pizza Ordering Web Application! This project is built using React for the frontend and Python for the backend. The idea is to provide a seamless experience for users to order pizzas and search for their favorite pizzas using a smart search powered by Semantic Kernel and OpenAI.

Concept

The main concept of this project is to create a user-friendly web application where users can browse a pizza menu, add pizzas to their cart, create orders, and track their orders. The application leverages Semantic Kernel and OpenAI to enable a smart search feature, allowing users to search for pizzas using natural language.

Features

  • Menu Browsing: Browse the delicious pizza menu and choose your favorite items.
  • Cart Management: Add pizzas to the cart, view cart contents, and remove items if needed.
  • Order Creation: Create a new pizza order, provide your contact information, and choose delivery priority.
  • Order Tracking: Track the status of your order and view the estimated delivery time.
  • Smart Search: Use natural language to search for pizzas using Semantic Kernel and OpenAI.

Screenshots

Smart search

Usage

To use the Pizza Ordering Web Application, follow these steps:

Frontend

  1. Clone the repository:

    git clone https://github.com/Azure-For-Everyone/pizza-shop
  2. Change into the project directory:

    cd pizza-shop
  3. Install dependencies:

    yarn
  4. Start the development server:

    yarn dev
  5. Open your web browser and navigate to the provided URL to access the app.

Backend

  1. Change into the backend directory:

    cd api
  2. Create a virtual environment:

    python -m venv venv
  3. Activate the virtual environment:

    • On Windows:

      venv\Scripts\activate
    • On macOS/Linux:

      source venv/bin/activate
  4. Install dependencies:

    pip install -r requirements.txt
  5. Create a .env file in the api directory and add your Azure OpenAI credentials:

    AZUREOPENAI_API_ENDPOINT=<your-api-endpoint>
    AZUREOPENAI_API_KEY=<your-api-key>
    AZUREOPENAI_API_VERSION=<your-api-version>
    AZUREOPENAI_DEPLOYMENT_NAME=<your-deployment-name>
  6. Start the backend server:

    python main.py

How to Order Pizza

Home Page

When you first access the app, you will be greeted with the home page. If you are a new user, you will be prompted to create an account by providing your name. If you are an existing user, your name will be displayed.

Menu Page

After creating an account or if you are an existing user, you can proceed to the menu page. Here, you can browse the available pizza options. Each pizza will display its name, description, and price.

Adding Pizzas to Cart

To add a pizza to the cart, simply click the "Add to Cart" button on the pizza card. The pizza will be added to your cart with a default quantity of 1. If the same pizza is already in the cart, its quantity will be increased.

Viewing Cart

To view your cart, click the "Cart" button in the navigation bar. The cart page will display the pizzas you have added along with their quantities and total prices. From here, you can proceed to order or remove items from the cart.

Order Creation

Click the "Order Pizzas" button on the cart page to proceed to order creation. You will be asked to provide your contact information, including your name and phone number. You can also choose whether you want to give your order priority. The total price for your order will be displayed.

Order Tracking

Once you have created an order, you will be redirected to the order tracking page. Here, you can track the status of your order and view the estimated delivery time.

Contributing

We welcome contributions to improve the Pizza Ordering Web Application. If you'd like to contribute, please follow the standard GitHub workflow of forking the repository, making changes on a feature branch, and opening a pull request to merge your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

An example application of how to use Semantic Kernel in a pizza eCommerce shop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published