Initial scaffold — NASBackup iOS app

Full project scaffold: XcodeGen project.yml, Core models/protocols/errors,
SMBService (kishikawakatsumi/SMBClient), SFTPService (Citadel 0.9.2),
PhotoLibraryService, LANMonitor, BackupEngine, BackgroundTaskManager,
all feature UIs (Login, Connect, Browse, Backup, History, Settings),
Shared components and theme. Builds clean with zero errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Robin Kutesa
2026-05-15 17:05:04 +03:00
commit b96711c535
44 changed files with 3412 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
import Foundation
struct BackupResult {
let uploadedCount: Int
let skippedCount: Int
let failedCount: Int
let duration: TimeInterval
let totalBytes: Int64
let date: Date
var hasErrors: Bool { failedCount > 0 }
static func empty(date: Date = Date()) -> BackupResult {
BackupResult(uploadedCount: 0, skippedCount: 0, failedCount: 0,
duration: 0, totalBytes: 0, date: date)
}
}
struct BackupHistoryEntry: Codable, Identifiable {
let id: UUID
let date: Date
let uploadedCount: Int
let skippedCount: Int
let failedCount: Int
let durationSeconds: Double
let totalBytes: Int64
let nasHost: String
let triggeredByLAN: Bool
init(result: BackupResult, nasHost: String, triggeredByLAN: Bool) {
self.id = UUID()
self.date = result.date
self.uploadedCount = result.uploadedCount
self.skippedCount = result.skippedCount
self.failedCount = result.failedCount
self.durationSeconds = result.duration
self.totalBytes = result.totalBytes
self.nasHost = nasHost
self.triggeredByLAN = triggeredByLAN
}
}