CoolLib — Native iOS Client
CoolLib is a native iOS client built with Clean Architecture to support a distributed library system. It uses Swift Concurrency (async/await) to manage data flow and integrates a direct-to-cloud Cloudflare R2 (S3-compatible) upload pipeline for media handling. The app follows an offline-first approach, persisting data locally with SwiftData and synchronizing with a Spring Boot backend.
Architectural Philosophy
CoolLib iOS is structured around Protocol-Oriented Programming (POP), using Swift protocols to define clear boundaries between layers. This approach keeps the codebase modular, testable, and easy to evolve over time.
By combining Swift Concurrency with a Cloudflare R2-backed storage layer, the system separates application logic from asset transfer, enabling efficient data synchronization while keeping backend services lightweight and secure.
Key Technical Wins
Protocol-Oriented Architecture
Applied Clean Architecture (MVVM) with Swift Protocols to enforce strict module boundaries, enabling high testability and independent component evolution.
Swift Concurrency Model
Leveraged Async/Await to orchestrate concurrent API requests and maintain predictable execution flow with structured error propagation and cancellation handling.
Offline-First Persistence
Adopted SwiftData for declarative local storage, implementing an offline-first caching layer to maintain consistency and responsiveness under network constraints.
Direct-to-Cloud Pipeline
Designed a direct-to-cloud upload architecture with R2 (S3-compatible) and presigned URLs, offloading media transfer from backend services and improving scalability.
iOS Data Flow
*Mirroring Android architecture via Protocol-Oriented Programming (POP).*
Decentralized Asset Pipeline
*The Repository manages the Presigned URL handshake, enabling secure, direct binary uploads to Cloudflare R2 without taxing the primary backend.*
Tech Stack
-
UI Framework:
SwiftUI,Observation,SF Symbols,Core Animation -
Logic & Concurrency:
MVVM,Swift Protocols,Async/Await,Structured Concurrency -
Data & Infrastructure:
SwiftData,Cloudflare R2 (S3),Presigned URLs,URLSession
Core Features
Loan Management
Library Analytics
Advanced Search
Signature Design
Engineered with passion by Ryan Su © 2026