This template should help get you started developing a Tauri tray app with an app window and full communication between the Javascript and Rust side.
Components:
- Rust: tauri, chrono, reqwest, anyhow
- Javascript: typescript, eslint, Vite, React, storybook, Zustand fully configured.
- Styles: tailwind, tw-classed and shadcn/ui
Use makeme for easy task management and then:
$ mm i
$ mm s
To start storybook:
$ mm sb
-
src/demo showcases on multiple use cases:
- Actions demo/actions.tsx:
- IPC Rust <> JS, both directions with actions
- IPC Rust <> JS, passively triggered with timers from both sides (to show that an app can be always-on and background processes still run)
- Trigger state change in native tray-icon and native tray-menu
- Signup form demo/signup.tsx
- A way to submit form data to Rust and get back a response, like working with a server
- Actions demo/actions.tsx:
-
UI:
components/ui
- components mirror from ui.shadcn.comcomponents/xui
- extended UI components building on top ofshadcn/ui
, with tooling to ease some verbosity and make it closer to classic js styling libs (tw-classed
), see Button
- State management:
zustand
src/zstore/ - Routing:
react-router-dom
src/main.tsx - Storybook: src/stories/ (task:
mm sb
) - Styling:
tailwind
tailwind.config.ts +index.css
src/index.css - Components:
components/ui
components/ui (andcomponents/xui
), use shadcn/ui for inspiration reviewing components use - Lints:
eslint
+stylomatic
.eslintrc.js
Copyright (c) 2023 @jondot. See LICENSE for further details.