Skip to content

πŸ• NodeJS-Pirple-Pizza-System: Backend & CLI for pizza delivery with user auth, menu management, and order processing. πŸš€

Notifications You must be signed in to change notification settings

Jagoda11/Pirple-NodeJS-FullStack-Pizza-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

74 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pirple NodeJS FullStack Pizza AppπŸ•

GitHub Issues GitHub Last Commit Build Status

Homework Assignment #4

  • Build a CLI interface that would allow the manager of the pizza place to:

To start the CLI: nodemon cli/index.js πŸš€

  1. View all the current menu items βœ…
    Run: list menu

  2. View all the recent orders in the system (orders placed in the last 24 hours) βœ…
    Run: list orders

  3. Lookup the details of a specific order by order ID βœ…
    Run: get order <ID>
    // You can use get order 0

  4. View all the users who have signed up in the last 24 hours βœ…
    Run: list users

  5. Lookup the details of a specific user by email address βœ…
    Run: get user <EMAIL>
    You can use: get user vigiho5448@trejni.com // temporary email

Homework Assignment #3

Details (Scenario):

It is time to build a simple frontend for the Pizza-Delivery API you created in Homework Assignment #2. Please create a web app that allows customers to:

  1. Signup on the site βœ…

  2. View all the items available to order βœ…

  3. Fill up a shopping cart βœ…

  4. Place an order (with fake credit card credentials), and receive an email receipt βœ…

Homework Assignment #2

User login πŸ§‘β€πŸ’Ό

POST /users/login

body: {email: String, password: String}

User logout πŸ”’

POST /users/logout

header: authorization

Add user πŸ†•

POST /users

body: {email: String, name: String, password: String, street_address: String}

Update user πŸ”§

PUT /users/:id

param: id

body: {email: String, name: String, password: String, street_address: String}

Delete user ❌

DELETE /users/:id

param: id

Get menu items πŸ“œ

GET /menu

header: authorization

Add item to the shopping cart πŸ›’

POST /shopping-cart/add

header: authorization
body: {itemId: String}

Checkout an order πŸ’³

POST /order/checkout

header: authorization
body: {cardNumber: String}

Details (Scenario):

You are building the API for a pizza-delivery company. Here's the spec from your project manager:

  1. New users can be created, their information can be edited, and they can be deleted. We should store their name, email address, and street address. βœ… (remaining: store users on desk instead of memory)

  2. Users can log in and log out by creating or destroying a token. βœ…

  3. When a user is logged in, they should be able to GET all the possible menu items (these items can be hardcoded into the system). βœ…

  4. A logged-in user should be able to fill a shopping cart with menu items. βœ…

  5. Create an Order with Stripe Integration πŸƒπŸƒ
    A logged-in user should be able to create an order. Integrate with the Stripe.com Sandbox to process payments. Utilize Stripe's sandbox for testing purposes. Explore the Stripe testing documentation and the charges API to understand how to use fake tokens for server-side testing.

  6. Email Receipt with Mailgun Integration πŸƒπŸƒ
    Once an order is placed, email the user a receipt. This should be done by integrating with the Mailgun.com sandbox. Each Mailgun account has a sandbox domain (like whatever@sandbox123.mailgun.org) that allows sending emails without DNS setup. For more details, visit the Mailgun FAQ.

Important Note: If you use external libraries (NPM) to integrate with Stripe or Mailgun, you will not pass this assignment. You must write your API calls from scratch.

This is an open-ended assignment. You may take any direction you'd like to go with it, as long as your project includes the requirements. It can include anything else you wish as well.

And please: Don't forget to document how a client should interact with the API you create!

Continuous Integration 🚴

This project now includes a GitHub Actions workflow that automatically updates npm dependencies and performs a vulnerability scan🧐. The workflow runs daily at 2 AM UTC and whenever changes are pushed to the master branch. It ensures that the project stays up-to-date.

The workflow performs the following tasks:

  • Updates all ⬆️ npm dependencies.
  • Runs a vulnerability scan using the Debricked CLI.🚨
  • Automatically commits and pushes πŸš€changes to the repository if dependencies are updated.