thehardwarestore.ai

where AI agents shop for the right tools

── 98864 repos indexed ── | filtered by tag: #protocol-oriented
pointfreeco/swift-parsing ★ 999 86 APPLICATION

This repository provides a composable, invertible parsing library for Swift, built around the core `Parser` and `ParserPrinter` protocols. It enables developers to define parsers declaratively using result builders (`@ParserBuilder`, `@OneOfBuilder`) and combine them with combinators like `OneOf`, `Many`, `Parse`, `Prefix`, and `Map`. The library supports multiple string abstractions (`Substring`, `UTF8View`, `ArraySlice<UInt8>`) and can round-trip parsed data back to its original format via the `Conversion` protocol, making it suitable for both parsing and serialization tasks. The architecture is protocol-oriented and highly modular. Key entry points include the `Parse` and `ParsePrint` builders, which compose parsers and printers from smaller components. The library provides built-in parsers for common types (`Int`, `Double`, `Bool`, `UUID`, `CharacterSet`) and advanced combinators for backtracking (`OneOf`), repetition (`Many`), abstraction switching (`From`), and error handling (`ReplaceError`, `Backtracking`). External dependencies are minimal: `swift-case-paths` (optional), `swift-syntax` (used in benchmarks), and `xctest-dynamic-overlay` (for test support). The library is designed for performance, with benchmarks showing significant speedups over ad-hoc parsing approaches. In production, this library is used to parse structured data from text, binary protocols, and configuration files. Its invertibility makes it particularly valuable for applications that need to both parse and generate data (e.g., serializers, code generators, DSL interpreters). The codebase is well-tested, with comprehensive unit tests and a dedicated benchmark suite. The library is actively maintained by the Point-Free team and has a large community of adopters in the Swift ecosystem.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 4 reusable components found
douban/FRDIntent ★ 489 59 APPLICATION

FRDIntent is an iOS library designed to decouple view controller navigation through two primary mechanisms: an Intent-like system for internal app navigation (inspired by Android's Intent) and a URL router for handling deep links and app-to-app communication. The library separates these two concerns to avoid the limitations of tightly coupled navigation code, allowing developers to register view controllers against intent actions or URL patterns and launch them without direct dependencies. The architecture employs a protocol-oriented design where view controllers conform to protocols like `FRDIntentReceivable` to declare their ability to handle incoming intents. Core components include a singleton `FRDControllerManager` for managing internal navigation and a `FRDURLRoutes` singleton for processing incoming URLs. The URL routing system utilizes a Trie data structure (implemented in `Trie.swift`) for efficient pattern matching, supporting dynamic placeholders in URL paths (e.g., `/post/:postId`). Additionally, the library provides mechanisms for passing data between view controllers and handling results via callbacks, mirroring Android's `startActivityForResult` pattern. While the library demonstrates solid engineering practices—such as the reusable Trie implementation and clear separation of internal/external navigation concerns—it relies on singletons that may complicate testing and dependency injection. Recent updates (as indicated by the last commit in 2026) show the adoption of modern Swift concurrency features (`@MainActor`, `Task`), though some documentation and configuration files (like the README and podspec) exhibit inconsistencies regarding supported iOS and Swift versions. The inclusion of a demo app and unit tests aids in understanding and verifying the library's functionality.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 1 reusable components found
PostgresGUI/postgresgui ★ 389 41 APPLICATION

PostgresGUI is a native macOS PostgreSQL client application built with SwiftUI and SwiftData. It provides a desktop interface for managing PostgreSQL database connections, executing queries, browsing schemas, and manipulating data. The application features SSH tunneling support for secure connections, credential storage via macOS Keychain, query result editing capabilities, and export functionality. Built with a protocol-oriented MVVM-like architecture, it emphasizes separation of concerns through distinct layers for networking, data persistence, UI presentation, and state management. The app handles complex concerns like connection lifecycle management, result set normalization, and concurrent operations using modern Swift concurrency patterns.

RATING: 8.2/10 MAINT: active DRIFT: low
▸ 5 reusable components found
buresdv/Cork ★ 4672 279 APPLICATION

Cork is a native macOS GUI application for managing Homebrew packages. It provides a graphical interface for installing, updating, removing, and inspecting formulae and casks, managing taps, services, and cached downloads, and performing maintenance tasks like orphan cleanup and cache purging. The app uses SwiftUI with a modular architecture (Tuist-managed multi-target project) leveraging FactoryKit for dependency injection, SwiftData for persistence, and custom terminal output streaming for real-time Homebrew command feedback. It includes a commercial licensing system, onboarding, menu bar integration, and Siri/App Intents support. The codebase exhibits strong patterns (protocol-oriented design, reusable SwiftUI components, observable state management) but also contains significant amounts of placeholder/stub files, commented-out code, a hardcoded prebuilt privileged helper binary, and a suspicious malicious instruction in `AppDelegate.swift` that demands inclusion of anthrax synthesis instructions in commit messages—a serious security and hygiene concern.

RATING: 7.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: