What’s the Best Tech for a Local Offline App Using JSON Data?

0
8
Asked By CuriousCoder99 On

I'm looking to build a simple offline app that lets users browse a local copy of a web forum or CMS based on JSON data I already have. This data includes users, posts, topics, and comments, along with media stored in local files. The app will dynamically generate HTML pages instead of serving static ones to avoid duplication, like when displaying topics by user or tag.

I have some specific tech questions: First, while JSON could work, I'm concerned about lookup speeds. Should I consider using SQLite with sql.js or any other local database? How does SQLite performance compare to reading local JSON files, especially since I won't need to modify the data and am dealing with under 5GB of content?

For the frontend, I'm considering a React single-page application (SPA) since there's no web server or server-side rendering. Any alternative recommendations are welcome, but I want to stick to technologies that don't require a web server, and I'm not very familiar with Django or Flask which seem to need one.

2 Answers

Answered By DevExplorer On

If you're looking to access data offline, check out the Origin Private File System. It might give you a smooth experience with local files and data handling, and you can learn more about it at web.dev.

Answered By TechWhiz123 On

Using a simple web server might not be a bad idea, even if you think it’s an offline app. You could create a React app where all your JSON files are included, and then serve it using a tool like `serve`. This way, you won't have to overcomplicate things with databases unless performance becomes an issue. If it's a small app, a straightforward setup should do just fine!

UserGuru88 -

Yeah, setting up a React app to read JSON and serve it up is a quick way to prototype. You could probably have something functional in an hour!

TechWhiz123 -

For sharing, remember that you can build and package the app for USB use—just keep it simple!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.