{"id":19736524,"url":"https://github.com/soc221b/dependency-inversion-principle-example","last_synced_at":"2026-05-08T15:44:57.795Z","repository":{"id":103557740,"uuid":"492088446","full_name":"soc221b/dependency-inversion-principle-example","owner":"soc221b","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-03T03:41:08.000Z","size":109,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-28T05:37:04.352Z","etag":null,"topics":["chat-application","dependency-inversion","graphql","grpc","polling","websocket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soc221b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-05-14T02:02:04.000Z","updated_at":"2023-07-04T15:21:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"c0fde811-f75a-4ae5-b857-7371ad6fc0b1","html_url":"https://github.com/soc221b/dependency-inversion-principle-example","commit_stats":null,"previous_names":["soc221b/dependency-inversion-principle-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soc221b/dependency-inversion-principle-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soc221b%2Fdependency-inversion-principle-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soc221b%2Fdependency-inversion-principle-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soc221b%2Fdependency-inversion-principle-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soc221b%2Fdependency-inversion-principle-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soc221b","download_url":"https://codeload.github.com/soc221b/dependency-inversion-principle-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soc221b%2Fdependency-inversion-principle-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259353570,"owners_count":22844755,"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":["chat-application","dependency-inversion","graphql","grpc","polling","websocket"],"created_at":"2024-11-12T01:07:25.176Z","updated_at":"2026-05-08T15:44:52.775Z","avatar_url":"https://github.com/soc221b.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dependency-inversion-principle-example\n\nThis example shows how to use the dependency-inversion principle to implement a simple chat application.\n\n![Dependency UML](https://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/iendeavor/dependency-inversion-principle-example/main/dependency.puml)\n\nInterface:\n\n- [`ChatAPI`](./client/src/interface.ts)\n\nImplementation:\n\n- [`gRPCChatAPI`](./client/src/implementations/grpc/index.ts)\n  \u003e before using gRPC, make sure to\n  \u003e\n  \u003e 1. install `envoy`\n  \u003e 2. execute `pnpm run proxy` to enable envoy proxy\n- [`LongPollingChatAPI`](./client/src/implementations/long-polling/index.ts)\n- [`ServerSentEventsChatAPI`](./client/src/implementations/server-sent-events/index.ts)\n- [`WebSocketChatAPI`](./client/src/implementations/web-socket/index.ts)\n\n\u003e To switch between the different implementations, you can [comment out](./client/src/index.ts#L3) the `LongPollingChatAPI` and uncomment other implementations.\n\n## Usage\n\n```bash\npnpm install\n\npnpm run dev\n\n```\n\nOpen http://localhost:8080/ in your browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoc221b%2Fdependency-inversion-principle-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoc221b%2Fdependency-inversion-principle-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoc221b%2Fdependency-inversion-principle-example/lists"}