Post

Trofi

Trofi

Trofi

Overview

A native iOS productivity app that gamifies goal achievement through a reward-based system. Features real-time CloudKit synchronization across devices and robust local persistence with SwiftData.

Architecture

Cloud Sync Strategy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
┌─────────────────┐     ┌─────────────────┐
│   iPhone        │     │   iPad          │
│  ┌───────────┐  │     │  ┌───────────┐  │
│  │ SwiftData │  │     │  │ SwiftData │  │
│  │  (Local)  │  │     │  │  (Local)  │  │
│  └─────┬─────┘  │     │  └─────┬─────┘  │
│        │        │     │        │        │
│        ▼        │     │        ▼        │
│  ┌───────────┐  │     │  ┌───────────┐  │
│  │ CloudKit  │◄─┼─────┼─►│ CloudKit  │  │
│  │  Sync     │  │     │  │  Sync     │  │
│  └───────────┘  │     │  └───────────┘  │
└─────────────────┘     └─────────────────┘
           │                     │
           └──────────┬──────────┘
                      ▼
              ┌───────────────┐
              │   iCloud      │
              │   Database    │
              └───────────────┘

Features

  • Goal Tracking: Set and track personal goals with progress visualization
  • Reward System: Earn points by completing tasks, redeem for wishlist items
  • CloudKit Sync: Seamless synchronization across all Apple devices
  • SwiftData Persistence: Offline-first with automatic conflict resolution
  • Share Extension: Add items from Safari, Amazon, and other apps
  • Smart Notifications: Contextual reminders based on goal deadlines

Technical Stack

Component Technology
UI Framework SwiftUI
Local Storage SwiftData
Cloud Sync CloudKit
Architecture MVVM
Notifications UserNotifications
This post is licensed under CC BY 4.0 by the author.