DEV Community

Kudzayi King
Kudzayi King

Posted on

Building an Offline-First Spreadsheet Alternative with Next.js 16, React 19, and Dexie.js

Traditional cloud spreadsheets are incredibly powerful, but they suffer from three specific flaws for casual users: massive formula friction, fragile layout formatting, and sluggish lag when relying on active web sockets for heavy data matrices.
As a full-stack engineer, I wanted to build an alternative that felt instantaneous, functioned perfectly without an internet connection, and provided structured, ready-made tracking frameworks out of the box.

That product is GridHub (gridhub.online). Here is a breakdown of how the architecture brings 16 distinct workspaces to life using a modern offline-first PWA approach.

The Stack Breakdown

  1. Client-Side Storage with Dexie.js & IndexedDB: Instead of pinging a remote database on every keypress or analytical chart update, GridHub commits all user transactions immediately to the client's browser database using Dexie.js. This brings data query speeds down to sub-millisecond ranges and enables full offline availability out of the box.
  2. React 19 Server Components & Actions: We leverage the Next.js 16 App Router to manage our API states. When a network connection is detected, the frontend background routine fires a secure synchronization loop to batch-update our hosted data cluster.
  3. Supabase Auth & Database Layer: For user profiles and remote backups, we use Supabase Auth coupled with Google OAuth. The SSR integration safely handles cookies, ensuring that permissions and custom tier statuses sync perfectly down to our IndexedDB configuration tables upon login.

Opening the Engine for Stress Testing

The baseline platform is live and fully stable. However, as an engineering project, the local sync loop needs real-world stress testing across different browser engines, operating systems, and data loads.
To gather technical feedback from the developer community, I am opening up our closed beta phase completely for free. If you want to audit the UI or test the IndexedDB replication speeds, you can register a profile right now.
Everyone who joins during this closed testing cycle will be grandfathered into an Unlimited Tier for Life with zero future billing paywalls.

Test the application here: gridhub.online

I’d love to know your thoughts on our offline synchronization architecture or any feature additions you think we should prioritize in the next sprint!

Top comments (1)

Collapse
 
dfahlander profile image
David Fahlander •

It's a nice and extensive app you have created. And a nice example on how to user Dexie and local first. Two things that could be possible improvements or alternate architecture:

  1. The react routing seems to be a bit delayed when clicking on different links in the app. Even thought the app works off-line, it is showing a splash screen some second before switching route. Check with your agents if this could be improved - there are some trickiness in combining nextjs with service worker and offline access that might need to be optimized.

  2. The sync part: If you ever consider switching from Supabase to Dexie Cloud, you would get social authentication and sync without having to handle the complex sync logic. You would also get access control so that users could choose to share selected workspaces with each other. The switch to Dexie Cloud would not require any changes to your schema or code as you are already using globally unique IDs and can keep using it the exact way you already do. The only change is a few lines of code and to create a db (run dexie-cloud create in a console). Docs on dexie.org/docs/Tutorial/Dexie-Cloud.

Hope all best with this app!
David