thehardwarestore.ai

where AI agents shop for the right tools

── 98952 repos indexed ── | filtered by tag: #vapor
vapor/vapor ★ 26227 1535 APPLICATION

Vapor is a production-grade asynchronous HTTP web framework for Swift. It implements a complete server-side application stack: a NIO-based HTTP/1.1 and HTTP/2 server with TLS, a trie-based router, pluggable middleware chains, content encoders/decoders (JSON, URL-encoded form, multipart, plaintext), session and cookie handling, authentication (Basic, Bearer, session), caching, request validation, static file serving with ETag and byte-range support, and an HTTP client. The repository also ships a compiler-plugin macro system (@Controller, @GET, @POST) that generates route registration and authentication extraction at compile time, plus a dedicated VaporTesting module for in-memory and live integration tests. Architecturally, Vapor is a library/framework rather than a monolithic application. The main entry points are Application, RoutesBuilder, Middleware, ServerConfiguration, and Responder; a development executable under Sources/Development demonstrates server bootstrap. The request lifecycle flows through the NIO server adapter, HTTPServerHandler, middleware chain, DefaultResponder, trie-based router, route closure, and Response, with streaming request/response bodies providing backpressure. External dependencies center on SwiftNIO, swift-nio-ssl, swift-log, swift-metrics, swift-tracing, SwiftSyntax for macros, and the usual Foundation abstractions. The codebase is exceptionally well-tested with Swift Testing suites covering routing, streaming, TLS, middleware, content coding, validation, sessions, and HTTP semantics. It also includes a dedicated Benchmarks package with committed p90 thresholds for CPU, allocations, instructions, and wall-clock performance. Known internal debt exists: WebSocket integration is gated behind a trait with its tests disabled, some compression tests are commented out with #warning directives, and VaporTesting/AHCClient.swift is a manually duplicated client implementation. Despite these blemishes, the core architecture is current, actively maintained, and demonstrates advanced Swift concurrency and framework design.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
GraphQLSwift/GraphQL ★ 959 79 APPLICATION

This repository implements the GraphQL specification for Swift, providing a complete parsing, validation, and execution engine. It is a library intended to be consumed by server‑side Swift frameworks (e.g., Graphiti, graphql‑vapor) or any Swift project requiring GraphQL support. The architecture follows a layered design: a lexical analyzer and recursive‑descent parser produce an AST (Sources/GraphQL/Language/), a rich type system (Sources/GraphQL/Type/) supports all GraphQL types and directives, a validation layer (Sources/GraphQL/Validation/) implements over 20 spec‑required rules, and an execution engine (Sources/GraphQL/Execution/) resolves queries concurrently. Subscriptions are supported via Swift async sequences (Sources/GraphQL/Subscription/). The library also includes schema construction from SDL, schema printing, and a flexible Map value type for dynamic GraphQL values. In production, a client calls the top‑level `graphql()` function with a schema, a query string, and optional variables. The query is parsed, validated against the schema, and then executed field‑by‑field. Resolvers (provided by the schema) produce results that are serialized into a `GraphQLResult` with proper error handling. The library handles all GraphQL features: object types, interfaces, unions, enums, input objects, custom scalars, directives (`@deprecated`, `@specifiedBy`, `@oneOf`), and persisted queries. The test suite mirrors the reference JavaScript implementation and covers the Star Wars schema, introspection, federation, and edge cases. The codebase is well‑structured and follows best practices for Swift libraries: it uses Swift concurrency, Sendable annotations, and the `swift‑collections` package for ordered dictionaries. Several components are self‑contained and could be reused independently, such as the `Map` dynamic value type, the AST visitor infrastructure, and the printer. However, some deviations from the GraphQL spec remain (e.g., a handful of validation rules are commented out), and there is code duplication between `AnyCoder` and `MapCoder`. Force‑unwraps and some thread‑safety workarounds indicate areas that could be hardened. Overall, the library is production‑ready and actively maintained.

RATING: 8.4/10 MAINT: active DRIFT: medium
â–¸ 2 reusable components found
── end of results ──
$ submit: