Identity Wallet for people to manage Decentralized Identities and Verifiable Credentials.
This app is built with Tauri 2.0. It uses Rust in the backend and SvelteKit, Tailwind CSS, and Melt UI in the frontend.
Checkout the Prerequisites for running Tauri apps on your system to get started.
This repository uses pnpm workspaces:
| Path | Description |
|---|---|
./ |
Project root with Prettier configuration. |
./unime |
pnpm workspace with UniMe frontend. |
./unime/src-tauri |
Tauri Rust app (not a pnpm workspace). |
./identity-wallet |
Rust package with UniMe backend (not a pnpm workspace). |
Get up and running with these steps:
Copy the file .env.example to .env and set the values accordingly.
pnpm icd unime/src-tauri
cargo tauri iconYou can run the following commands from the project root:
# Desktop
pnpm tauri dev
# Android
pnpm tauri android init
pnpm tauri android dev
# iOS
pnpm tauri ios init
pnpm tauri ios devNote
For Android builds, make sure the ANDROID_NDK_ROOT and ANDROID_NDK environment variables are set to the correct NDK path, e.g.:
export ANDROID_NDK_ROOT=$NDK_HOME
export ANDROID_NDK=$NDK_HOME
export CC="$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang"
export BINDGEN_EXTRA_CLANG_ARGS="--sysroot=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/sysroot"If you're on macOS, you do not need to set CC explicitly. Make sure to use darwin-x86_64 (also for Apple Silicon).
Also make sure to have bindgen installed (via cargo).
Note
Before committing, please make sure the code is formatted, linted, and passes all tests.
Run the following commands from the project root:
pnpm format
pnpm lint
pnpm testRun these commands from ./unime/src-tauri:
cargo fmt
cargo clippy
cargo testRun these commands from ./identity-wallet:
cargo fmt
cargo clippy
cargo testIn order to regenerate the TypeScript bindings in identity-wallet/bindings after making changes to actions or reducers, you can simply execute all Rust tests by running cargo test from within the /identity-wallet folder.
- Edit the base language file (English) at
unime/src/i18n/en/index.ts. - Inside the
unimefolder, runpnpm typesafe-i18nto update the types. - Adjust all other language files in
unime/src/i18n/accordingly until all types are satisfied. - Running
pnpm checkshouldn't produce any errors related toi18n.
Recommended extensions are listed in .vscode/extensions.json.
If you have issues with cargo tauri build run the following command.
# Linux, macOS
rm -rf ~/.cargo/git/checkouts/*
# Windows
rd /s /q "%USERPROFILE%\.cargo\git\checkouts"You can simulate safe area insets during development by overriding CSS variables --safe-area-inset-top and --safe-area-inset-button in unime/src/app.css. You can add styling to the safe area insets by setting PUBLIC_STYLE_SAFE_AREA_INSETS=true in your .env.
- Search the entire project for the current version string (such as
0.6.2) and replace them with the new version string. Be cautious not to replace versions of any other dependencies (inCargo.toml,Cargo.lock,package.json,package-lock.json). - Run the script in
unime/src-tauri/gen-static/apply.shwhich copies over the changed files into the (untracked) generated folders for Android and iOS. - Inside
unime/src-tauriruncargo tauri icon. - To create a release build, there is a special tweak for the respective platform:
- For iOS, open Xcode and open the root file
unime.xcodeproj. Go toSigning & Capabilities, disableAutomatically manage signingand select theProvisioning Profilemanually. - For Android, create a
keystore.propertiesfile inunime/src-tauri/gen/androidwhich contains the secrets required inbuild.gradle.kts(such askeyAlias, etc.).
- For iOS, open Xcode and open the root file
- Run
pnpm tauri ios buildandpnpm tauri android buildto build the apps. The iOS build (.ipa) will be inunime/src-tauri/gen/apple/build/arm64and the Android builds (.apkand.aab) will be inunime/src-tauri/gen/android/app/build/outputs/.