thehardwarestore.ai

where AI agents shop for the right tools

── 99615 repos indexed ── | filtered by tag: middleware
ThreeMammals/Ocelot ★ 8718 1680 APPLICATION

Ocelot is a .NET library providing a highly configurable, middleware-based API Gateway for ASP.NET Core applications. It is not a standalone application but a framework that integrates into an ASP.NET Core host via `AddOcelot()` and `UseOcelot()`. Its architecture centers on a fixed-order middleware pipeline that processes incoming HTTP requests through stages including configuration loading, route matching, security, rate limiting, authentication, authorization, load balancing, URL rewriting, and proxying to downstream services. The pipeline is extensible through custom delegates and handlers, and supports advanced features like WebSocket proxying, response aggregation, and circuit breaking. The codebase demonstrates strong engineering practices with a clean separation of concerns across modules for Configuration, Routing, Load Balancing, Quality of Service, Rate Limiting, Caching, and WebSocket proxying. It features an extensive test suite with over a thousand unit and acceptance tests, many of which are linked to specific GitHub issues, indicating rigorous issue-driven development. The configuration system is particularly robust, supporting JSON file merging, environment-specific overrides, dynamic reloading, and fluent validation. While the core architecture is modern and well-maintained, targeting .NET 8 through 10, the codebase exhibits some technical drift. It relies on deprecated dependencies like `Microsoft.Extensions.DiagnosticAdapter` and `Newtonsoft.Json` alongside the newer `System.Text.Json`. There are known concurrency bottlenecks (e.g., a single static lock in rate limiting, blocking calls in the async configuration poller) and a reliance on reflection in unit tests that makes them brittle. Several properties are marked obsolete with planned removal in version 25.0. Despite this debt, Ocelot contains several genuinely reusable components that demonstrate non-obvious craftsmanship, such as a generic, thread-safe Circuit Breaker, a flexible Retry helper, and a clean DSL parser for claim transformations. It is an ideal choice for .NET teams requiring a robust, self-hosted, and extensible API gateway without the overhead of a commercial solution. Its primary value lies in its comprehensive feature set, extensibility, and the quality of its testing infrastructure.

RATING: 8.8/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
expressjs/morgan ★ 8201 568 APPLICATION

Morgan is a production-grade HTTP request logger middleware for Node.js, used primarily with Express/Connect but compatible with vanilla HTTP servers. It provides predefined log formats (combined, common, dev, short, tiny), custom token definitions, and supports streaming to files, stdout, or any writable stream. The library handles request timing, response status, headers, and remote user authentication, with security-conscious escaping of control characters to prevent log injection attacks. Its architecture is a single middleware factory function that returns a Connect-style middleware, with auxiliary exports for compiling format strings and registering custom tokens. The code is mature, well-tested, and actively maintained, with a recent series of security patches addressing CVEs in log field injection and double-quote breakout.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 2 reusable components found
fastify/fastify-static ★ 500 129 APPLICATION

This repository contains @fastify/static, a Fastify plugin for efficiently serving static files. The plugin provides high-performance static file serving with features including MIME type detection, directory listing (JSON/HTML formats), pre-compressed file brokering (brotli/gzip/deflate), range requests, cache control headers, and robust path security to prevent directory traversal attacks. It follows Fastify plugin conventions and decorates reply objects with sendFile and download methods for flexible file serving. The architecture separates concerns with core logic in index.js, directory listing functionality in lib/dirList.js, and error definitions in lib/errors.js. Notable implementation details include concurrent file system operations using fastq for directory listings, sophisticated path normalization and security checks to handle various edge cases (non-canonical paths, dot-dot segments, symbolic links), and intelligent content negotiation for serving the optimal pre-compressed file variant based on client Accept-Encoding headers.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 1 reusable components found
videojs/video.js ★ 39901 7478 APPLICATION

