NOTE: Using Git Bash or WSL is currently required to run the dev
script on Windows.
Zebar uses the Tauri desktop framework and requires Node.js + Rust.
Rust nightly and Node.js version 20 are currently used.
rustup
is the recommended way to set up the Rust toolchain.
Install Node.js via the official download or a version manager like NVM (unix, windows), or pnpm via its standalone script and then switching version via pnpm env use -g 20
.
To start the project in development mode:
# Install pnpm (package manager) if not already installed.
npm i -g pnpm
# Install dependencies.
pnpm i
# Start in development mode.
pnpm dev
Zebar is split into 3 packages:
desktop
- a Tauri app which is a CLI that can spawn windows.client
- a SolidJS frontend which is spawned by Tauri onzebar open <window_name>
.client-api
- business logic for communicating with Tauri.
-
Create a new config schema for your provider.
- Add a schema for the config under
packages/client-api/src/user-config/window/providers
. - Add the schema to the
ProviderIndex
. - Add the new provider type to the
ProviderType
enum. - Add the schema to the
ProviderConfigSchema
array.
- Add a schema for the config under
-
Add the client-side logic for the provider. Most providers aren't client-side heavy, and simply subscribe to some variables sent from the Tauri backend (eg.
create-ip-provider.ts
).- Add a new provider under
packages/client-api/src/providers
. - Add the provider to the switch statement in
createProvider(...)
. - Add the provider to the
ProviderIndex
.
- Add a new provider under
-
Add the backend logic for the provider.
- Add the logic for the provider under
packages/desktop/src/providers
. - Add the provider's config to the
ProviderConfig
enum. - Add the provider's variables to the
ProviderVariables
enum. - Add the provider to the switch statement in
createProvider(...)
. - Add the provider's module to the
ProviderModules
- Add the logic for the provider under