Notes on building a Local-First PWA with IndexedDB and Server-Sent Events (SSE)
▲ 29 r/blazedotdev+3 crossposts

Notes on building a Local-First PWA with IndexedDB and Server-Sent Events (SSE)

When building a dealership inventory catalog for sales agents on showroom iPads, we realized standard network-on-every-filter setups were breaking the pace of sales conversations. Every loading spinner broke conversational flow.

We restructured the catalog around a local-first pattern: load the inventory once, keep it on the device, filter in memory, and use a light server signal to invalidate cache only when the inventory actually changes.

  1. Upfront Payload for In-Memory Filtering: Instead of paginated API queries on every filter change (brand, price, mileage), we fetch the full vehicle inventory once.

  2. Instant Rehydration via IndexedDB: To avoid startup latency on repeat visits, we persist the TanStack Query cache to IndexedDB.

  3. Cheap Real-Time Invalidation via RxJS + SSE: To prevent stale data (e.g., sold/repriced cars) without burning serverless budget on polling, we use a single Server-Sent Events (SSE) connection.

Read the full article: https://blaze64.dev/logs/local-first-pwa

blaze64.dev
u/Agreeable_Ad_3924 — 1 day ago
▲ 4 r/blazedotdev+1 crossposts

Why we built our VPS architecture around AppArmor isolation and Linux ACLs (RCE containment, and permission models)

Managing a fleet of web servers usually forces a trade-off between strict security enforcement and developer flexibility. In configuring our base Ansible setup calling it the Cloud Config, feel free to read the link where we focus on the structural reasoning behind our server hardening and user access policies. These findings took us more than 24 months of testing, iterations and improvemnts to solidify. These are battle tested running and we went as far as running outdated WordPress websites without the whole server blowing up with malware.

https://blaze64.dev/logs/ansible-cloud-config

blaze64.dev
u/Agreeable_Ad_3924 — 5 days ago
▲ 2 r/blazedotdev+1 crossposts

Welcome to Blaze64.dev

Hey guys, I’m Sandev Abeykoon.

I build cool things for the web and I am always open to exciting challenges. I just put together my main website at blaze64.dev.

blaze64.dev
u/Agreeable_Ad_3924 — 6 days ago