$ show marcoarment/Blackbird
Blackbird is a lightweight, asynchronous SQLite wrapper and model layer for Swift applications. It provides a type-safe persistence layer using Swift concurrency and Codable, with automatic schema migrations, key-path-based querying, caching, change notifications, and SwiftUI integration. The library avoids external dependencies and focuses on developer experience over raw performance, using Swift's type system for compile-time safety. While primarily designed as a reusable framework for local data storage in Apple platform apps, it includes advanced features like full-text search with highlighting and transactional support. The codebase shows evidence of active maintenance but relies on some Swift internals that may pose future compatibility risks.
The LLM identified 2 files worth highlighting for reuse:
Handles bidirectional conversion between Swift types (including optionals, enums, dates, URLs) and SQLite storage types using Codable. Isolated from model logic, this module provides reusable type-safe persistence for any Swift value in SQLite without manual binding, demonstrating skill in leveraging Codable for database storage while supporting custom CodingKeys.
Implements a generic LRU cache with hit/miss tracking and automatic eviction. While used for model instances and query results, the core cache logic is decoupled from Blackbird specifics and parameterized by key/value types, making it suitable for reuse in any caching scenario. Shows non-obvious skill in cache management, metrics collection, and thread-safe eviction policies.