I'm building a Banking App Prototype in SvelteKit with an integrated budget calculator. Since I don't have a backend or database yet, I want the data to stay saved even if the user refreshes the page or comes back the next day. I'm considering using LocalStorage to store the JSON string of the Budget, however since it is financial data I am a bit concerned about data safety. Are there any better front end options in terms of data safety?
u/Interesting_Fold_548
I have built a banking dashboard prototype with SvelteKit that includes a budget calculator and some charts. I would like to add a "Download Budget" button, where you can either download your entered budget data as a CSV file or a PDF file. (would be nice if the PDF preserved some of the styling.) I am not using a backend database yet so the download would be directly generated from a javaScript object. What is the simplest way to do that?
I've realized that while SvelteKit handles the HTML generation, HTMLCanvasElement and LocalStorage are strictly client-side. Currently, I have ssr = false to avoid 'Window is not defined' or 'Canvas is undefined' errors during the build.
If I want to re-enable SSR for the rest of my app, what is the cleanest pattern in Svelte 5 to ensure a component only attempts to initialize Chart.js after the DOM is ready?