Building a 'Local-First' Expense Tracker with zero server costs
Source: Dev.to
Introduction
As developers, we often follow the classic frontend + API + database pattern. When I set out to build the Sheet Manager application, I wanted to break that paradigm and create something that is 100 % private, offline, and completely zero‑cost. A local‑first architecture made this possible.
Benefits of a Local‑First Architecture
Persistence
I implemented a wrapper for IndexedDB, which handles very large sets of structured data far better than localStorage. Unlike localStorage, IndexedDB does not block the main thread, keeping the UI smooth.
Performance
Because the app runs entirely client‑side, there are no API calls. The only latency is the execution of JavaScript, resulting in a super‑responsive UI.
Privacy
All data is stored in the user’s own browser. I have no way to access the financial information users enter, which is a huge advantage for a finance‑focused application.
Can We Build a Production‑Ready App with Zero Bills?
Hosting
- Cloudflare Pages or GitHub Pages for static frontend hosting.
Database
- Free, because the database lives inside the user’s browser (IndexedDB).
Analytics
- Keep analytics light and simple, avoiding third‑party trackers.
Challenges of a Backend‑Less Approach
Data Portability
If a user clears their browser storage, they need a way to retrieve their data. I added a JSON/CSV export‑import system to handle this.
Sync Across Multiple Devices
Synchronizing data between devices is a future goal. Possible solutions include WebRTC or other peer‑to‑peer synchronization technologies.
Closing Thoughts
In addition to being a software engineer, I’m also privacy‑conscious (I don’t use Facebook or Twitter). We often over‑engineer “the cloud” into every utility, but Sheet Manager proves that beautiful, dashboard‑based applications can be built without any servers.
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?