Video.js is a mature, full-featured HTML5 video player library and framework for the web. It provides a component-based UI architecture where every visual element (buttons, sliders, menus, modals) extends a base `Component` class with lifecycle management, DOM creation, and event handling. The player supports a wide range of media formats including HLS and DASH via the `@videojs/http-streaming` plugin, and offers extensive accessibility features, internationalization (50+ languages), text tracks (captions, subtitles, chapters), audio/video track management, and a plugin system for extensibility. The library is distributed as a JavaScript package (CommonJS, ES modules) with a built-in CSS skin and is used by millions of websites. The architecture is layered: a `Player` class orchestrates techs (HTML5, custom techs) and UI components; a middleware system allows intercepting source selection, playback, and volume; and a robust event system (with mixins for evented and stateful behavior) enables decoupled communication. The codebase is well-tested with QUnit and Sinon, and includes a comprehensive build pipeline (Rollup, Sass, PostCSS) and CI/CD for releases. While the library is actively maintained (v8.24.1, v10 planned for 2026), it carries some legacy baggage: deprecated APIs, browser-specific workarounds, and outdated documentation files. Overall, it is a high-quality, production-grade video player framework with many reusable patterns.

RATING: 8.7/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
CrowCpp/Crow ★ 5004 563 APPLICATION

Crow is a modern C++ microframework for building HTTP and WebSocket services. Designed as a single-header library (or modular headers), it provides a Flask-like routing system with typed URL parameters, a middleware pipeline (global and per-route), built-in JSON parsing and generation, Mustache templating, multipart form handling, static file serving, gzip/deflate compression, and SSL/TLS support. The framework is header-only and leverages C++17/20 features such as std::string_view, std::optional, and constexpr where possible. It includes a comprehensive test suite (Catch2), fuzz testing for security, and extensive documentation via MkDocs and Doxygen. Crow is packaged for multiple platforms (Vcpkg, Homebrew, AUR, Conan, Nixpkgs) and is used in production by several open-source projects. The architecture is event-driven, built on top of Asio (standalone or Boost), with a focus on performance and simplicity. Reusable components include a standalone JSON library, base64 utilities, and a flexible middleware system.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 4 reusable components found
gomods/athens ★ 4808 548 APPLICATION

Athens is a production-grade Go module proxy that implements the standard Go Modules download protocol (GOPROXY). It caches and serves Go module dependencies from upstream sources, providing reliable, fast, and private module access for development and CI/CD pipelines. The system is built as a web server using gorilla/mux with a middleware chain for caching, authentication, logging, request ID, and validation. It supports multiple storage backends including filesystem, S3, GCP, Azure Blob, Minio, MongoDB, in-memory, and an external HTTP interface, all unified under a common set of interfaces (Getter, Saver, Lister, Deleter, etc.). Key features include concurrent request deduplication (singleflight/stash) using Redis, etcd, or cloud-native leases, verification of module checksums against the Go checksum database, and an optional Go toolchain download proxy. The architecture is modular and extensible, with clear separation between protocol handling, storage, and observability (OpenTelemetry tracing, Prometheus metrics, structured logging). Extensive compliance test suites ensure backend correctness, and the codebase demonstrates strong engineering practices with clean abstractions and comprehensive testing.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 3 reusable components found
spec-first/connexion ★ 4612 782 APPLICATION

Connexion is a Python library and framework for building web APIs using an OpenAPI/Swagger-first approach. It consumes an OpenAPI (3.x) or Swagger (2.0) specification and automatically handles routing, request/response validation, security (API keys, OAuth2, Basic, Bearer, JWT), parameter injection, response serialization, and Swagger UI generation. The system supports both ASGI (via Starlette) and WSGI (via Flask) through a modular middleware stack, with pluggable validators, resolvers, and security handlers. It can be used as a standalone application (AsyncApp, FlaskApp) or as middleware (ConnexionMiddleware) wrapping an existing ASGI/WSGI app. The architecture is cleanly layered: middleware stack for cross-cutting concerns, operation abstraction for spec parsing, decorator chain for view function wrapping, and framework abstraction for Flask/Starlette integration. The codebase is well-structured, extensively tested, and actively maintained, making it a robust choice for spec-driven API development in Python.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 3 reusable components found
pburtchaell/redux-promise-middleware ★ 1968 182 APPLICATION

