ivy-wallet icon indicating copy to clipboard operation
ivy-wallet copied to clipboard

[FEATURE] Google Drive auto-backups

Open ILIYANGERMANOV opened this issue 2 years ago • 19 comments

Please confirm the following:

  • [X] I've checked the current issues for duplicate issues.
  • [X] I've requested a single (only one) feature/change in this issue. It complies with the One Request Per GitHub Issue (ORPGI) rule.
  • [X] My issue is well-defined and describes how it should be implemented from UI/UX perspective.

What do you want to be added or improved?

As a user I want to be able to automatically backup my Ivy Wallet data in my personal Google Drive.

Why do you need it?

  • Ivy Wallet needs a free cloud backup feature
  • Ivy Wallet needs automatic bacupsbackups

How do you imagine it?

  • The user logs in their Google account
  • The user gives Google Drive permissions
  • Ivy Wallet starts automatically attempting to backup a JSON zip every 12/24 hours

ILIYANGERMANOV avatar Sep 27 '23 11:09 ILIYANGERMANOV

I can take this one

mohammednawas8 avatar Oct 01 '23 10:10 mohammednawas8

I suggest to add a new option called "Google drive backup" which comes below "Backup data" option in the settings screen. and when the user clicks on that option a google login dialog will pop up and after granting the permissions from the user we can setup the backup strategy using work manager.

mohammednawas8 avatar Oct 01 '23 10:10 mohammednawas8

Awesome @mohammednawas8. A few notes:

  • create a separate :feature-google-drive
  • There's an implementation https://github.com/Ivy-Apps/ivy-wallet/tree/deprecated-ivywallet-rewrite-2223/drive/google-drive

Success Criteria

  • It should make up to N backup files
  • When N is reached the oldest backup is deleted.
  • If you have any questions or concerns, ask us in Telegram

ILIYANGERMANOV avatar Oct 01 '23 11:10 ILIYANGERMANOV

Okay

mohammednawas8 avatar Oct 01 '23 11:10 mohammednawas8

Just a quick update, i have implemented 70% of this feature.

mohammednawas8 avatar Oct 05 '23 14:10 mohammednawas8

One thing tho, i get this message when asking for the Google Drive permissions Screenshot 2023-10-05 at 6 28 36 PM

i can click on advanced to give the requested permissions

mohammednawas8 avatar Oct 05 '23 15:10 mohammednawas8

One thing tho, i get this message when asking for the Google Drive permissions Screenshot 2023-10-05 at 6 28 36 PM

i can click on advanced to give the requested permissions

Great progress! 💯 Yes, that works. We can fix that warning later. We just need to verify:

  1. It's legal to use Google Drive for the Ivy Wallet backups use-case
  2. It's free for me and Ivy Apps

Let's implement a POC PR and then we can clear the details

ILIYANGERMANOV avatar Oct 05 '23 16:10 ILIYANGERMANOV

First impression of the feature https://github.com/Ivy-Apps/ivy-wallet/assets/78867217/ef889671-f75d-4669-91aa-15194fc1dd1e

mohammednawas8 avatar Oct 06 '23 13:10 mohammednawas8

First impression of the feature https://github.com/Ivy-Apps/ivy-wallet/assets/78867217/ef889671-f75d-4669-91aa-15194fc1dd1e

Nice progress @mohammednawas8!! Great job

ILIYANGERMANOV avatar Oct 06 '23 16:10 ILIYANGERMANOV

by the way, when will this be moved to prod?

aqeel1211 avatar Oct 08 '23 15:10 aqeel1211

Hey, I have had special circumstances recently, so I stopped working on it for a bit, but I will make the PR soon

mohammednawas8 avatar Oct 10 '23 18:10 mohammednawas8

Hey, I have had special circumstances recently, so I stopped working on it for a bit, but I will make the PR soon

Hey @mohammednawas8 no rush, take your time. It's a free open-source project, you have zero obligations or deadlines 😅

ILIYANGERMANOV avatar Oct 10 '23 18:10 ILIYANGERMANOV

Stay safe out there @mohammednawas8

dmytro-lytvyn avatar Oct 10 '23 19:10 dmytro-lytvyn

Any updates?

sh2aliyev avatar Apr 17 '24 15:04 sh2aliyev

Woohoo! I'm guessing by the approved status, dev work for this is done? Any timeline of when we'll get the Play Store update? Thank you so much @mohammednawas8 Been waiting for this for so long!

emcee6798 avatar Apr 18 '24 07:04 emcee6798

Woohoo! I'm guessing by the approved status, dev work for this is done? Any timeline of when we'll get the Play Store update? Thank you so much @mohammednawas8 Been waiting for this for so long!

Hey @emcee6798 "approved" means that the GitHub issue is ready to be worked on, not that it's done

ILIYANGERMANOV avatar Apr 18 '24 08:04 ILIYANGERMANOV

Hi, i have not been working on this lately, but as soon as i get time for it, i will keep working on it, and i will let @ILIYANGERMANOV know.

mohammednawas8 avatar Apr 18 '24 10:04 mohammednawas8

Awesome @mohammednawas8! Make sure to follow our Developer Guidelines: https://github.com/Ivy-Apps/ivy-wallet/blob/main/docs/Guidelines.md

Read all the docs about data modeling, error handling and etc

ILIYANGERMANOV avatar Apr 18 '24 10:04 ILIYANGERMANOV

Hey @mohammednawas8 for the Google Drive backups feature put it in :feature:google-drive module and re-use BackupDataUseCase. Make sure to handle all errors using Either and add tests. The feature should not read/write to the user's Google Drive data in any way. I'm concerned a bit about this feature because if for some reason a bug deletes user data from the Drive it would be really bad! We must make sure to only read/write to some special "__Ivy-Wallet-data-backups" folder and nowhere else.

ILIYANGERMANOV avatar Apr 18 '24 20:04 ILIYANGERMANOV