-
Notifications
You must be signed in to change notification settings - Fork 2
Development Setup
Mohammad Nauman edited this page Jul 23, 2025
·
1 revision
- Node.js: v22.17.0 LTS or higher
- Rust: Latest stable version (1.87.0+)
-
Tauri CLI:
cargo install tauri-cli
# Clone the repository
git clone https://github.com/inauman/barqly-vault.git
cd barqly-vault
# Install dependencies
npm install # Frontend dependencies
cargo build # Backend dependencies
# Setup pre-commit hooks
chmod +x scripts/setup-hooks.sh
./scripts/setup-hooks.shmake dev # Start UI development server
make desktop # Start Tauri desktop app
make build # Build UI for production
make desktop-build # Build desktop app for distribution
make lint # Lint frontend code
make clean # Clean build artifacts
make help # Show all available commandsnpm run dev # Start UI development server
npm run tauri:dev # Start Tauri desktop app
npm run build # Build UI for production
npm run tauri:build # Build desktop app
npm run lint # Lint frontend code# Frontend development
cd src-ui
npm run dev # Start dev server
npm run build # Build for production
# Backend development
cd src-tauri
cargo tauri dev # Start desktop app
cargo build # Build backend# Install from root (recommended)
npm install <package-name>
# Install from src-ui directory
cd src-ui
npm install <package-name># Install from root (recommended)
cargo add <package-name>
# Install from src-tauri directory
cd src-tauri
cargo add <package-name>- React 18 LTS with TypeScript 5.x
- Tailwind CSS v4 with Vite plugin
- Shadcn/ui components with OKLCH colors
- Zustand for state management
- React Router v6 for routing
src-ui/
├── src/
│ ├── components/ # UI components
│ ├── lib/ # Utilities and API types
│ ├── pages/ # Page components
│ └── App.tsx # Main app component
├── package.json # Frontend dependencies
├── vite.config.ts # Vite configuration
└── tailwind.config.js # Tailwind configuration
cd src-ui
npx shadcn@canary add <component-name>- Rust with Tauri v2
- age-encryption for cryptographic operations
- serde for serialization
- tracing for structured logging
- thiserror for error handling
src-tauri/
├── src/
│ ├── commands/ # Tauri command handlers
│ ├── crypto/ # Cryptographic operations
│ ├── storage/ # Key and file storage
│ └── file_ops/ # File operations
├── Cargo.toml # Backend dependencies
└── tauri.conf.json # Tauri configuration
# From root
cargo build --features generate-types
# From src-tauri
cd src-tauri
cargo build --features generate-types# Option 1: UI only (for frontend work)
make dev
# Option 2: Full desktop app (for full-stack work)
make desktop- Edit frontend code in
src-ui/src/ - Edit backend code in
src-tauri/src/ - Both will hot-reload automatically
# Before committing
make lint # Frontend linting
cargo fmt --check # Backend formatting
cargo clippy # Backend linting
cargo test # Backend testsgit add .
git commit -m "feat: your feature description"
# Pre-commit hooks will run validation automaticallycd src-ui
npm test # Run tests
npm run test:watch # Watch mode# From root
cargo test
# From src-tauri
cd src-tauri
cargo test# Run all tests
cargo test --workspacemake build # Build UI
# Output: src-ui/dist/make desktop-build # Build desktop app
# Output: src-tauri/target/release/- Use browser dev tools when running
make dev - React DevTools extension recommended
- Vite provides fast HMR and error overlay
- Use
cargo tauri devfor desktop debugging - Check logs in terminal output
- Use
tracingfor structured logging
# Enable debug logging
RUST_LOG=debug make desktop
# Enable trace logging
RUST_LOG=trace make desktopbarqly-vault/
├── src-ui/ # Frontend (React/TypeScript)
│ ├── src/ # Source code
│ ├── package.json # Frontend dependencies
│ └── vite.config.ts # Vite configuration
├── src-tauri/ # Backend (Rust/Tauri)
│ ├── src/ # Source code
│ ├── Cargo.toml # Backend dependencies
│ └── tauri.conf.json # Tauri configuration
├── package.json # Root workspace (npm)
├── Cargo.toml # Root workspace (Rust)
├── Makefile # Development commands
└── README.md # Project documentation
- Never commit sensitive data (keys, passphrases)
- Use
.envfiles for local configuration - Follow security guidelines in code reviews
- All crypto operations use audited libraries
- Sensitive data is zeroed from memory
- Keys are stored encrypted at rest
# Clear node_modules and reinstall
cd src-ui
rm -rf node_modules package-lock.json
npm install
# Clear Vite cache
rm -rf node_modules/.vite# Clear Rust cache
cargo clean
# Update Rust toolchain
rustup update# Reinstall Tauri CLI
cargo install tauri-cli --force
# Clear Tauri cache
rm -rf src-tauri/target/- Check the Validation System
- Review API Documentation
- Open a GitHub Issue
This guide covers the essential setup and workflow for Barqly Vault development. For detailed API documentation, see the Architecture section.