Personal Planner Without Backend: Solving Sync
In this article
Building a personal planner without a backend is a common approach for privacy, simplicity, and cost, but it immediately raises the sync problem: how do you keep your data consistent across your phone, laptop, and tablet without running a server? The practical answer is to use a file-based sync layer (like a cloud storage folder) combined with a local-first app that treats the planner data as plain files, or to use a peer-to-peer sync protocol like CRDTs. This article explains the options, the trade-offs, and how to choose the right one for your needs.
Why Go Backendless in the First Place?
Backendless (or local-first) apps store data on the device, not on a server you control. The main reasons people choose this for a personal planner:
- Privacy: Your schedule, notes, and habits stay on your hardware. No third party can read them.
- Cost: No server bills, no database fees, no domain name. A free cloud storage account (e.g., 5–15 GB) is usually enough for a planner.
- Offline access: You can open and edit your planner on a plane or in a basement with no signal.
- Longevity: Plain files (Markdown, JSON, or SQLite) remain readable for decades, unlike a proprietary API that might shut down.
The catch is that without a central server, your devices are independent. When you edit the same file on two devices, you get a conflict. Solving that conflict is the sync problem.
How Sync Works Without a Backend
There are three main approaches to syncing a local-first planner:
- Cloud storage folder sync (Dropbox, Google Drive, OneDrive, Syncthing): The planner data lives in a folder that the OS syncs. The app writes files, the sync daemon copies them to other devices. This is the simplest and most common approach.
- Peer-to-peer sync (Syncthing, or custom WebRTC): Devices connect directly over LAN or the internet, exchanging files without a central server. Good for privacy, but requires at least one device online to relay when both are offline.
- CRDT-based sync (Automerge, Yjs): The app uses a conflict-free replicated data type to merge edits automatically. This is more complex but avoids most conflicts. It's used in many local-first note apps.
For a personal planner, cloud folder sync is the most practical because it's already built into your OS. The app just reads and writes files, and the sync tool handles transport.
Choosing the Right File Format
The file format determines how easy sync is. Options:
- Plain text / Markdown: Human-readable, diffable, and mergeable. A single file per day or per week works well. Sync conflicts are rare if you edit one file at a time.
- JSON: Structured, easy to parse. But binary or large JSON files can conflict badly if two devices write simultaneously.
- SQLite: A single-file database. Sync is tricky because SQLite is not designed for concurrent writes. You'd need to export/import or use a tool like Litestream (which requires a backend). For a personal planner, avoid SQLite unless you only sync one device at a time.
For a planner, Markdown files per day (e.g., 2025-05-14.md) are ideal. They're small, human-readable, and conflicts are easy to resolve manually.
Common Sync Problems and Fixes
Even with a good setup, you'll hit issues:
- File conflicts: When two devices edit the same file before syncing, the cloud service creates a conflicted copy (e.g.,
file (conflicted copy).md). Fix: Use a file format that's small and edit one file at a time. Or use a CRDT-based app that merges automatically. - Sync lag: Cloud services take seconds to propagate. If you edit on your phone and immediately open your laptop, you might see stale data. Fix: Wait a few seconds, or use a service with instant sync (like Syncthing on LAN).
- Partial writes: If the app writes a file while the sync daemon is reading it, you get corruption. Fix: Write to a temp file and rename atomically. Most sync apps handle atomic renames well.
- Offline edits on multiple devices: If you edit on your phone and laptop while both offline, you'll get a conflict when they reconnect. Fix: Use a CRDT library, or accept that you'll merge manually. For a planner, this is rare.
CRDTs vs. File Sync: Which Is Better?
CRDTs (Conflict-free Replicated Data Types) are a more advanced solution. They allow multiple devices to edit the same data structure without a central server, and the algorithm merges changes automatically. For example, Yjs and Automerge are libraries you can embed in your app.
Pros of CRDTs:
- No conflicts – edits merge seamlessly.
- Works offline and syncs when back online.
- Great for collaborative editing (even if you're the only user).
Cons:
- Steeper learning curve.
- Data is stored as a binary or custom format, not human-readable.
- You need to build the sync transport yourself (e.g., using WebRTC or a simple relay).
For a personal planner, file sync is usually sufficient. CRDTs are overkill unless you edit the same entry from multiple devices simultaneously, which most people don't do.
Step-by-Step: Building a Backendless Planner with Sync
Here's a concrete plan for a simple personal planner app that syncs without a backend:
- Choose a framework: Use a local-first framework like Tauri (Rust + web frontend) or Electron, or a mobile app with Flutter. The key is that the app can read/write local files.
- Store as Markdown files: Each day gets a file like
2025-05-14.md. Store them in a folder like~/Planner/. - Put that folder in a cloud sync service: Use Dropbox, Google Drive, OneDrive, or Syncthing. The app doesn't need to know about sync – it just reads/writes files.
- Handle file changes: Use a file watcher (e.g.,
chokidarin Node.js) to detect when a file changes externally (from another device) and reload the UI. - Write atomically: Write to a temp file (e.g.,
.tmp-2025-05-14.md) and then rename it to the final name. This prevents partial reads. - Resolve conflicts manually: If a conflicted copy appears, show it to the user and let them merge. For a planner, this is a rare event.
This approach gives you a working planner that syncs across devices with zero server cost.
Security and Privacy Considerations
Even without a backend, your data is still on cloud storage. That means the cloud provider could theoretically access it. To mitigate:
- Encrypt files before sync: Use a tool like Cryptomator or VeraCrypt to create an encrypted vault that syncs. The app reads/writes to the vault, so the cloud sees only encrypted blobs.
- Use end-to-end encrypted sync: Syncthing has built-in encryption (TLS) between devices, but the data is not encrypted at rest on the devices. For a personal planner, this is usually fine.
- Be careful with sensitive data: If your planner contains passwords or medical info, consider not syncing at all, or use a dedicated encrypted note app.
Frequently Asked Questions
Can I sync a SQLite database without a backend?
Yes, but it's risky. SQLite is not designed for concurrent writes. If you sync the file with Dropbox, you'll get corruption if two devices write at the same time. A better approach is to use a tool like sqlite3 to export to JSON or use a single-writer pattern (e.g., only one device writes at a time). For a personal planner, Markdown files are safer.
What's the easiest way to sync a local planner between phone and PC?
Use a cloud storage folder that both devices have access to. For example, put your planner folder in Google Drive on your PC and use the Drive app on your phone. The app on each device reads/writes files in that folder. This works for both Android and iOS, though iOS has more restrictions on file access.
How do I avoid sync conflicts when I edit on two devices?
The simplest way is to avoid editing the same file at the same time. If you use one file per day, you'll only conflict if you edit the same day's file on two devices before they sync. You can also use a CRDT library like Yjs, which merges changes automatically, but that requires more development effort.
Is it better to use a backend for a planner?
It depends. A backend (like Firebase or a custom server) gives you real-time sync, user accounts, and no file conflicts. But it adds cost, complexity, and privacy trade-offs. For a personal planner, a backendless approach is usually sufficient and more private.
Can I use a notes app that already does local-first sync?
Yes. Apps like Obsidian, Logseq, or Joplin offer local-first storage with sync via cloud folders or their own sync services. If you don't want to build your own app, use one of these. They handle conflicts and encryption for you.