
TaskGlyph
A local-first productivity platform that combines tasks, notes, journals and focus sessions while remaining fully functional both online and offline.
The Problem
Most productivity applications depend on a stable internet connection. When users lose connectivity, creating or updating tasks, notes, or journals becomes impossible, interrupting their workflow. I wanted to build an application that remains fully usable regardless of network availability.
Engineering Challenges
The biggest challenge was maintaining data consistency between local storage and the cloud. Every user action needed to work instantly while offline and synchronize automatically once the internet connection was restored without creating duplicate or conflicting records.
Step-by-Step Workflow
1. Local-First Data Layer
All user actions, including creating tasks, notes, diary entries, and updating existing content, are first written to IndexedDB using Dexie.js. This allows the application to continue working even when there is no internet connection.
2. Background Synchronization
When the application detects that the device is back online, pending changes are synchronized with PostgreSQL in the background. A last-write-wins strategy is used to resolve conflicts between local and remote data.
3. Integrated Platform Services
Authentication is handled through NextAuth.js with Google OAuth, media uploads are stored in AWS S3, Razorpay manages Pro subscriptions, and AI-generated weekly summaries are delivered through server-side APIs.
Why This Architecture?
A local-first architecture provides a better user experience because every interaction is completed immediately without depending on network availability. Dexie.js simplifies IndexedDB management, while Next.js keeps both the frontend and backend within a single codebase.
Key Features
- Offline-first task, note, and diary management.
- Automatic background synchronization with PostgreSQL.
- Markdown-based notes with image uploads stored in AWS S3.
- Built-in Pomodoro timer integrated with daily productivity.
- Google authentication using NextAuth.js.
- AI-powered weekly productivity summaries.
- Freemium subscription model with Razorpay integration.
Performance
The application continues to function normally during internet interruptions by serving user interactions directly from IndexedDB. Once connectivity is restored, synchronization runs automatically in the background without interrupting the user.
Trade-offs
Supporting both offline and online workflows adds additional complexity around synchronization, conflict resolution, and maintaining consistency across multiple devices. A local-first architecture also requires careful management of browser storage.
Lessons Learned
Building TaskGlyph gave me practical experience designing local-first applications, working with IndexedDB through Dexie.js, implementing background synchronization, handling conflict resolution, integrating cloud storage with AWS S3, authentication using NextAuth.js, and subscription payments through Razorpay.