Sync
Sync lets you open the app on your browser and your iPhone and see the same portfolio. It's built on the same encryption system as the rest of the app: the server is only a delivery mechanism for opaque encrypted blobs.
What travels to the server
When you push a change, the app gathers your portfolio records — each already encrypted on-device with its own initialization vector — bundles them into one payload, and uploads that. The server stores it opaquely, alongside a non-secret salt and a lastModified timestamp.
lastModified timestampHow pushes work
Whenever you change something — add an asset, tweak a target, reorder a column — the app schedules a push. Changes are batched briefly so that a dozen tweaks become one upload.
- Records are encrypted on-device with your in-memory AES key.
- Only the resulting ciphertext is uploaded — the key never touches the network.
How pulls work
When a newer version is available on the server, the client pulls the encrypted blob, decrypts it locally, and merges it into your portfolio. Updates made on one device show up on your others quickly.
Conflict handling
Sync is last-writer-wins at the blob level — the newest version on the server is the version every device converges to. Because updates are small (a few KB) and frequent, conflicts are rare in practice.
- Edits from one device appear on your others quickly
- Offline edits catch up as soon as you're back online
- The most recent write always wins
- If two devices edit offline at once, they converge on the most recent write when they reconnect — keep a JSON backup if you want a fixed snapshot
- A push that doesn't go through is picked up by your next change, which kicks off a fresh push
- Auth token expiry shows a “sync error” banner; a re-login brings it back
Going offline
Everything in Monk Portfolio is local-first. If you lose network, the app keeps working — you can add assets, change allocations, switch views. Your changes are saved locally and flow out on the next push.
Multiple devices, one portfolio
Your encrypted blob is keyed to your passkey credential. Multiple devices share one portfolio when the platform syncs that same passkey between them — for example Apple's iCloud Keychain or Google Password Manager. When you authenticate on a second device, the server returns your existing blob; the device derives the same key from your biometrics and the stored salt, decrypts the blob, and from then on pushes and pulls like the first device.
You can turn Sync & Encryption off at any time — see Your Data for what happens to your local and server copies.
Pricing data
Sync deliberately does not move live prices around. Each device fetches quotes independently from our pricing proxy using just the ticker symbols it needs. This keeps the encrypted blob small and means a stale market is never synced along with your edits.