Base desktop application code with Tauri, Native Web Components, and SurrealDB (follow the VMES app architecture)
Note: To enable persitent storage, edit the
src-tauri/Cargo.tomlto enable allsurrealdbfeatures.
For hot-reload UI and Tauri development, run the following in your VSCode from this root folder:
awesome-app devIMPORTANT - Requires node.js v8 and above.
This assumes
awesome-appwas installed locally (e.g.,cargo install awesome-app)
awesome-app dev will create an Awesome.toml which will be the list of commands it will run (format is self-explanatory).
You can run the commands manually if you want, or see below for list of commands.
We recommend using awesome-app dev but running each command manually might help troubleshoot.
IMPORTANT: Make sure to have node.js latest of 16 or above.
-
yarn tauri icon src-tauri/icons/app-icon.png- This will build the application icons. -
yarn pcss- This will build the postcss files (src-ui/pcss/**/*.pcss). -
yarn rollup- This will build and package the typescript files (src-ui/src/**/*.ts). -
yarn localhost- This will run a localhost server with thedist/folder as root (frontend hot reload) -
In another terminal,
yarn tauri dev- Will start the Tauri build and start the process.
- Make sure to have node.js 18 or above.
- If some cryptic errors, run the command above one by one.
- If
yarn tauri devcommands fail, try to do:cd src-tauricargo build- This might be an important first step when using full surrealdb (i.e., with default features and not only kv-mem)
On Fedora, and probably linux, the following needs to be present on the system.
dnf install gtk3-devel
dnf install webkit2gtk3-jsc-devel
dnf install libsoup-devel
dnf install webkit2gtk3-devel.x86_64