Why local-first matters
Every note-taking app eventually asks the same question: where does the data live? The answer shapes everything — from latency to privacy to what happens when the company shuts down.
Glifo's answer is simple: your files live on your machine. No server, no sync layer, no account. Open the vault folder in Finder and you'll see plain .md files organized exactly how you left them.
The problem with cloud-first
Cloud-native note apps optimize for collaboration and cross-device access. Those are real features. But the trade-offs are significant:
- Latency on every keystroke (even if small, it adds up)
- Data lives in someone else's database, in a proprietary format
- Offline support is an afterthought — "conflict resolution" is a phrase you'll learn
- The service can change pricing, features, or shut down entirely
The fastest sync engine is no sync engine. The most reliable server is the filesystem.
What local-first gives you
Speed is the obvious win. Reading a file from disk takes microseconds. There's no loading spinner, no "syncing…" indicator, no optimistic UI that might roll back.
But the deeper advantage is ownership. Your notes are files. You can:
- Open them in any editor
- Search them with
grep - Version them with
git - Back them up however you want
- Write scripts that process them
This isn't theoretical portability — it's actual, right-now, zero-effort portability.
Git as the sync layer
When you enable git in Glifo, every save creates a commit. This gives you:
| Feature | How it works |
|---|---|
| Version history | Browse the full timeline of any note |
| Diff view | See exactly what changed, line by line |
| Restore | One-click rollback to any previous version |
| Sync | Push to a private GitHub repo — or publish your notes |
You get version control, backup, and optional sync — all from a tool that already exists and that you probably already know.
Implementation detail
Glifo uses libgit2 through the git2 crate in Rust (see the stack). Commits are created programmatically on save — no shell commands, no git CLI dependency. The entire history panel reads from the repo directly.
// Every save triggers an auto-commit
pub fn git_auto_commit(vault_path: String, file: String) -> Result<(), String> {
let repo = open_or_init(&vault_path)?;
let mut index = repo.index().map_err(|e| e.to_string())?;
index.add_path(Path::new(&file)).map_err(|e| e.to_string())?;
index.write().map_err(|e| e.to_string())?;
// ... create tree, commit
Ok(())
}
The trade-off
Local-first means no real-time collaboration. You can't have two people editing the same note simultaneously — at least not without layering on a CRDT or OT system, which adds exactly the complexity we're trying to avoid.
For a personal note-taking app, that's fine. Glifo is for your notes, on your machine. If you need multiplayer, there are great tools for that. This isn't one of them — by design.
Local-first isn't a limitation. It's a choice to optimize for speed, ownership, and longevity over convenience features that most people don't need most of the time.
- Ship version history panel
- Add diff gutter markers
- Add optional remote sync via git push
- Document the git integration