Instant Load: Local-First Architecture Brings Mind Your Now to Life
We've completely rebuilt how Mind Your Now handles your data. Tasks load instantly. Calendar events appear immediately. The app works offline. And it all stays perfectly in sync across your devices.
The Problem We Solvedโ
Every productivity app faces the same challenge: speed vs. accuracy. Load from the server every time? Accurate but slow. Cache everything locally? Fast but potentially stale.
Before this update:
- Opening the app meant waiting 1-2 seconds for tasks to load
- Switching to calendar view took another second or two
- Lose internet? The app became unusable
- Every page navigation hit the server
After this update:
- Tasks load in ~200ms (10x faster)
- Calendar view is instant (from cache)
- Full offline support - work without internet
- Smart sync keeps everything up to date
How It Works: Local-First Dataโ
We built a sophisticated IndexedDB caching layer that stores your data locally in your browser. Here's the architecture:
The Four Storesโ
- TaskStore - All your tasks, habits, and chores with full metadata
- EventStore - Calendar events from Google and Microsoft
- LinkStore - Reconstructed calendar links for offline event creation
- SyncStateStore - Per-entity sync tracking for smart updates
Smart Sync Strategyโ
We don't just dump data into a local database and call it a day. Mind Your Now uses intelligent sync tokens:
Google Calendar: Uses syncToken for incremental updates
- First sync: Get all events, store sync token
- Subsequent syncs: Only fetch what changed
- 90%+ reduction in API calls
Microsoft Calendar: Uses deltaLink for efficient updates
- Same pattern: Full sync once, deltas forever
- Handles Outlook calendars just as efficiently
Background Syncโ
Push notifications now trigger background syncs:
- Someone assigns you a task? Your app syncs silently
- Calendar event created remotely? You'll see it immediately
- Works even when the app is closed (on mobile)
What This Means For Youโ
The Morning Coffee Testโ
Before: Open Mind Your Now, wait for spinner, tasks load, switch to calendar, wait again, events load.
After: Open Mind Your Now, everything is already there. Cached from your last session. Background sync happens invisibly.
The Airplane Mode Testโ
Before: "Unable to connect to server. Please check your internet connection."
After: Full access to your tasks. Create new ones. Mark things complete. They'll sync when you're back online.
The Multiple Devices Testโ
Before: Changes on your phone took time to appear on your laptop. Sometimes required manual refresh.
After: Push-triggered sync ensures changes propagate within seconds. Open any device, see current state.
Performance Numbersโ
We measured before and after:
| Operation | Before | After | Improvement |
|---|---|---|---|
| Initial task load | ~2s | ~200ms | 10x |
| Calendar view load | ~1.5s | instant | immediate |
| Task list navigation | ~800ms | instant | immediate |
| Offline capability | none | full | new |
Bug Fixes in This Releaseโ
Building this architecture let us fix some tricky bugs:
Overnight Calendar Events (Fixed)โ
The Problem: Events spanning midnight (like "7pm to 12:45am") were showing as 1 hour instead of 5.75 hours.
The Fix: Our multi-day event processing was incorrectly truncating timed events. Now we only split all-day events across days, leaving overnight events intact.
Calendar Sync Race Condition (Fixed)โ
The Problem: Rapid account switching could cause sync state corruption.
The Fix: Proper locking and state management ensures each account's sync state is isolated and protected.
Delta Sync for Event Hooks (Added)โ
The Problem: Calendar hooks were re-fetching all events on every change.
The Fix: Event hooks now use the same delta sync pattern as the main sync, dramatically reducing API calls.
Technical Deep Diveโ
For the technically curious, here's what's under the hood:
IndexedDB Schemaโ
// TaskStore
{
id: string, // Primary key
title: string,
taskType: 'TASK' | 'HABIT' | 'CHORE',
syncedAt: timestamp, // Last sync time
...taskFields
}
// SyncStateStore
{
key: 'sync:tasks:{accountId}',
lastSyncTime: timestamp,
syncToken: string, // For incremental sync
version: number
}
Sync Flowโ
- App Opens -> Load from IndexedDB (instant)
- Check SyncStateStore -> When did we last sync?
- Delta Sync -> Fetch only changes since last sync
- Merge -> Apply changes to local store
- Update SyncState -> Store new sync token
Push Notification Integrationโ
Server Change -> Send Push -> Service Worker Receives
-> Trigger Background Sync -> Update IndexedDB
-> Next app open shows updated data
What's Nextโ
This local-first architecture unlocks powerful features:
- Conflict Resolution UI - When offline edits conflict, smart merge or manual resolution
- Offline Task Creation - Queue tasks for sync when back online (coming soon)
- Cross-Device Sync Indicator - See which devices have the latest data
- Selective Sync - Choose what to keep offline for limited storage devices
Try It Nowโ
The local-first architecture is live for all users:
- Notice the speed - Tasks and calendar load instantly
- Test offline mode - Turn off WiFi, the app still works
- Try multi-device - Make a change on one device, see it on another within seconds
The Bigger Pictureโ
This update represents a fundamental shift in how Mind Your Now works. We're moving from "cloud-first" to "local-first with cloud sync."
Why? Because your productivity tool should never make you wait. When you capture a thought, schedule a task, or check your calendar, the app should respond immediately. The cloud is for backup and sync, not for basic operations.
This is the future of productivity software, and Mind Your Now is leading the way.
The Mind Your Now Team
P.S. - If you were experiencing slow loads or offline issues before, this update should feel like a completely different app. Let us know how it's working for you!
