Last November, I got fed up.
Every note-taking app I tried either locked my data in their cloud,
charged a subscription, or both. So I did what developers do —
I built my own.
Five months later, PenPage (penpage.com) is live: a privacy-first
WYSIWYG note app that stores everything in your browser's IndexedDB
and optionally syncs to your own Google Drive.
## The hardest part: Google Drive sync
I thought sync would take a weekend. It took three weeks.
The core problem: Google Drive has no real-time conflict detection.
When you edit on two devices, you get two versions with no merge
strategy. I ended up building a sync engine around modifiedTime
comparison + a single sync.json as the source of truth.
Edge cases I didn't expect:
- Race conditions when auto-sync fires during manual sync
- Google Drive returning 404 for files that technically still exist
- Folder
parentIdreturning'root'vs the actual root folder ID (they mean different things)
## Lessons learned
- Local-first is harder than it sounds — not the storage, but the sync
- IndexedDB is powerful but needs a proper abstraction layer
- PWA Service Workers will surprise you in production every time
If you're building anything with Google Drive API or IndexedDB,
happy to share more details in the comments.
PenPage: https://penpage.com
Top comments (0)