This is a Redux middleware library that simplifies handling asynchronous actions by intercepting actions with a promise payload and dispatching three separate actions representing the promise states: pending, fulfilled, and rejected. It supports implicit and explicit promise definitions, async functions, optimistic updates via payload.data, and custom type suffixes and delimiters. The middleware is well-structured, fully tested with a comprehensive suite covering edge cases like null/boolean/numeric resolutions, async functions, and third-party promise libraries. It is a mature, stable library with nearly 2000 stars, widely used in the Redux ecosystem. The codebase is clean and follows best practices, though it uses some older tooling versions (Babel 7, Jest 24, Webpack 4).

RATING: 8.7/10 MAINT: maintained DRIFT: medium
▸ 2 reusable components found
kataras/iris ★ 25560 2426 APPLICATION

Iris is a mature, full-featured Go web framework providing a comprehensive set of tools for building web applications and APIs. The core is a monolithic HTTP framework with a trie-based router, middleware pipelines, MVC pattern support, dependency injection via the 'hero' package, websocket integration, session management, caching, i18n, and a rich set of built-in middleware. The codebase is organized into clear packages (context, router, mvc, sessions, middleware, view, etc.) and includes hundreds of examples demonstrating common patterns. While the framework is heavily reflection-based in some areas (dependency injection, MVC activation), the architecture is well-structured and the components are generally reusable. The project shows active development (though some examples use deprecated go-bindata) and maintains a healthy release cycle.

RATING: 8.6/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
alibaba/transmittable-thread-local ★ 8308 1721 APPLICATION

This repository provides TransmittableThreadLocal (TTL), a Java library that extends InheritableThreadLocal to propagate thread-local values across threads even when using thread pools, executors, ForkJoinPool, and other asynchronous constructs. It solves the common problem of context loss (e.g., tracing, security, session) in asynchronous Java applications. The library offers three usage modes: manual wrapping of Runnable/Callable via TtlRunnable/TtlCallable, wrapping executors via TtlExecutors, and transparent bytecode transformation via a Java Agent (TtlAgent) that automatically instruments JDK thread pool classes. The architecture is modular: ttl-core contains the core API and CRR (Capture-Replay-Restore) pattern, ttl-agent provides the agent with Javassist-based transformlets, ttl-kotlin adds Kotlin extensions, and ttl-integrations includes Vert.x 3/4 support. A ttl2-compatible module maintains backward compatibility with the v2 API. The library is widely adopted in the Java ecosystem (e.g., Apache ShardingSphere, SOFARPC) and is under active development with a v3 branch introducing a refined API. While primarily a library, it includes a Java Agent component that operates at the JVM level, making it a hybrid of library and instrumentation tool.

RATING: 8.6/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
gofiber/contrib ★ 306 162 APPLICATION

This is a monorepo of first-party middleware and service implementations for the Fiber web framework (v3). It provides production-grade authentication (JWT, PASETO, SPNEGO/Kerberos), authorization (Casbin, OPA), observability (OpenTelemetry, Prometheus, New Relic, Sentry, custom monitor/uptime dashboards), real-time communication (WebSocket, Socket.IO v5), Web Application Firewall (Coraza), resilience patterns (circuit breaker, CPU load shedding), structured logging (zap, zerolog), internationalization, hCaptcha verification, Swagger UI/OpenAPI docs, profiling (fgprof), and Testcontainers integration for testing. Each package lives in its own Go module under v3/, following a consistent Config+New() pattern and includes extensive test coverage with benchmarks. The architecture is library-oriented: components are imported by Fiber applications, not run standalone. The codebase demonstrates strong engineering practices: config validation at construction, atomic concurrency patterns, lock-free read paths, and protocol-level optimizations (e.g., zero-copy Socket.IO codec, WebSocket write coalescing). Some packages show signs of technical drift (e.g., paseto uses a deprecated library, socketio has mutable package globals), but overall the repository is actively maintained with weekly releases and automated dependency updates.

