- Java 64%
- Vue 25%
- TypeScript 10%
- HTML <1%
- CSS <1%
DecoraPizza #
DecoraPizza is a demo project designed to demonstrate the implementation and use of the Decorator design pattern in a real-world scenario: building and customizing pizzas.
Overview #
This project showcases how the Decorator pattern allows for dynamic behavior modification of objects without affecting other objects of the same class. In DecoraPizza, you can start with a base pizza and "decorate" it with various crusts, sizes, and toppings, each adding its own cost and description.
Key Features #
- Decorator Design Pattern: The core of the project, used to add functionalities (crusts, sizes, toppings) to pizza objects.
- Spring Boot Backend: A RESTful API that handles pizza building and order processing.
- Vue.js Frontend: A modern web interface for users to discover and customize their pizzas.
Project Structure #
Backend #
The backend is located in the backend/ directory and is built with Java and Spring Boot.
model/pizza/: Contains base pizza implementations (e.g., Margherita, Pepperoni).model/decorator/: Contains the Decorator pattern implementation, including:crust/: Different types of pizza crusts.size/: Various pizza sizes.toppings/: A variety of additional toppings.
Frontend #
The frontend is located in the frontend/ directory and is built with Vue.js, Vite, and Bun.
src/views/Dashboard.vue: The main interface for interacting with the pizza customization tool.
Purpose #
This is purely a demo project for educational purposes to illustrate the Decorator design pattern. It is not intended for production use.