wealthfolio icon indicating copy to clipboard operation
wealthfolio copied to clipboard

Refactor: Move all @tauri-apps calls to src/commands

Open maidh91 opened this issue 5 months ago • 9 comments

Context

  • This is one step in the plan to support this app running on web browser, and mobile
  • Goal
    • in Desktop mode, src/commands will calls to @tauri-apps
    • in Web browser mode, src/commands will calls to some backend
      • eventually, the dir structure can be like this
wealthfolio/
├── src/
├── src-tauri/
├── src-rust-api/    # some REST api backend
├── src-rust-lib/    # shared rust code using `src-tauri` and `src-rust-api` 

Summary

  • Move all @tauri-apps calls to src/commands

    • This src/commands directory contains all actions to communicate with Tauri via @tauti-apps library, e.g. invoke, listen, open
    • All other directories under src are native React code only
  • Add README.md to src/commands to note the convention

maidh91 avatar Sep 07 '24 03:09 maidh91