Technology Apr 23, 2026 · 2 min read

Building a "Local-First" Expense Tracker with zero server costs

As developers, we tend to follow a common practice: frontend + api + database. Yet, when I decided to develop the Sheet Manager application, I wanted to break this paradigm. I wanted to create an application which is 100% private, offline, and completely zero-cost. And Local-First architecture help...

DE
DEV Community
by SM Shahbaj
Building a "Local-First" Expense Tracker with zero server costs

As developers, we tend to follow a common practice: frontend + api + database. Yet, when I decided to develop the Sheet Manager application, I wanted to break this paradigm. I wanted to create an application which is 100% private, offline, and completely zero-cost.

And Local-First architecture helped me achieve that.

The Architecture

There is no reason why your sensitive financial data should be stored on some PostgreSQL or MongoDB instance somewhere on the cloud. Instead, all of it is stored in the user's browser.

Persistence: I implemented a wrapper for IndexedDB which allows us to handle very large sets of structured data (in comparison to LocalStorage). Plus, unlike LocalStorage, it does not block the main thread.

Performance: Being client-side only makes our UI super responsive since there are no API calls and the latency becomes simply the execution of JavaScript code.

Privacy: This is the main advantage of local-first applications. I literally have no way of accessing the data users enter since it's being stored on their own computers. For a finance application, that's an incredible feature.

The "Zero-Cost" Infrastructure

Can we make a production-ready application without any bills whatsoever?

Hosting: Using Cloudflare Pages and GitHub Pages as the frontend hosting services.
Database: Free (It's inside the user's browser).
Analytics: Keeping analytics light and simple to stay away from trackers.

Challenges of Local-First Development

This was not as easy as it sounds. Developing without backend adds its challenges:
Data portability: In case the user clears browser storage, how can we provide him/her with the option to import/export data? Implemented a JSON/CSV export/import system.
Sync across multiple devices: This is something I want to tackle soon by using WebRTC or Peer-to-Peer synchronization technologies._

Why did I develop this?

In addition to being a software engineer, I'm also very privacy-conscious (I don't even use Facebook and Twitter). We over-engineered the idea of "the cloud" into every tiny utility. Sheet Manager became a proof that we don't necessarily need servers to develop beautiful dashboard-based applications.

Take a look at the project yourself: Sheet Manager

What do you think about the idea of local-first development? How are you handling data persistence nowadays?

DE
Source

This article was originally published by DEV Community and written by SM Shahbaj.

Read original article on DEV Community
Back to Discover

Reading List