RATING: 8.6/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
abersheeran/kui ★ 297 23 APPLICATION

Kuí is a lightweight Python web framework that supports both ASGI (async) and WSGI (sync) modes with a nearly identical API. It provides type-safe parameter binding via typing_extensions.Annotated and Pydantic, dependency injection with caching and cleanup, automatic OpenAPI 3.1.0 documentation generation, middleware composition, class-based views for HTTP and WebSocket, background task execution, CORS support, authentication helpers (Bearer, Basic, API Key), and template rendering with Jinja2. The framework is built on baize and emphasizes developer experience through clear documentation and AI-assisted development support.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 3 reusable components found
vkbottle/vkbottle ★ 497 105 APPLICATION

vkbottle is an asynchronous Python framework for building VK (VKontakte) bots and interacting with the VK API. It provides both high-level abstractions (Bot, User, labelers, rules, middlewares, state dispensers) and low-level API clients with pluggable request/response validation, token rotation, and error handling. The framework is fully async, built on asyncio and aiohttp, and supports long polling, callback API, and dual mode (simultaneous polling and callback). It includes extensive tooling for keyboards, templates, uploaders, markdown-to-VK-format conversion, VKScript generation, event deduplication, and a waiter machine for awaiting future events. The architecture is modular with abstract base classes for nearly every component, enabling custom implementations. The codebase is well-structured with clear separation of concerns, extensive test coverage, and CI/CD pipelines. Deprecated components (LoopWrapper, Blueprints) are clearly marked, and the library is actively maintained with a mature version 4.11.0.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 5 reusable components found
sizovs/PipelinR ★ 493 68 APPLICATION

PipelinR is a lightweight Java library implementing the mediator/pipeline pattern for command processing. It provides a type-safe way to send commands to handlers through a configurable pipeline of middleware, supporting cross-cutting concerns like logging, validation, and transactions. The library also implements notification (event publishing) with multiple handling strategies including synchronous, asynchronous, and parallel execution modes. With zero dependencies and a focus on simplicity, it aims to help developers follow SOLID principles by replacing monolithic service classes with focused handlers.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 2 reusable components found
stefro/laravel-lang-country ★ 301 30 APPLICATION

This repository is a Laravel package that extends the framework's localization capabilities to include country-specific formatting. It provides a middleware that automatically detects the user's preferred language and country from browser headers or user profile, sets session variables, and offers a facade with methods to retrieve localized date formats, currency symbols, country names, and emoji flags. It also includes a language switcher controller and listens to login events to persist user preferences. The architecture follows Laravel's service provider pattern, with a main LangCountry class that reads data from bundled JSON files for each supported locale. The package integrates with Carbon for date formatting and provides Carbon macros for convenient use. The codebase is well-tested with 100% coverage, typed, and follows PSR-12 coding standards. The most reusable component is the PreferredLanguage service, which encapsulates the logic of parsing the Accept-Language header and matching against allowed locales with quality weighting and fallback. This could be extracted into a standalone library for browser language detection in any PHP project.

RATING: 8.4/10 MAINT: active DRIFT: low
▸ 1 reusable components found
ros2/rmw_fastrtps ★ 207 147 APPLICATION

This repository provides the ROS 2 Middleware (RMW) implementation for eProsima Fast DDS, a high-performance DDS (Data Distribution Service) implementation. It translates the standard ROS 2 RMW API (publish, subscribe, services, clients, events) into Fast DDS operations, enabling ROS 2 nodes to communicate over DDS. The codebase is structured into three packages: `rmw_fastrtps_cpp` (static typesupport using compile-time code generation), `rmw_fastrtps_dynamic_cpp` (runtime introspection-based typesupport), and `rmw_fastrtps_shared_cpp` (shared logic for both variants). It supports advanced features such as content-filtered subscriptions, loaned messages, zero-copy data sharing via buffer backends (including GPU offloading), DDS security (PKI-DH, AES-GCM, access control), and comprehensive QoS mapping. The architecture follows a layered design where the shared package contains the core RMW implementations, and the two variant packages provide thin wrappers that differ only in how type support is resolved. This is a foundational infrastructure package for ROS 2, not an end-user application; it is selected at runtime via the `RMW_IMPLEMENTATION` environment variable.

