CASE / 02SwiftUI · LLM Integration · Multi-platform Product

WordScene / 译笺

Translation that becomes a reusable language library.

Swift 6SwiftUIDeepSeek APICore DataCloudKit
WordScene saved phrase library on macOS

01 / Overview

RoleIndependent iOS / macOS Engineer
FocusProduct architecture / LLM integration / Sync
StackSwift 6, SwiftUI, DeepSeek API, Core Data, CloudKit
ContextGPL-3.0-only open-source language product

03 / The problem

Most translation output is disposable: it solves the immediate sentence, then disappears from the learner’s workflow. WordScene connects translation, retrieval, and reuse in one native workspace instead of treating them as separate tools.

Constraints

01Secure user-supplied API credentials02Structured streaming output03Shared iOS and macOS codebase04Optional cloud sync0518 target languages

04 / System approach

A native product surface with explicit boundaries for model access, persistence, and sharing.

01SwiftUI WorkspaceADAPTIVE UI
02DeepSeek ProviderSSE + JSON
03Core Data / CloudKitPERSIST
04Share ExtensionSYSTEM ENTRY
01

Provider code, Keychain credentials, local persistence, optional CloudKit sync, and share handoff remain behind separate service boundaries so each failure stays diagnosable.

05 / Technical challenges

01

Predictable model output

Stream SSE responses while incrementally extracting a strict JSON translation payload and surfacing actionable provider errors.

02

Credential boundaries

Store the user’s token in Keychain and keep extension access scoped instead of embedding secrets in the app.

03

Durable language memory

Unify saved phrases and recent history with Core Data, migration paths, search, import/export, and optional CloudKit sync.

04

System-level entry points

Translate shared text through an iOS Share Extension and route clipboard prompts through the main app without duplicating workflow logic.

06 / Outcome

Outcomes bounded by available evidence.

Capabilities are verified against the public version 1.0.4 main branch, released under GPL-3.0-only. No adoption or accuracy metrics are invented.

0118 translation target languagesREPOSITORY VERIFIED
02Native iOS and macOS targetsREPOSITORY VERIFIED
03Share Extension and clipboard entry flowREPOSITORY VERIFIED
04192 iOS unit tests passingREPOSITORY VERIFIED
Next case study

Real-Time Multi-Camera Surface Inspection