{"id":16584877,"url":"https://github.com/mikaelvesavuori/solid-demo","last_synced_at":"2026-04-20T15:02:01.644Z","repository":{"id":200835537,"uuid":"693212656","full_name":"mikaelvesavuori/solid-demo","owner":"mikaelvesavuori","description":"SOLID demonstration using TypeScript","archived":false,"fork":false,"pushed_at":"2023-10-18T12:54:11.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-16T16:22:28.266Z","etag":null,"topics":["demos","design-patterns","javascript","js","learning","principles","solid","solid-principles","ts","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/mikaelvesavuori.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":"2023-09-18T15:13:27.000Z","updated_at":"2023-09-18T15:14:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e5243de-930f-4a30-b9ab-e7455d7d61ac","html_url":"https://github.com/mikaelvesavuori/solid-demo","commit_stats":null,"previous_names":["mikaelvesavuori/solid-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikaelvesavuori%2Fsolid-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikaelvesavuori%2Fsolid-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikaelvesavuori%2Fsolid-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikaelvesavuori%2Fsolid-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikaelvesavuori","download_url":"https://codeload.github.com/mikaelvesavuori/solid-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242150809,"owners_count":20080007,"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":["demos","design-patterns","javascript","js","learning","principles","solid","solid-principles","ts","typescript"],"created_at":"2024-10-11T22:46:06.416Z","updated_at":"2026-04-20T15:01:56.590Z","avatar_url":"https://github.com/mikaelvesavuori.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SOLID demonstration using TypeScript\n\nThis repo demonstrates the SOLID principles with the example of a basic imaginary email service, in which we need to validate the address, send a message, and log the transaction. We'll start with a basic \"dirty implementation\" and introduce the SOLID concepts one by one.\n\nIn the SILOD (\"siloed\") order:\n\n0. Start\n1. `SRP`: Begin to break up functionality and make it semantic and clean.\n2. `ISP`: Working towards interfaces, not concretions.\n3. `LSP`: Making subclasses without breaking superclasses.\n4. `OCP`: Extending behavior of superclass methods without breaking them.\n5. `DIP`: Creating flexibility by decoupling dependencies and injecting them where needed.\n\n## Running the code\n\nYou can install the things with `npm install`. For running the starting code, run `npm start`. Then, for each respective letter of the SOLID principles you want to run, use `npm run s|o|l|i|d`.\n\nOr, if you're lazy, you can also copy the individual TS file's contents into the [TypeScript playground](https://www.typescriptlang.org/play) if you want to avoid cloning and installing anything at all.\n\n---\n\n## More resources\n\n### The SOLID Principles\n\nThe principles in their mnemonic order:\n\n- [Single Responsibility Principle](src/single-responsibility-principle.ts)\n- [Open-Closed Principle](src/open-closed-principle.ts)\n- [Liskov Substitution Principle](src/liskov-substitution-principle.ts)\n- [Interface Segregation Principle](src/interface-segregation-principle.ts)\n- [Dependency Inversion Principle](src/dependency-inversion-principle.ts)\n\n### Five Minutes or Less\n\n- [5 Minutes or Less: SOLID](https://github.com/mikaelvesavuori/5-minutes-or-less-solid)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikaelvesavuori%2Fsolid-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikaelvesavuori%2Fsolid-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikaelvesavuori%2Fsolid-demo/lists"}