mlabs-haskell / TuxedoDapp

Cryptokitties on Polkadot using UTXO
Apache License 2.0
2 stars 2 forks source link

FE-JS: Local DB building #34

Closed NadigerAmit closed 5 months ago

NadigerAmit commented 7 months ago

Sync with blockchain db regularly. Store below :

Kitties filtered by a public key stored i.e owned by the user. Tradable kitties filtered by a public key stored i.e owned by the user. Tradable Kitties owned by any user. Any other filter ? https://github.com/mlabs-haskell/TuxedoDapp/issues/32

https://github.com/mlabs-haskell/TuxedoDapp/issues/33

JoshOrndorff commented 7 months ago

I'm not very experienced building web apps. One thing I've been wondering is where will the local db live for the web app? In the CLI app we spin up a db and store it on the hard disk in a path that the user provides. It isn't clear to me how that is handled in the browser.

I guess one option is to use the browser's local storage. And maybe also provide a file export option or something? Are their other common techniques or ideas?

Winni- commented 7 months ago

On client side we have IndexedDB for that purpose. I would use some helping libraries for ease of use, like https://github.com/localForage/localForage . For now it seems that DB will be managed inside WASM client(CLI Wallet)

NadigerAmit commented 6 months ago

Please see the detailed design of how it is done in CLI-Rust wallet. https://github.com/mlabs-haskell/TuxedoDapp/issues/33#issuecomment-1987704353

philoniare commented 5 months ago

I believe front-end implementation of this feature is outside of scope for now