The Desktop User Interface (DUI) for BB provides a native application experience for managing the BB API server and services. Built with Tauri and Preact, it offers a lightweight, secure, and performant solution for BB project management.
Primary Features:
- BB API server management (start/stop)
- Real-time log viewing
- Project management
- Cross-platform support (Windows, macOS, Linux)
Additional Features:
- Dark/light theme support
- Native notifications
- Minimal resource usage
- Optional system tray integration
- Tauri 2.1.1: Core framework for native desktop application
- Preact: Frontend UI library
- TypeScript: Type-safe development
- Rust: Backend system integration
- Deno: Development runtime
-
Install Rust and Cargo:
- Windows: https://www.rust-lang.org/tools/install
- macOS/Linux:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install Deno:
-
Install Tauri CLI:
cargo install tauri-cli
-
Clone the repository:
git clone https://github.com/yourusername/bb.git cd bb -
Install dependencies:
cd dui deno install # Install required Babel plugins deno add npm:@babel/plugin-transform-react-jsx-development deno add npm:babel-plugin-transform-hook-names
-
Start development server:
deno task tauri dev
Build the application:
cd dui
deno task tauri buildThe built application will be available in:
- Windows:
dui/src-tauri/target/release/bb-dui.exe - macOS:
dui/src-tauri/target/release/bundle/dmg/BB Manager.app - Linux:
dui/src-tauri/target/release/bundle/deb/bb-dui.deb
dui/
├── src-tauri/ # Rust backend
│ ├── src/
│ │ ├── main.rs # Application entry
│ │ ├── api.rs # BB API integration
│ │ └── config.rs # Configuration
│ ├── Cargo.toml # Rust dependencies
│ └── tauri.conf.json # Tauri config
├── src/ # Frontend
│ ├── main.tsx # Entry point
│ ├── app.tsx # Root component
│ ├── components/ # UI components
│ │ ├── LogViewer/ # Log display
│ │ ├── ProjectList/ # Project management
│ │ └── StatusBar/ # API status
│ ├── hooks/ # Custom hooks
│ │ ├── useApi.ts # API management
│ │ └── useConfig.ts # Configuration
│ └── types/ # TypeScript types
└── deno.json # Deno config
- Start/stop API server (Implemented)
- Direct bb-api binary execution
- Configuration-based startup
- Process management with PID tracking
- Monitor server status (Implemented)
- Real-time status updates
- Process health checking
- API response verification
- View server logs (Planned)
- Configure server settings (Planned)
- List BB projects
- Add/remove projects
- Select active project
- Project configuration
- Clean, modern design
- Dark/light theme support
- Responsive layout
- Native OS integration
- Follow Rust style guide for backend code
- Use TypeScript best practices
- Follow Preact patterns and conventions
- Write unit tests for Rust code
- Test Preact components
- Perform cross-platform testing
- Integration tests for API
- Minimize main thread blocking
- Optimize resource usage
- Handle large log files efficiently
- Follow Tauri security guidelines
- Validate all user inputs
- Handle sensitive data appropriately
Key configuration files:
dui/src-tauri/tauri.conf.json- Main Tauri configurationdui/deno.json- Deno configurationdui/src-tauri/Cargo.toml- Rust dependenciesdui/tsconfig.json- TypeScript configuration
- Read the CONTRIBUTING.md guidelines
- Fork the repository
- Create a feature branch
- Submit a pull request
If you need help:
- Check the existing documentation
- Review troubleshooting guides
- Search the issue tracker
- Create a new issue if needed