Skip to content

A Bridge between theory and practice with realistic SOLID examples. A guide to better software architecture.

License

Notifications You must be signed in to change notification settings

MehediMubin/solid-by-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SOLID Design Principles by Example 🚀

License: MIT PRs Welcome

Stop memorizing definitions. Start refactoring real code.

This repository contains real-world case studies demonstrating how to apply SOLID principles. Unlike other tutorials that use abstract "Animal/Dog" examples, we use realistic scenarios (e.g., Payment Gateways, Data Pipelines) to show the actual business value of clean architecture.

⭐ Support

If this repository helped you understand SOLID better, please give it a Star! It helps others find these resources.

🌍 A Polyglot Repository

This project is language-agnostic. While the initial case studies are written in TypeScript, we welcome contributions in Go, Java, Rust, C#, Python, and more.

📂 Case Studies

# Principle Case Study Topic Key Takeaway
01 SRP Keyword Processing Pipeline Breaking a monolithic "God Handler" into Service, Parser, and Repository layers.
02 OCP Payroll System How to add features without modifying existing code.
03 LSP Event Ticketing System Subtyping without breaking the system.
04 ISP Media Player Keeping interfaces small and client-specific.
05 DIP Order Processor Decoupling high-level logic from low-level details.

🛠 How to Use This Repo

  1. Choose a Case Study: Navigate to the case-studies folder (e.g., case-studies/01-srp-keyword-processor).
  2. Read the Concept: The local README.md explains the problem and the solution conceptually.
  3. Select Your Language: Go into the language folder of your choice (e.g., typescript/).
  4. Compare: Look at the bad/ folder (the mess) and the good/ folder (the fix).

🤝 Contributing

Want to add a solution in Go, Rust, or Java? We would love that!

About

A Bridge between theory and practice with realistic SOLID examples. A guide to better software architecture.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published