Virtualizing a Database with IndexedDB and DynamoDB

Nikos Katsikanis - 22 August 2025

Nikos Katsikanis

I wanted cloud data to feel local. By caching in IndexedDB and virtualizing the table, I kept the UI fast, search snappy, and costs low.

From API-Export spreadsheets to something that scales

So I switched to a flow where the app reads from DynamoDB, caches a snapshot in the browser with IndexedDB, and refreshes only when I ask it to. Pages load instantly and stay searchable without pounding the database.

IndexedDB: a local snapshot

On load, I check the cache first. If it’s there, I render immediately. If it’s stale, I can refresh. I also show when the data was last synced so I’m never guessing.

This alone saves a ton of reads. Most of my browsing is from the local cache; refreshes are intentional instead of automatic.

Virtualized tables that stay smooth

My datasets can be big—tens of thousands of rows. Rendering all of them freezes the browser. Virtualization only draws what’s visible, so scrolling stays smooth even when the data is huge.

I also added sorting on any column (status, expiration, category, etc.) so I can slice the data quickly without waiting.

Filter, search, export—without the drama

I can filter by status, category, or date range. I can run a quick full-text search. When I have the view I need, I export to CSV with one click. That completely replaces any old “download and clean up in Excel” routine.

Permissions and safety built in

Every request goes through permission checks before any data is shown.

Real cost savings

Before, every visit triggered DynamoDB reads. Now:

I also surface staleness (for example, “Synced 2 weeks ago”) so I refresh when it actually matters.

A pattern that travels

My rule of thumb: virtualize the data and the UI. Caching with IndexedDB and rendering only what’s visible brings cloud-scale patterns to the browser. You get a faster app, fewer reads, and zero spreadsheet juggling.

Wrap-up

I swapped Excel for DynamoDB + IndexedDB, kept the interface fast with virtualization, and cut costs by avoiding unnecessary reads and reduces manual management of sensitive spreadsheets. It’s a simple combination that feels invisible in the best way—and it scales.

Like this site? I built Vanilla Toolkit (aka Vanilla JS Patterns) -> Fork me on GitHub