Skip to content

re: Does every backend need to be an API? VIEW POST


Something like this really doesn't need an external data storage. Personally, I'd be trying to make it as local as possible & take advantage of local storage options. IndexDB, SQLite,, the filesystem API, etc. This sounds like something that could probably be stored in a flat file format pretty easily.


I think the same, give a try with pure react and localstorage, or even sqlite as he says, that should give you enough for this kind of project.


Thanks for the feedback! To start, I want to build this as a fullstack single page app. Would this still apply? I updated the post to reference this


Depends on how sensitive you think your users would be to the data potentially seemingly randomly disappearing (Should be a rare occurrence, but more likely then not). If they are sensitive to it, then I would set up an extremely basic REST API to handle it. If they're not, IndexDB is a decent solution. IndexDB functions a lot like localStorage. They both can be cleared if the browser decides it needs that storage for something else. It can also be cleared by the user. The user wouldn't necessarily know that clearing it also clears your app's data.

I'm pretty sure there are libraries for IndexDB to interact with the major frameworks' state management libraries (Storing the stuff inside the state manager in IndexDB).

code of conduct - report abuse