foss42 / apidash

API Dash is a beautiful open-source cross-platform API Client built using Flutter which can help you easily create & customize your API requests, visually inspect responses and generate API integration code. It is supported for macOS, Windows, Linux, Android & iOS. A lightweight alternative to postman/insomnia.
https://apidash.dev
Apache License 2.0
1.56k stars 291 forks source link

[feat] in-app update check #373

Open opxdelwin opened 6 months ago

opxdelwin commented 6 months ago

Tell us about the task you want to perform and are unable to do so because the feature is not available Implement feature to automate checking for app updates on launch as mentioned below.

Describe the solution/feature you'd like us to add On launch, we can check if a new version of API Dash is available by matching it with GitHub repository. This can be done by

image

Then an user prompt can be made to notify user that a new version is available for download. User may have an option to download now, or skip this update.

Any other feedback you would like to provide regarding the site This feature isn't a priority but a good to have, and may be merged after GSoC contribution period to avoid any conflicts.

sathsarabandaraj commented 6 months ago

Hi, I'm Sathsara. New here... More than happy to contribute.

We can use a pkg like "updat" and it'll definitely simplify the update mechanism, but if we require a more customised approach, we can implement a solution to check for updates and handle the installation process accordingly.

For Windows environments, we can execute system-specific commands to update the application. For instance:

apidash-windows-x86_64.exe /SILENT or /VERYSILENT

Using /SILENT will display progress during the update, while /VERYSILENT will perform the update silently without any visible progress indicators. Additionally, this command will prompt the application to close any running instances before updating and show the windows UAC window asking permission.

Windows UAC image

Closing Application image

/SILENT Update progress indicator image

In Debian-based Linux distributions, we can use the following command to install the update:

sudo dpkg -i apidash-linux-amd64.deb

However, it's important to note that in Linux, obtaining the user's password may be necessary for installation. On the upside, updating the application in Linux shouldn't require closing any running instances, the update can be performed in the background, and the new version will be applied upon the next launch of the application.

For run system commands we can use "process_run" pkg

I might need some input on macOS since I don't have a device that's compatible.

opxdelwin commented 6 months ago

Your plan seems solid. We'll need to dig into the specifics for the macOS platform. It might be wise to hold off on this until after GSoC '24 wraps up to avoid potential conflicts with other contributors' code. Once we're past that, tackling the implementation for mobile and tablet platforms should be smoother sailing. There are handy packages available that can handle auto-updates from the respective app stores, making the process much more manageable.

@animator would love your take on this.

Tanish2002 commented 6 months ago

@sathsarabandaraj probably not a good idea to install the debian package, also since packages are installed using sudo perms, We'll need to implement a password input handler as well.

Better approach for linux would be to simply give a popup like discord does: image

One the user clicks on the download button a browser window opens that simply downloads the .deb file, users can simply install it themselves.

opxdelwin commented 6 months ago

Rather than taking in the password within API Dash, we can have a popup to let user know that they'll have to manually run the command, and show the command itself?

Tanish2002 commented 6 months ago

Usually, that isn't necessary since that is how they would've installed apidash in the first place.

Also in the future when we can finalize the packaging process we can simply create packages for the distro repositories, so we don't have to worry about linux updates. The user can get the updates from their package manager. (We'll can still show the user a popup if the system hasn't been updated and user is using a stale package).

However, if we feel like it, we can add it. Though, The commands will increase with the number of distros we support.

EswarPesala commented 4 months ago

please add the labels here like Gssoc, level1

ashitaprasad commented 4 months ago

@EswarPesala we will add it after assessing the effort made made in PR.

mdex-geek commented 4 months ago

@opxdelwin thanks for creating the issue i want to work on this type of feature I have same in my mind thanks for creating this I try my best to make this this is first time on open source

EswarPesala commented 4 months ago

Thank you u can contact me on WhatsApp 9391611530

On Tue, May 14, 2024, 12:24 deepanshu garg @.***> wrote:

@opxdelwin https://github.com/opxdelwin thanks for creating the issue i want to work on this type of feature I have same in my mind thanks for creating this I try my best to make this this is first time on open source

— Reply to this email directly, view it on GitHub https://github.com/foss42/apidash/issues/373#issuecomment-2109418623, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHHMKGKJE5SUAWFOOXYGCFLZCGYKXAVCNFSM6AAAAABFQNU4GKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBZGQYTQNRSGM . You are receiving this because you were mentioned.Message ID: @.***>