fastenhealth / fasten-onprem

Fasten is an open-source, self-hosted, personal/family electronic medical record aggregator, designed to integrate with 100,000's of insurances/hospitals/clinics
GNU General Public License v3.0
1.61k stars 84 forks source link

UI Generation for standalone apps #172

Closed AnalogJ closed 11 months ago

AnalogJ commented 1 year ago

Fasten is currently packaged as a Docker image. While this is definitely functional, it limits our potential users to those with that are technically savvy and have their own homeserver. As I've discussed in the past, I'd like to eventually create a cloud/SAAS version of Fasten, but a complementary middle-ground would be to package Fasten as a desktop app (Windows/Mac/Linux) allowing non-technical users to experience Fasten -- and provide feedback. Fasten is written in Go which has a number of features that I intend to leverage towards building a Desktop version - standalone/static binaries, cross architecture compilation & support for HTML as Native UI (via Sciter).


zshel commented 1 year ago

I'll start looking into this after I get acquainted with the rest of the code base. @AnalogJ

AnalogJ commented 1 year ago

Honestly, I'd kinda of skip it, and just see if you can get a hello world Gin framework app (html/css + any frontend js framework) converted and working with Sciter

This is more about looking for a PoC than a real implementation to start

zshel commented 1 year ago

Hmm okay, I'll investigate. Judging by the choices you selected you want to stick with go as a lang? Or have you thought about using dart/flutter? And I assume you don't want to just do an electron app too, and you want something a bit more native

AnalogJ commented 1 year ago

Ya I want to keep it as html css without electron. I want to be able to natively compile for multiple OS (windows, Mac) stores.

AnalogJ commented 1 year ago

Wails looks like it has a pretty big following as well (though it seems to have runtime dependencies, which is not optimal)

hkamran80 commented 1 year ago

Have you looked into Tauri? It doesn't support publishing to app stores, but it is a good alternative to Electron. It uses a Rust core and utilizes the OS' native rendering engine (WebKit on macOS, WebView2 on Windows and WebKitGTK on Linux). The app bundles are also much smaller around 3 MB compared to Electron's 80-120 MB.

AnalogJ commented 1 year ago

@hkamran80 I'll add it to the list, but the intention is definitely to be able to publish the Fasten desktop app to the app stores. Some additional context (which I'll add to the issue):

Fasten is currently packaged as a Docker image. While this is definitely functional, it limits our potential users to those with that are technically savvy and have their own homeserver. As I've discussed in the past, I'd like to eventually create a cloud/SAAS version of Fasten, but a complementary middle-ground would be to package Fasten as a desktop app (Windows/Mac/Linux) allowing non-technical users to experience Fasten -- and provide feedback. Fasten is written in Go which has a number of features that I intend to leverage towards building a Desktop version - standalone/static binaries, cross architecture compilation & support for HTML as Native UI (via Sciter).

  • it opens the door to a traditionally older, less computer savvy user base, who have a wider variety of medical conditions. Fasten has a problem goal of being all things to all people, which means we should support a wide variety of chronic conditions and ways to display qualitative/subjective data. I'm hoping they can help us flesh-out our widget based dashboard system, which will make it better for everyone.
  • all software has constraints. Fasten was always designed to be self-hosted, and capable on running on any architecture/operating system. This is one of the reasons why I started writing it in Go, as the cross complication and multi-arch support is fantastic. Adding the scaffolding for Desktop support now, rather than later when the app is "done", means it's still easy to make changes and rearchitect the app to make sure it works in both a web server and desktop app mode. The longer we wait, the more difficult it will be to refactor the code. To be clear, I don't plan on fully building out a desktop app, just putting in the scaffolding and CI pipelines to ensure that we can compile the app in "desktop mode". I'm hoping that libraries like Sciter will make this incredibly easy, as the HTML + CSS UI used in the webapp can be re-used in the desktop app (similar to electron-based desktop apps)
AnalogJ commented 1 year ago

@zshel I think Wails might be more viable, it has support Mac & Windows app stores, and has support for an "AssetServer" which can also respond to Get/Post requests - https://wails.io/docs/guides/dynamic-assets

it doesnt compile to a completely static binary, but with AppStore support/documentation, I'm not really worried.

What do you think?

schklom commented 10 months ago

It looks like there Linux support was planned, then you focused on Windows + Mac stores. Are there any plans to support Linux with e.g. Flatpak or AppImage? :)

EDIT: my bad, ignore this, you already say yes on https://docs.fastenhealth.com/funding.html