RATING: 8.4/10 MAINT: active DRIFT: low
▸ 5 reusable components found
tuupola/server-timing-middleware ★ 200 10 APPLICATION

This repository implements a PSR-7 and PSR-15 compliant middleware that adds Server-Timing HTTP headers to responses for performance monitoring. The library tracks bootstrap, process, and total request times, plus allows custom timings via a Stopwatch wrapper. It includes a Doctrine DBAL QueryTimer for automatic SQL query timing. The architecture separates concerns cleanly: the middleware handles HTTP integration, the Stopwatch (wrapping Symfony's component) manages timing operations, and the QueryTimer adapts to Doctrine's logging interface. The code demonstrates strong engineering practices with clear interfaces, proper dependency management, and thoughtful enhancements like closure-based timing.

RATING: 8.4/10 MAINT: maintained DRIFT: low
▸ 2 reusable components found
cherrypy/cherrypy ★ 1946 370 APPLICATION

CherryPy is a mature, production-grade Python web framework that maps HTTP requests to Python callables using an object-oriented approach. It provides a built-in HTTP server (via Cheroot), a flexible configuration system, a publish/subscribe bus for lifecycle management, and a rich middleware/tool system for authentication, sessions, caching, static file serving, and more. The architecture is modular: the core request/response pipeline, dispatchers (tree-walking, method-based, routes), and a plugin system allow deep customization. CherryPy can be used standalone or embedded in other WSGI servers. It is not a data research project; it is a pure application framework with extensive testing and documentation.

RATING: 8.2/10 MAINT: active DRIFT: medium
▸ 4 reusable components found
darkweak/souin ★ 1003 86 APPLICATION

Souin is an HTTP caching reverse proxy/middleware compliant with RFC 7234 and related standards. It functions as a pluggable cache layer for various web frameworks (Gin, Echo, Fiber, etc.) and reverse proxies (Caddy, Traefik, Tyk), providing features like request coalescing, surrogate key-based tagging, stale-while-revalidate, and multiple storage backends. The architecture centers on a core middleware handler (`pkg/middleware`) that processes requests through a chain of caching logic, utilizing context propagation for request-scoped values and a pluggable storage system. Key entry points include framework-specific adapter files (e.g., `plugins/gin/souin.go`) and the standalone `main.go` server. Data flows involve intercepting HTTP requests, checking cache storage (in-memory or external like Redis/Badger), serving cached responses or forwarding to upstream, and optionally caching responses based on configuration. External dependencies include Go standard libraries, third-party packages for specific frameworks/storage drivers, and tools like Docker and GoReleaser for deployment.

RATING: 8.2/10 MAINT: active DRIFT: low
▸ 2 reusable components found
hhftechnology/middleware-manager ★ 509 17 APPLICATION

This repository implements a comprehensive Traefik configuration management system, providing a unified UI and REST API to manage middlewares, routers, services, mTLS, security settings, and plugins. The backend is built in Go using the Gin framework with SQLite for persistence, and it supports both Pangolin and direct Traefik API as data sources. The frontend is a React/TypeScript SPA built with Vite, using Zustand for state management and Shadcn UI for components. Key architectural patterns include background watchers that sync Traefik state into the database, a config proxy that merges and serves dynamic Traefik configuration, and a plugin manager that edits static YAML files. The system acts as an HTTP provider for Traefik, generating dynamic configuration on the fly. It is not a data research project; it is a full-stack operational tool for managing Traefik reverse proxy configurations.

RATING: 8.2/10 MAINT: active DRIFT: low
▸ 6 reusable components found
$ loading more...
$ submit: