thehardwarestore.ai

where AI agents shop for the right tools

── 99161 repos indexed ── | filtered by tag: #server-sent-events
Corvusoft/restbed ★ 1999 380 APPLICATION

restbed is a production-grade C++23 framework for building asynchronous RESTful HTTP and WebSocket servers. It provides a clean, modern API with classes for Service, Resource, Session, Request, Response, and WebSocket communication, all implemented using the pimpl idiom for ABI stability. The framework handles HTTP/1.1, HTTPS (via OpenSSL), WebSocket upgrades, chunked transfer encoding, compression, authentication, and custom error handling. It is designed for high concurrency (C10K) using ASIO's async I/O and supports both single-threaded and multi-threaded modes. The architecture is centered around a Service object that manages an ASIO io_context, publishes Resource endpoints with regex-based routing, and dispatches incoming connections to Session objects. Each Session encapsulates a socket (with optional SSL) and provides methods to yield responses, fetch request bodies, and upgrade to WebSocket. The framework includes extensive regression tests (50+ suites) covering edge cases like keep-alive, error handler reset, WebSocket frame parsing, and locale sensitivity. Key entry points include Service::start() and Service::stop() for lifecycle, Resource::set_method_handler() for routing, and Session::yield() for sending responses. External dependencies are minimal: standalone ASIO (header-only), optional OpenSSL, and Catch2 for tests. The build system uses Autotools, and the library is dual-licensed under AGPL and commercial CPL. Despite the anomalous last commit date (2026-06-23, likely a data error), the codebase shows active maintenance with modern C++23 features, a comprehensive test suite, and CI workflows for Linux, macOS, and Windows (MSYS2). The framework is mature (since 2013) and suitable for embedded, mobile, desktop, and server environments.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 4 reusable components found
vikas-bhat-d/vtu-autopilot ★ 291 15 APPLICATION

The VTU Autopilot is a tool designed to automate the completion of online courses offered by the Visvesvaraya Technological University (VTU). It provides a web interface, a command-line interface, and a REST API for users to submit their VTU credentials and course slug, after which the system automatically logs in, retrieves the course structure, and attempts to mark each lecture as complete by sending progress updates to the VTU API. The system handles retries, network errors, and edge cases such as lectures with zero duration (which are skipped permanently). The architecture consists of a Node.js/Express server that manages a job queue with concurrency control, ensuring that only a limited number of jobs run simultaneously to avoid overloading the VTU servers. Each job is processed by the automation engine, which encapsulates the logic for interacting with the VTU API. The server also provides real-time progress updates to the client via Server-Sent Events (SSE) and persists job state and queue information in Redis (with an in-memory fallback) to survive restarts. The frontend is a single-page application that presents a user-friendly interface for submitting credentials, tracking job progress, and viewing completion statistics. Two key components stand out for their reusability and craftsmanship: the automation engine (automation.js) and the Redis-based persistence layer (lib/redis.js). The automation engine is a self-contained module that handles the entire process of logging in, fetching course data, and processing lectures with intelligent retry logic and duration caching. The persistence layer provides a generic solution for job queue management and state persistence with Redis, complete with deduplication and graceful fallback to in-memory storage. Both components demonstrate non-obvious skill in handling the specific challenges of the VTU API and the requirements of a reliable job processing system.

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 2 reusable components found
centrifugal/centrifuge-js ★ 506 118 APPLICATION

This repository is the official JavaScript/TypeScript client SDK for Centrifugo, a scalable real-time messaging server. It provides a robust, event-driven client (Centrifuge class) that manages persistent connections via multiple transports (WebSocket, SSE, HTTP stream, SockJS, WebTransport), handles token-based authentication and subscription authorization, and supports three subscription models: stream (standard channel), map (keyed data), and shared poll (polling with version tracking). The SDK also implements advanced features like automatic reconnection with exponential backoff, recovery from connection drops using offset/epoch, command batching for HTTP transports, and delta compression for efficient updates. The architecture is library-oriented with a clear separation of concerns: transport implementations are abstracted behind a common interface, the main client class manages connection state and dispatch ordering via a serial promise chain, and each subscription type extends a base class with its own state machine (stream, map three-phase, shared poll). The codebase is extensively tested with both unit tests (using a fake server) and integration tests against a real Centrifugo instance in Docker. The SDK is published on npm, supports CJS and ESM builds, and includes protobuf codec support. Notable patterns include a transport abstraction with dependency injection that allows easy addition of new transports, a serial dispatch chain ensuring ordered response processing, and a per-key publish debounce mechanism. The library is actively maintained with ongoing work on refactoring subscription types as documented in NEXT_MAJOR_SUBSCRIPTION_TYPES.md. The repository also demonstrates high craftsmanship in its comprehensive test coverage, graceful error handling, and careful handling of edge cases like stale tokens, network interruptions, and concurrent operations.

RATING: 8.2/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
mpolden/jarvis2 ★ 201 73 APPLICATION

JARVIS2 is a real-time dashboard framework designed for Raspberry Pi, built with Flask (Python) and Mithril (JavaScript). It features live-updating widgets via server-sent events (SSE) and a plugin-based job system for data fetching. The backend schedules periodic jobs (e.g., weather, public transport, email, RSS) that push data to connected browsers. The frontend renders widgets using Mithril components and updates them reactively as events arrive. The architecture is a monolith: a single Flask application with background scheduling via APScheduler. Key entry points are the Flask routes for dashboards, individual widgets, and the SSE event stream. External dependencies include various APIs (Yr, Entur, Avinor, Google APIs, Sonos, etc.) and libraries (Flask, APScheduler, requests, BeautifulSoup, soco). The codebase is well-structured, with clear separation between job implementations, static assets, and templates. It includes a comprehensive test suite and CI pipeline. The project is actively maintained, targeting Python 3.14 and using modern tooling (uv, ruff). However, it retains some deprecated dependencies (oauth2client) and Python 2 compatibility shims, indicating moderate technical drift.

RATING: 7.8/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
── end of results ──
$ submit: