svelte-websocket-store is a Svelte library that provides a WebSocket-backed store implementation. It allows Svelte components to synchronize state with a WebSocket server through a familiar store interface. The library automatically manages WebSocket connections, handles reconnection with exponential backoff, and only maintains connections when there are active subscribers. The implementation demonstrates exceptional craftsmanship in its subscription management, connection lifecycle handling, and error recovery mechanisms, with careful attention to edge cases like duplicate connection prevention and proper resource cleanup.
Boost.Beast is a high-performance C++ networking library providing HTTP/1.1 and WebSocket protocol implementations built on Boost.Asio. It is a header-only (with optional separate compilation) library that offers a comprehensive set of vocabulary types, parsers, serializers, stream wrappers, and composed asynchronous operations for building networked applications. The library emphasizes symmetry, ease of use, flexibility, and performance, and includes extensive examples covering synchronous, asynchronous, coroutine (stackful and C++20), and awaitable patterns. It follows the Boost library design conventions and is part of the official Boost collection. The codebase demonstrates high craftsmanship with careful attention to allocators, error handling, executor propagation, and cancellation. While there is some duplication across examples and a few deprecated APIs, the core production headers are well-maintained and actively developed. The library also includes zlib compression for WebSocket permessage-deflate and experimental testing utilities.
discord-haskell is a Haskell library for building Discord bots. It provides type-safe bindings to the Discord API, handling both REST requests and WebSocket gateway connections. The library features automatic rate limiting, resilient connection handling with reconnection logic, optional caching of guild/channel/user data, and comprehensive support for Discord interactions including slash commands, buttons, select menus, and modals. Built with a modular architecture separating gateway, REST, and type concerns, it uses ReaderT for dependency injection and provides a clean interface for bot developers.
Stream Chat Swift is an iOS/macOS SDK for building real-time chat and messaging applications. It provides a modular architecture separating core networking (StreamChat), UI components (StreamChatUI), and shared utilities (StreamChatCommonUI). The SDK supports features like channels, messages, reactions, threads, polls, attachments, typing indicators, and presence. It uses Combine for reactive programming, Core Data for persistence, and WebSocket for real-time communication. The repository includes demo applications, example implementations (SlackClone, MessengerClone, etc.), and extensive testing infrastructure. The SDK follows protocol-oriented programming with dependency injection via Appearance and Components providers, enabling high customization.
The Coze Python SDK (coze-py) is a library that enables Python developers to interact with the Coze platform's APIs, providing both synchronous and asynchronous clients for services such as bot management, chat, workflows, conversations, datasets, audio processing, and more. It handles authentication (including PAT, OAuth variants), makes HTTP requests via httpx, and processes responses using Pydantic models for validation. The SDK follows a modular architecture with a main client class (`Coze`/`AsyncCoze`) that provides access to service-specific clients via properties. Key reusable components include a pluggable authentication system (supporting TokenAuth, JWTAuth, OAuth flows), a generic pagination system for list operations, streaming response handlers for Server-Sent Events and WebSocket messages, a centralized HTTP requester abstraction, and base classes for WebSocket clients. These components demonstrate non-obvious craftsmanship and could be extracted for use in other API clients. The SDK is actively maintained, as evidenced by recent commits and the deprecation of outdated modules in favor of newer alternatives (e.g., `cozepy.datasets` replacing `cozepy.knowledge`). However, it exhibits medium technical drift due to tight coupling to the Coze API (lacking API version abstraction) and potential susceptibility to changes in authentication flows or WebSocket dependencies. Despite these risks, the codebase maintains high quality through type hints, comprehensive testing, linting, and pre-commit hooks.
BotFramework-DirectLineJS is a client library for the Microsoft Bot Framework Direct Line 3.0 protocol. It enables JavaScript/TypeScript applications to communicate with bots via both REST polling and WebSocket connections. The library implements a sophisticated state machine for connection management (Uninitialized, Connecting, Online, ExpiredToken, FailedToConnect, Ended) with automatic reconnection, token refresh, and retry logic. It uses RxJS observables for handling asynchronous operations and activity streams. The architecture is modular with separate implementations for standard DirectLine and DirectLineStreaming (WebSocket-based) connections, plus utility modules for filename deduplication, iframe detection, and network-aware WebSockets.
Binance Grid Trader is a cryptocurrency trading bot that implements grid trading strategies for Binance Spot and Futures markets. The application features a modular architecture with separate layers for exchange gateways, event processing, strategy management, and user interface. It provides both a graphical interface built with PyQt5 and script-based execution modes for running trading strategies without UI. The system connects to Binance via REST and WebSocket APIs to receive market data and execute trades based on configurable grid strategies.
PyLoxone is a Home Assistant integration that enables communication with Loxone Miniserver systems. It allows Home Assistant to discover, monitor, and control Loxone devices (lights, switches, sensors, climate systems, etc.) through both HTTP API and WebSocket connections. The architecture separates Home Assistant-specific logic from the Loxone communication protocol via a dedicated pyloxone_api library. Key features include automatic token-based authentication with refresh capabilities, real-time state updates via WebSocket, entity creation across multiple Home Assistant platforms (sensor, binary_sensor, switch, cover, climate, media_player, etc.), and services for sending direct commands to Loxone devices. The integration handles connection lifecycle management, device discovery, and provides diagnostics and system health information.
CtYun is a .NET console application designed to maintain WebSocket connections to Tianyi Cloud computers for keep-alive purposes. It handles multiple accounts, logs in via HTTP API, binds devices via SMS verification if needed, retrieves desktop lists, and establishes persistent WebSocket connections. The application sends initial connection messages and responds to server keep-alive challenges with custom RSA-OAEP encrypted responses. It runs as a long-running process or in Docker containers, with configuration via files, environment variables, or interactive input. The architecture is modular with separate concerns for API communication, encryption, and connection management.