Build a desktop application

Spring boot has FileSystemResource https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/core/io/FileSystemResource.html

Yes but this would require to run the app locally not on a server

Yes. And the storage can then be abstracted, adding an adapter for storing files, where the cloud version would use apis instead of filesystem calls.

Storage is storage, can be a filesystem, a database, or another cloud storage accessed via api calls.

As Olli said Vaadin is not the right fit for your requirements

Thanks Simon. Appreciate the info.

Its a shame really, as by quickly looking at Vaadin, I like how it looks and that it is pure java.

Why don’t you use JavaFX?

Yes but it’s for building web applications not desktop applications

It seemed Vaadin was more mature and aimed at web apps, which is what is the intended end state for the application. But will take refactoring to get there. So wanted to use a Framework that I would not need to replace later.

Also, the demos of how Vaadin looks helped persuade me, as the UI looks better overall by default.

As you said aimed at web apps.

Yes. But realistically, a web app should be runnable locally as well. A computer is a computer. And the services it needs, like a database/file system can be abstracted. The same app could be built as desktop or server, where the core business logic is the same and only different adapters are used.

As as said this is possible

Yes, with Electron. Not a typical use case, but should be possible. Was looking for the easiest way to re-use the code that already exists, and this might be it. Thanks again Simon and Olli.

No I mean you can build a Spring Boot App with Vaadin and run it with java -jar or even as a native executable. Then you you have to open the browser locally and got to localhost:port

But I wouldn’t do that

Why? Its not optimal, but if boot is restricted to being accessed from localhost only it should be secure.

Because the user experience to install the app will not be optimal

it can be installed as PWA but what if the user doesn’t do that