offline first web app

Recently, I had to build an application for my parent’s warehouse. Its task was to scan products and label their addresses, to be used for optimal routing later. Goal-wise, a standard CRUD app. However, the main challenge came from the requirements: it had to work even with no internet.

The warehouse is located in a remote area in Kazakhstan, where internet connection is unreliable. Moreover, some areas of the warehouse are far from the router, making the internet not accessible everywhere. This meant that, the app, had to:

▫️ Work offline, even on reload, ▫️ Cache data from the server, ▫️ Cache requests made to the server.

I’ve had experience in solving all these separately. For example, using service workers in Progressive Web Apps (PWA) to cache the website, and Tanstack Query for data persistence. However, I’ve never combined them. Moreover, I didn’t really find a tutorial online which does this, so I decided to write my own.

It’s an open-source todo app. If you have android you can install it from the browser. It will work offline (for 7 days, by design – it’s configurable).

tutorial: https://nomomon.xyz/posts/offline-first-pwa-tutorial github: https://github.com/nomomon/offline-first-todo-app demo: https://todo.nomomon.xyz/

felt good to quickly vibe code an app which brings tons of value and then make another one for as a guide.

tbh, it’s a super niche use case, I don’t expect anyone to read this, but in case you need to, you know where to find it ahahah.