Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Crystal
  3. crystal-patterns

crystal-patterns

MITCrystal

A collection of Gang of Four (GOF) design patterns implemented in the Crystal programming language.

GitHubGitHub
308 stars14 forks0 contributors

What is crystal-patterns?

Crystal Patterns is a repository containing implementations of the classic Gang of Four (GOF) design patterns written in the Crystal programming language. It provides working code examples for all 23 patterns across behavioral, creational, and structural categories. The project helps Crystal developers understand and apply these proven software design solutions in their own projects.

Target Audience

Crystal language developers who want to learn or reference design patterns, and software engineers building applications in Crystal who need architectural guidance.

Value Proposition

It offers the only comprehensive, Crystal-specific implementation of all GOF patterns in one place, serving as both an educational resource and a practical coding reference tailored to the language's syntax and type system.

Overview

:book: Examples of GOF patterns written in Crystal

Use Cases

Best For

  • Learning design patterns with Crystal code examples
  • Referencing GOF pattern implementations while developing Crystal applications
  • Understanding how classic patterns adapt to Crystal's syntax and type system
  • Studying software architecture patterns in a statically-typed, Ruby-like language
  • Finding starting points for implementing patterns in Crystal projects
  • Comparing pattern implementations across different programming languages

Not Ideal For

  • Projects not using the Crystal programming language
  • Teams needing production-ready libraries with extensive documentation and support
  • Developers seeking modern or domain-specific patterns beyond the classic GOF set

Pros & Cons

Pros

Complete GOF Coverage

Includes all 23 Gang of Four patterns, as listed in the README across behavioral, creational, and structural categories, providing a comprehensive reference.

Crystal-Specific Adaptations

Patterns are adapted to leverage Crystal's syntax and type system, making implementations practical for Crystal developers, as noted in the project philosophy.

Runnable Code Examples

Each pattern is presented as clear, runnable examples in Crystal files, aiding direct understanding and application in projects.

Community-Driven Improvements

The project openly welcomes pull requests for inconsistencies or improvements, encouraging collaboration among Crystal users.

Cons

Minimal Documentation

The README lacks detailed explanations, setup guides, or usage instructions, relying solely on code examples which may hinder learning for some users.

Limited Pattern Scope

Focuses exclusively on classic GOF patterns, ignoring modern patterns like repository or CQRS that are relevant in contemporary software development.

Uncertain Maintenance

With only a few contributors listed and no mention of testing or continuous integration, the project's long-term upkeep and reliability might be inconsistent.

Frequently Asked Questions

Quick Stats

Stars308
Forks14
Contributors0
Open Issues0
Last commit11 months ago
CreatedSince 2015

Tags

#code-examples#software-architecture#behavioral-patterns#oop#structural-patterns#crystal-lang#design-patterns#crystal#creational-patterns#gof-patterns#reference-implementation

Built With

C
Crystal

Included in

Crystal3.5k
Auto-fetched 1 day ago

Related Projects

exercism-crystalexercism-crystal

Exercism exercises in Crystal.

Stars79
Forks61
Last commit5 days ago
crystalworldcrystalworld

RealWorld back-end API implementation 👍

Stars43
Forks5
Last commit5 years ago
try.crtry.cr

Try monad for crystal

Stars26
Forks4
Last commit16 days ago
blackjack-crblackjack-cr

Blackjack written in Crystal

Stars11
Forks1
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub