# uninorte-oop/pizzeria architecture

> Architecture diagram of the GitHub repository uninorte-oop/pizzeria, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/uninorte-oop/pizzeria
- Repository: https://github.com/uninorte-oop/pizzeria

## Overview

##### Main Components
- Core Domain Classes:
- Pizzeria.java: Likely central to managing the overall pizzeria process.
- Pedido.java and its subclasses (PedidoOnLine.java, PedidoTelefono.java): These capture different ordering channels.
- Item.java: Represents items on the pizzeria menu.
- Cliente.java (inside the person package): Represents the customers.
- Application/Execution Layer:
- Main1.java: The entry point where the application kicks off.
- Build and Configuration:
- Files like build.xml and nbproject configuration hints that the project uses an IDE (NetBeans) and relies on Ant for build automation. While these are not runtime system components, they are crucial for understanding project assembly and deployment.

##### Understand the Relationships and Interactions
- The Main class likely instantiates or orchestrates interactions among the core classes.
- Pizzeria.java would coordinate order placement by interacting with instances of Pedido (and its specific types), and likely it manages a list of Items and Clientes.
- The Pedido subclasses (PedidoOnLine, PedidoTelefono) suggest strategy or polymorphic handling of orders.
- The Cliente, Item, and Pedido classes form the domain model that encapsulates the business logic specific to a pizzeria’s operations.

##### Key Architectural Patterns
- Polymorphism: Through the use of Pedido subclasses for different ordering modalities.
- Modular Domain: Each business concept (cliente, pedido, item, pizzeria) is organized into its own package, supporting separation of concerns.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Application Layer"
        main1["Main1.java (Entry Point)"]:::entry
    end

    subgraph "Core Domain"
        pizzeria["Pizzeria - Central Management"]:::core
        pedido["Pedido - Base Order Class"]:::core
        item["Item - Menu Item"]:::core
        cliente["Cliente - Customer"]:::core
        pedido_online["PedidoOnLine - Online Order"]:::core
        pedido_tel["PedidoTelefono - Telephone Order"]:::core
    end

    subgraph "Build and Configuration"
        buildXml["build.xml"]:::build
        nbproj["nbproject Directory"]:::build
    end

    main1 -->|"initiates"| pizzeria
    pizzeria -->|"processes"| pedido
    pizzeria -->|"manages"| item
    pizzeria -->|"handles"| cliente
    pedido -->|"variant"| pedido_online
    pedido -->|"variant"| pedido_tel

    click main1 "https://github.com/uninorte-oop/pizzeria/blob/main/src/main/Main1.java"
    click pizzeria "https://github.com/uninorte-oop/pizzeria/blob/main/src/core/pizzeria/Pizzeria.java"
    click pedido "https://github.com/uninorte-oop/pizzeria/blob/main/src/core/pizzeria/pedido/Pedido.java"
    click pedido_online "https://github.com/uninorte-oop/pizzeria/blob/main/src/core/pizzeria/pedido/PedidoOnLine.java"
    click pedido_tel "https://github.com/uninorte-oop/pizzeria/blob/main/src/core/pizzeria/pedido/PedidoTelefono.java"
    click item "https://github.com/uninorte-oop/pizzeria/blob/main/src/core/pizzeria/item/Item.java"
    click cliente "https://github.com/uninorte-oop/pizzeria/blob/main/src/core/person/Cliente.java"
    click buildXml "https://github.com/uninorte-oop/pizzeria/blob/main/build.xml"
    click nbproj "https://github.com/uninorte-oop/pizzeria/tree/main/nbproject"

    classDef entry fill:#f9f,stroke:#333,stroke-width:2px;
    classDef core fill:#bbf,stroke:#333,stroke-width:2px;
    classDef build fill:#bfb,stroke:#333,stroke-width:2px;
```
