User NeDB as local & offline datastorage


I’m new in electron and would like to develop an app that will work offline with local datastorage and once there is an internet connection, the local data will be synch to the online data. I want to use NeDB (since it’s the best i could found).
How can i use electron and NeDB to for example create a simple task app: that is to view all task, and add new ones.
Another problem i’m facing is can i use NeDB for user management? The app will need an online subscription to work and then once the subscription credential are entered in the app, different users can now connect to the app with different permissions. Can i really achieve this with electron and NeDB. Some example code will be very appreciated.
sry if i ask a lots of questions, i’ve been looking for 2 weeks now with no result for an answer.


NeDB and Electron both have documentation about how to make use of them. If you need an introduction to Node-style JavaScript development, I suggest Art of Node. Anything you build with Node that works in a browser will work in Electron.

Another problem i’m facing is can i use NeDB for user management?

Can you? Probably. Should you, though? What information is going to be used for this subscription? If you’re storing any kind of data on a user’s computer, you have to consider that data insecure. If it’s not something that you’d be fine writing on a Post-It and sticking on your fridge, don’t store it in a JavaScript database on the user’s computer.


I spend a lot of time reading trought NeDB docu. To be honest, what i’m trying to achieve is simply to create form (fields) that car stora data in NeDB one the user click add and list then when the user click list.

The idea here is to have a server Online for the subscription. That mean user will have to purchase one online that will be used to login into the app. (something like a licence key or mapping username and password to subscription). The data stored localy are just those genegated by the user on the app. These will then be synch with their online profile to allow them to work on a web-interface to have it availaible everywhere.
By user management, i mean this: once the subscription is made (online), the client get a key or smth like that to connect with the app. At the same time, the client can define different users (5) that have different permissions. So the client is like the admin giving other users roles and permissions.


I don’t know how attractive your app/service will be to hackers, but you still need to carefully consider security when interacting with the server. At the very least you should be using HTTPS/TLS certificates to contact your server API. You should also be handling any certificate errors in Electron and alerting the user, in case your app has been tricked into contacting a different server. Certainly lots to think about when protecting your user’s data and accounts.


I’ll definitely go with HTTPS/TLS certificates. Was thinking about let’ sencrypt. Another question: does anyone know if i can user Access Control List - Module (ACL) with electron to manage user access?