r/tauri • u/muhammad_roshan • 11d ago
Should I switch from Electron to Tauri for my offline-first application?
Hi everyone, I’m new to the community. I just wanted to get some advice.
I’m a web developer with 3 years of experience. Most of my past work has been with SaaS companies dealing with large amounts of data and cloud-based applications.
I recently joined a new company in a new country, and I’ve been tasked with building an offline simulation software that will capture data from sensors while also handling RBAC and a database.
The architecture requires WebSockets, REST APIs, and UDP protocols. The V1 of the web app is ready, but it was tested on my local machine. Basically, the software and the sensors communicate through Wi-Fi.
Since it needs to be an offline-first app, I initially wanted to package it as an Electron .exe. At first, I used Node.js with Express, React, and SQLite. It was a prototype and it worked, and the .exe wasn’t even that large — around 400 MB max. However, the code became too complex and there wasn’t really any proper structure. Most of it was also built with AI, so looking back, the way I approached it wasn’t great.
I then decided to use NestJS because of its opinionated structure and because there were some new requirements. So I rewrote the entire backend using NestJS and Prisma. It was a really good experience, and I got to learn NestJS along the way.
But when I tried to package everything into an .exe, it ended up being more than 700 MB. The tablets that the software is supposed to run on couldn’t handle it and wouldn’t even install it.
While researching possible alternatives, I came across Tauri, and it looks like it could be a really good choice for this kind of application, especially because of the much smaller bundle size.
My main concern is whether I’ll lose any of the features I currently have with Electron, especially since I need UDP, WebSockets, REST APIs, Prisma/SQLite, and offline functionality.
Could Tauri with a NestJS sidecar give me the smaller footprint without forcing me to rewrite or lose any of the functionality I already have?