{"id":27633114,"url":"https://github.com/vahidvdn/realworld-design-patterns","last_synced_at":"2025-04-23T18:13:41.331Z","repository":{"id":236075012,"uuid":"791856771","full_name":"vahidvdn/realworld-design-patterns","owner":"vahidvdn","description":"Explore real-world scenarios and best practices for design patterns with their unit tests ✅","archived":false,"fork":false,"pushed_at":"2024-11-08T18:50:44.000Z","size":5304,"stargazers_count":137,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-23T18:13:35.156Z","etag":null,"topics":["ci","clean-code","design-patterns","diagrams","javascript","monorepo","nodejs","nx-workspace","oop","oop-principles","principles","solid","testing","typescript","unit-test"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vahidvdn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2024-04-25T14:02:38.000Z","updated_at":"2025-04-12T13:18:45.000Z","dependencies_parsed_at":"2024-08-19T09:01:57.554Z","dependency_job_id":"43a8603d-6973-463a-988a-e8af5dcbf048","html_url":"https://github.com/vahidvdn/realworld-design-patterns","commit_stats":null,"previous_names":["vahidvdn/realworld-design-patterns"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vahidvdn%2Frealworld-design-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vahidvdn%2Frealworld-design-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vahidvdn%2Frealworld-design-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vahidvdn%2Frealworld-design-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vahidvdn","download_url":"https://codeload.github.com/vahidvdn/realworld-design-patterns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487536,"owners_count":21438612,"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","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":["ci","clean-code","design-patterns","diagrams","javascript","monorepo","nodejs","nx-workspace","oop","oop-principles","principles","solid","testing","typescript","unit-test"],"created_at":"2025-04-23T18:13:40.882Z","updated_at":"2025-04-23T18:13:41.318Z","avatar_url":"https://github.com/vahidvdn.png","language":"TypeScript","funding_links":[],"categories":["Built with TypeScript"],"sub_categories":["Design patterns"],"readme":"![design-pattern-cover](assets/cover.png)\n\n\u003cdiv align=\"center\"\u003e\n\n# Real World Design Patterns\n\nExplore real-world scenarios and best practices for design patterns in this comprehensive repository.\n\n[![Automated Tests Passing](https://github.com/vahidvdn/realworld-design-patterns/actions/workflows/ci.yml/badge.svg)](https://github.com/vahidvdn/realworld-design-patterns/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/github/vahidvdn/realworld-design-patterns/graph/badge.svg?token=E21ZMGM3M9)](https://codecov.io/github/vahidvdn/realworld-design-patterns)\n![Nx](https://img.shields.io/badge/Powered%20by-Nx-0ca5e9)\n![License](https://img.shields.io/badge/License-MIT-blue.svg)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-orange.svg)](https://github.com/vahidvdn/realworld-design-patterns/compare)\n![GitHub User's stars](https://img.shields.io/github/stars/vahidvdn%2Frealworld-design-patterns)\n\n\u003c/div\u003e\n\n\u003chr /\u003e\n\nElevate your software design skills with practical examples and insightful discussions. This workspace has been generated by [Nx, Smart Monorepos · Fast CI](https://nx.dev). For each design pattern, there is folder based on `TypeScript`. If you are comming from another programming language world, don't worry. They are not complicated. Also, tests are included for each pattern. Also you can see bad practices to understand use cases.\n\n## How to Learn? 📖\n\nYou can open directory, for instance:\n\n```\n$ cd app/strategy-pattern\n```\n\nThere is a `README` file that you can review first.\n\n## Structure of Readme\n\nHere is some steps in each `README` file:\n\n- 💡 Use Case: a short description about the specific problem that we want to solve.\n- ❌ Bad Practice: a typical solution that works but not in a proper way.\n- ✅ Good Practice: implementing the specified design pattern to solve the problem in a proper way.\n\nDiagram: There is also a diagram to represent the oveview of the design pattern to understand better. This is an example:\n\n![design-pattern-diagram](assets/strategy-pattern.jpg)\n![design-pattern-diagram](assets/command-pattern.jpg)\n![design-pattern-diagram](assets/chain-of-res.jpg)\n\nSee `/app` folder for all design patterns. ✅\n\n## How to Run\n\nIn the root directory, run:\n\n```\n$ npm install\n```\n\nTo run the design pattern:\n\n```\n$ npm run -w PATTERN_NAME start\n```\n\nFor instance **PATTERN_NAME** can be strategy-pattern\n\n\nTo run the bad practice:\n\n```\n$ npm run -w PATTERN_NAME start:bad\n```\n\n## Run Tests\n\nIn order to run tests, run the following command. (add `:watch` to run it in watch mode):\n\n```\n$ npm run test\n```\n\n## Test Coverage\n\nRun the following command to evaluate test coverage:\n\n```\n$ npm run test:cov\n```\n\nTo see the coverage report, just run:\n\n```\n$ npm run test:cov:open\n```\n\n## Contributing\n\nContributing to a community project is always welcome.\n\n## Checklist\n\n- [x] Strategy Pattern\n- [x] Dependency Injection Pattern\n- [x] Chain of Responsibility Pattern\n- [x] Builder Pattern\n- [x] Decorator Pattern\n- [x] Template Method Pattern\n- [x] Observer Pattern\n- [x] Command Pattern\n- [ ] Proxy Pattern\n- [ ] Adapter Pattern\n\n## Support\n\nAny support is welcome. You can give the project a star, if you liked it ⭐\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvahidvdn%2Frealworld-design-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvahidvdn%2Frealworld-design-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvahidvdn%2Frealworld-design-patterns/lists"}