{"id":30583957,"url":"https://github.com/AllThingsSmitty/basic-design-patterns","last_synced_at":"2025-08-29T09:02:46.626Z","repository":{"id":278088902,"uuid":"934335161","full_name":"AllThingsSmitty/basic-design-patterns","owner":"AllThingsSmitty","description":"🔧 A collection of essential design pattern examples in JavaScript 🧰","archived":false,"fork":false,"pushed_at":"2025-03-21T18:02:13.000Z","size":68,"stargazers_count":554,"open_issues_count":0,"forks_count":35,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-18T04:12:44.185Z","etag":null,"topics":["awesome","awesome-list","code-snippets","design-patterns","design-principles","javascript","javascript-patterns","javascript-snippets","patterns","snippets","software-design-patterns","software-design-principles"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AllThingsSmitty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-17T16:53:19.000Z","updated_at":"2025-05-14T23:52:05.000Z","dependencies_parsed_at":"2025-02-18T00:21:40.449Z","dependency_job_id":"0d7a37e8-3c64-423e-8794-74d5f9e0bd13","html_url":"https://github.com/AllThingsSmitty/basic-design-patterns","commit_stats":null,"previous_names":["allthingssmitty/basic-design-patterns"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AllThingsSmitty/basic-design-patterns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllThingsSmitty%2Fbasic-design-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllThingsSmitty%2Fbasic-design-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllThingsSmitty%2Fbasic-design-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllThingsSmitty%2Fbasic-design-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AllThingsSmitty","download_url":"https://codeload.github.com/AllThingsSmitty/basic-design-patterns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllThingsSmitty%2Fbasic-design-patterns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272658761,"owners_count":24971603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awesome","awesome-list","code-snippets","design-patterns","design-principles","javascript","javascript-patterns","javascript-snippets","patterns","snippets","software-design-patterns","software-design-principles"],"created_at":"2025-08-29T09:02:38.696Z","updated_at":"2025-08-29T09:02:46.617Z","avatar_url":"https://github.com/AllThingsSmitty.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# Basic Design Patterns\n\nA collection of essential design patterns for software development using practical examples, such Singleton, Factory Method, Observer, and more, to help developers write more efficient and maintainable code.\n\n## Contents\n\n- [Patterns](#patterns)\n- [Contribution Guidelines](CONTRIBUTING.md)\n\n## Patterns\n\n### Creational\n\n1. [Abstract Factory](/patterns/abstract-factory/README.md) - Provides an interface for creating families of related or dependent objects without specifying their concrete classes.\n1. [Builder](/patterns/builder/README.md) - Separates the construction of a complex object from its representation, allowing the same construction process to create different representations.\n1. [Factory Method](/patterns/factory-method/README.md) - Creates objects without specifying the exact class of object that will be created.\n1. [Protoype](/patterns/prototype/README.md) - Creates new objects by copying an existing object, known as the prototype.\n1. [Singleton](/patterns/singleton/README.md) - Ensures a class has only one instance and provides a global point of access to it.\n\n### Structural\n\n1. [Adapter](/patterns/adapter/README.md) - Allows incompatible interfaces to work together by converting one interface into another.\n1. [Bridge](/patterns/bridge/README.md) - Decouples an abstraction from its implementation so that the two can vary independently.\n1. [Composite](/patterns/composite/README.md) - Composes objects into tree structures to represent part-whole hierarchies, allowing clients to treat individual objects and compositions uniformly.\n1. [Decorator](/patterns/decorator/README.md) - Adds behavior or responsibilities to an object dynamically without altering its structure.\n1. [Facade](/patterns/facade/README.md) - Provides a simplified interface to a larger body of code, making it easier to use.\n1. [Flyweight](/patterns/flyweight/README.md) - Reduces memory usage by sharing common parts of the state between multiple objects.\n1. [Proxy](/patterns/proxy/README.md) - Provides a surrogate or placeholder for another object to control access to it.\n\n### Behavioral\n\n1. [Chain of Responsibility](/patterns/chain-of-responsibility/README.md) - Passes a request along a chain of handlers until it is handled or reaches the end of the chain.\n1. [Command](/patterns/command/README.md) - Encapsulates a request as an object, thereby allowing for parameterization and queuing of requests.\n1. [Interpreter](/patterns/interpreter/README.md) - Defines a representation for a language's grammar and provides an interpreter to process sentences in that language.\n1. [Iterator](/patterns/iterator/README.md) - Provides a way to access elements of a collection sequentially without exposing its underlying representation.\n1. [Mediator](/patterns/mediator/README.md) - Defines an object that encapsulates how a set of objects interact, promoting loose coupling.\n1. [Memento](/patterns/memento/README.md) - Captures and restores an object's internal state without violating encapsulation.\n1. [Observer](/patterns/observer/README.md) - Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified.\n1. [State](/patterns/state/README.md) - Allows an object to alter its behavior when its internal state changes.\n1. [Strategy](/patterns/strategy/README.md) - Defines a family of algorithms, encapsulates each one, and makes them interchangeable.\n1. [Template Method](/patterns/template-method/README.md) - Defines the skeleton of an algorithm in a method, deferring some steps to subclasses.\n1. [Visitor](/patterns/visitor/README.md) - Separates an algorithm from the objects it operates on by allowing new operations to be added without modifying the objects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAllThingsSmitty%2Fbasic-design-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAllThingsSmitty%2Fbasic-design-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAllThingsSmitty%2Fbasic-design-patterns/lists"}