CoolLib — Native iOS Client

SwiftUI Swift 6 SwiftData MVVM

A premium, high-performance library management experience leveraging modern Apple frameworks. Built with Clean Architecture and Structured Concurrency, it delivers an offline-first workflow synced with the Spring backend.

Architectural Philosophy

CoolLib iOS is a testament to Protocol-Oriented Programming (POP). By utilizing the latest Swift 6 features and a declarative UI approach, the application achieves a highly testable and decoupled codebase that prioritizes both developer velocity and end-user fluidity.

Key Technical Wins

Protocol-Oriented Architecture

Implemented Clean Architecture (MVVM) with strict abstraction layers, utilizing Swift Protocols for decoupled and mockable business logic.

Modern Concurrency

Leveraged Structured Concurrency (Async/Await) to handle parallel data fetching and repository mapping, eliminating callback-based complexity.

Declarative Persistence

Integrated SwiftData for model-centric local storage, enabling seamless Offline-First synchronization and state management.

Reactive UI Pipeline

Engineered a responsive binding layer using the Observation framework and Combine, ensuring real-time UI consistency across complex views.


iOS Data Flow

iOS App Architecture
graph TD subgraph I_Infra ["Infrastructure & DI"] IAPI[URLSession / Web] ISD[(SwiftData / DB)] IContainer[Dependency Factory] end subgraph I_Proto ["Abstractions (Protocols)"] IRepo[["BookRepository (Protocol)"]] end subgraph I_UI ["Presentation Layer (SwiftUI)"] direction TB IVM["HomeViewModel (@Observable)"] IView[SwiftUI View / Screen] end %% Dependency & Injection Flow IContainer -.-> IAPI & ISD IContainer -.-> IVM %% Data Flow IAPI & ISD --> IRepo IRepo -->|async/await| IVM %% Vertical flow inside UI Layer IVM -- "Observation" --> IView IView -- "Intent / Action" --> IVM style I_Infra fill:#f0f7ff,stroke:#007AFF style I_Proto fill:#fff,stroke:#007AFF,stroke-dasharray: 5 5 style I_UI fill:#fff,stroke:#333,stroke-width:2px

*Consistent with the Android architecture using Protocol-Oriented Programming.*

Single Source of Truth

Data Fetching Logic
sequenceDiagram autonumber participant UI as BookDetailScreen participant Repo as BookRepository participant DB as SwiftData (Local) participant Web as Remote API (Spring) UI->>Repo: getBookById(id) Repo->>DB: FetchDescriptor(id) alt Cache Hit & Fresh DB-->>Repo: BookEntity Repo-->>UI: Display Cached Data else Cache Miss / Expired Repo->>Web: getBookById(id) Web-->>Repo: BookDTO Repo->>DB: Insert & Save Entity Repo-->>UI: Display Fresh Data end

*The Repository coordinates between SwiftData and URLSession to ensure offline availability and performance.*


Tech Stack

  • UI Framework: SwiftUI, SF Symbols, Custom ViewModifiers, Core Animation
  • Logic & Concurrency: MVVM, Use Cases, Async/Await, Observation, Combine
  • Data Management: URLSession (REST API), SwiftData (Persistence), Codable

Core Features

Loan Management

Library Analytics

Advanced Search

Signature Design


Engineered with passion by Ryan Su © 2026