{"id":15011715,"url":"https://github.com/archetypicalsoftware/conduit","last_synced_at":"2025-04-12T03:51:53.959Z","repository":{"id":34136338,"uuid":"168697894","full_name":"ArchetypicalSoftware/Conduit","owner":"ArchetypicalSoftware","description":"Conduit connects browsers and .NET Core applications utilizing strongly typed payloads and enables server-side message filtering based upon client data.","archived":false,"fork":false,"pushed_at":"2022-12-09T11:14:17.000Z","size":2350,"stargazers_count":2,"open_issues_count":30,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T03:51:50.389Z","etag":null,"topics":["dotnet-standard","npm-package","nuget-package","signalr","signalr-core"],"latest_commit_sha":null,"homepage":"https://archetypical.software/Product/Detail/Conduit","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArchetypicalSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-01T12:59:29.000Z","updated_at":"2023-07-31T22:32:46.000Z","dependencies_parsed_at":"2023-01-15T05:01:30.601Z","dependency_job_id":null,"html_url":"https://github.com/ArchetypicalSoftware/Conduit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArchetypicalSoftware%2FConduit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArchetypicalSoftware%2FConduit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArchetypicalSoftware%2FConduit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArchetypicalSoftware%2FConduit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArchetypicalSoftware","download_url":"https://codeload.github.com/ArchetypicalSoftware/Conduit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514209,"owners_count":21116899,"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":["dotnet-standard","npm-package","nuget-package","signalr","signalr-core"],"created_at":"2024-09-24T19:41:29.437Z","updated_at":"2025-04-12T03:51:53.932Z","avatar_url":"https://github.com/ArchetypicalSoftware.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](docs/Images/conduit.png)\n\nConduit connects browsers and .NET Core applications utilizing strongly typed payloads and enables server-side message filtering based upon client data.\n\n# Overview\n\nConduit is a wrapper to Microsoft's .NET Core websocket implementation, SignalR. In addition to providing a lot of the same functionality of SignalR, Conduit enables you to filter which users receive your messages based upon their state and not by the specific group they have registered for. This is done by storing a POCO defined by you server side for each user connected to Conduit. Once you are ready to send a message, you provide a predicate to select the specific users you want to send the message to based upon their data. Furthermore, your filter object can be updated from browser side to allow for real-time updates to your filtering.\n \n```cs\npublic class UserAssetsToMonitor\n{\n    public List\u003cstring\u003e StockSymbols { get; set; }\n}\n```\n\nFor example, imagine this POCO represents the assets the users is interested in monitoring and you want to send the information you receive as fast as you can to your users. To eliminate processing and storage client-side you can determine which users you want to send your data with a predicate.\n\n# Conduit Server\n\n[Full Documentation](docs/Server/README.md)\n\nTo send a filtered request to the client, the call from server side is quite simple:\n\n```cs\n// Get an update on something users might want\nStock updatedStock = GetUpdatedStock();\n\n// Send the data to the users where predicate result is true\nawait Conduit\u003cUserAssetsToMonitor\u003e.SendAsync(x =\u003e x.StockSymbols.Contains(updatedStock.Name), updatedStock);\n```\n\nWhenever you get an update you want to send to the user, you can call into the SendAsync method providing a predicate and the payload to be sent to the user whenever the predicate returns `true`.\n\n# Conduit Client\n\n[Full Documenation](docs/Client/README.md)\n\nTo handle an incoming message on client side is just as easy:\n\n```js\nimport { Conduit } from '@archetypical/conduit'\n\n// Create a new client\nconst conduit = new Conduit();\n\n// Initiate the connection\nawait conduit.start();\n\n// Define a callback handler for Stock\nawait conduit.on('Stock', updateStockData);\n```\n\nNow let's say your user dives into a view that is focused on a more narrow set of data. You can inform the server that you wish to only receive updates that contain that narrowed set by updating its filter.\n\n```js\n// Tell the server you only want updates for specific pages\nawait conduit.applyFilter('UserAssetsToMonitor', {\n    StockSymbols: ['MSFT']\n});\n```\n \nNow your user will only get updates for the data they said they cared about! \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchetypicalsoftware%2Fconduit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchetypicalsoftware%2Fconduit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchetypicalsoftware%2Fconduit/lists"}