This is a REST API for a pizza ordering system. It allows users to order pizzas with their choice of toppings and view their order history. Store managers can manage the inventory of toppings.
This project adheres to several design principles:
- Single Responsibility Principle: Each class has one responsibility.
- Open-Closed Principle: The system is designed to allow the addition of new types of pizzas or toppings without modifying the existing code.
- RESTful Design Principles: The API is stateless, supports client-server communication, provides cacheable data, and maintains a uniform interface.
- Concurrency Control: The application can handle multiple users ordering pizzas simultaneously against the limited inventory.
- Documentation: All classes and methods are properly documented.
The algorithm for ordering a pizza is as follows:
Order Endpoint
- The user selects toppings for their pizza.
- The app calculates the price and returns the pizza order details.
Inventory Management
- Admin can Create, Update, List, or Delete Toppings
To order a pizza, make a POST request to /pizzas
with a JSON array of toppings:
[
"Pepperoni",
"Onions"
]
## Postman Collection included