# abdurrkhalid/design-patterns architecture

> Architecture diagram of the GitHub repository abdurrkhalid/design-patterns, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abdurrkhalid/design-patterns
- Repository: https://github.com/abdurrkhalid/design-patterns

## Overview

##### High-Level Architecture Overview
The system should be represented as a hierarchical educational framework with three main categories:

**[Design Patterns Repository]**

**Creational  Structural    Behavioral**
**Patterns    Patterns      Patterns**

##### Component Breakdown

Each pattern category should be represented with the following components:

a) Pattern Implementation Structure:
**[Pattern Category]**

- Pattern

**Java      Abstract      Concrete**
**Classes  Interfaces    Implementation**

b) Common Implementation Components:
- Client interface
- Core pattern components
- Test/Demo classes
- Supporting utilities

##### Detailed Component Representation

For each pattern, show:
**[Pattern Name]**

**Implementation  Documentation**

**src test pom  README  Examples**

##### Implementation Details

Following for each pattern's implementation:
**[Java Implementation]**

**Abstract  Concrete   Client**
**Classes   Classes    Code**

##### Connection Types

→ Direct relationship
⟶ Implementation
⇢ Usage/Dependency
⟹ Inheritance

##### Special Notes

- Cross-pattern relationships
- Educational progression path
- Complexity levels
- Recommended learning order

## Diagram (Mermaid)

```mermaid
graph TB
    classDef category fill:#3498db,stroke:#2980b9,color:white
    classDef pattern fill:#2ecc71,stroke:#27ae60,color:white
    classDef component fill:#f1c40f,stroke:#f39c12,color:black
    classDef support fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef implementation fill:#e74c3c,stroke:#c0392b,color:white

    %% Main Categories
    Root["Design Patterns Repository"]
    Creational["Creational Patterns"]
    Structural["Structural Patterns"]
    Behavioral["Behavioral Patterns"]

    %% Category Connections
    Root --> Creational
    Root --> Structural
    Root --> Behavioral

    %% Pattern Examples (one from each category)
    Factory["Factory Method"]
    Builder["Builder Pattern"]
    Observer["Observer Pattern"]

    %% Connect Patterns to Categories
    Creational --> Factory
    Creational --> Builder
    Behavioral --> Observer

    %% Implementation Structure
    subgraph FactoryImpl["Factory Implementation"]
        FAbstract["Abstract Interfaces"]
        FConcrete["Concrete Classes"]
        FClient["Client Code"]
    end

    subgraph BuilderImpl["Builder Implementation"]
        BInterface["Builder Interface"]
        BDirector["Director"]
        BConcrete["Concrete Builders"]
        BProduct["Products"]
    end

    subgraph ObserverImpl["Observer Implementation"]
        OInterface["Observer Interface"]
        OConcrete["Concrete Observers"]
        OPublisher["Publisher"]
    end

    %% Connect Patterns to Implementations
    Factory --> FactoryImpl
    Builder --> BuilderImpl
    Observer --> ObserverImpl

    %% Common Components
    Documentation["Documentation"]
    Tests["Test Components"]
    Build["Build Configuration"]

    %% Connect Common Components
    Factory --> Documentation
    Factory --> Tests
    Factory --> Build
    Builder --> Documentation
    Builder --> Tests
    Builder --> Build
    Observer --> Documentation
    Observer --> Tests
    Observer --> Build

    %% Click Events
    click Creational "https://github.com/AbdurRKhalid/Design-Patterns/tree/main/Creational"
    click Structural "https://github.com/AbdurRKhalid/Design-Patterns/tree/main/Structural"
    click Behavioral "https://github.com/AbdurRKhalid/Design-Patterns/tree/main/Behavioral"
    click Documentation "https://github.com/AbdurRKhalid/Design-Patterns/blob/main//[Pattern Category]/[Pattern Name]/Readme.md"
    click FAbstract "https://github.com/AbdurRKhalid/Design-Patterns/blob/main//Creational/Factory Method/Java Implementation/FactoryMethod/src/main/java/Product/Button.java"
    click FConcrete "https://github.com/AbdurRKhalid/Design-Patterns/tree/main//Creational/Factory Method/Java Implementation/FactoryMethod/src/main/java/ConcreteProduct"
    click FClient "https://github.com/AbdurRKhalid/Design-Patterns/blob/main//Creational/Factory Method/Java Implementation/FactoryMethod/src/main/java/Client/Test.java"
    click BInterface "https://github.com/AbdurRKhalid/Design-Patterns/blob/main//Creational/Builder/Java Implementation/BuilderDesignPattern/src/main/java/Builder/Builder.java"
    click BDirector "https://github.com/AbdurRKhalid/Design-Patterns/blob/main//Creational/Builder/Java Implementation/BuilderDesignPattern/src/main/java/Director/Director.java"
    click BConcrete "https://github.com/AbdurRKhalid/Design-Patterns/tree/main//Creational/Builder/Java Implementation/BuilderDesignPattern/src/main/java/ConcreteBuilder"
    click BProduct "https://github.com/AbdurRKhalid/Design-Patterns/tree/main//Creational/Builder/Java Implementation/BuilderDesignPattern/src/main/java/Product"
    click Tests "https://github.com/AbdurRKhalid/Design-Patterns/blob/main//[Pattern Category]/[Pattern Name]/Java Implementation/[Pattern]DesignPattern/src/main/java/Test.java"
    click Build "https://github.com/AbdurRKhalid/Design-Patterns/blob/main//[Pattern Category]/[Pattern Name]/Java Implementation/[Pattern]DesignPattern/pom.xml"
    click OInterface "https://github.com/AbdurRKhalid/Design-Patterns/blob/main//Behavioral/Observer/Java Implementation/ObserverDesignPattern/src/main/java/Observer/EventListener.java"
    click OConcrete "https://github.com/AbdurRKhalid/Design-Patterns/tree/main//Behavioral/Observer/Java Implementation/ObserverDesignPattern/src/main/java/ConcreteObserver"
    click OPublisher "https://github.com/AbdurRKhalid/Design-Patterns/blob/main//Behavioral/Observer/Java Implementation/ObserverDesignPattern/src/main/java/Publisher/EventManager.java"

    %% Styling
    class Root category
    class Creational,Structural,Behavioral category
    class Factory,Builder,Observer pattern
    class Documentation,Tests,Build support
    class FAbstract,FConcrete,FClient,BInterface,BDirector,BConcrete,BProduct,OInterface,OConcrete,OPublisher implementation
```
