docs/src/content/docs/development/building.md
Server Box uses the custom fl_build tool to build the App for each platform. Monitor agent is an independent Rust service with its own build process.
crates/sbm_ffi through a Dart build hook, flutter_rust_bridge_hooks, and native assetsInitialize the repository's Git submodules before fetching Dart dependencies:
git submodule update --init --recursive
# Run the App
flutter run
# Run on a specific device
flutter run -d <device-id>
Build a target platform with fl_build:
dart run fl_build -p <platform>
Available platforms are ios, android, macos, linux, and windows.
dart run fl_build -p ios
Requires macOS with Xcode and an Apple Developer account for signing.
dart run fl_build -p android
Requires the Android SDK, a JDK, and a keystore for release signing. Formal release builds must use the release keystore configured in key.properties. For local verification only, explicitly pass -PallowDebugReleaseSigning=true to use debug signing. The reproducible and F-Droid builds pass -PallowUnsignedRelease=true instead, which assigns no signing config at all; scripts/release/android-build-env.sh exports it.
dart run fl_build -p macos
dart run fl_build -p linux
dart run fl_build -p windows
Requires a Windows build environment with Visual Studio.
Monitor agent is a standalone server binary and is not part of the App build process.
# From the repository root
cargo build --release
# Build the web panel
cd monitor/frontend
npm install
npm run build
After the build, the agent serves the panel when frontend/dist exists. From the repository root, make monitor-dev starts the development environment: the API listens on :3770 and the Vite dev server on :3000.
Release artifacts are built by the monitor-release.yml workflow. It supports workflow_dispatch only; monitor-v* tags are independent of App releases. See monitor/Dockerfile for Docker builds.
fl_build regenerates lib/data/res/build_data.dart on every build, derives the build number from Git history, and writes the version into Xcode configuration. The fl_build: section in pubspec.yaml configures the App name.
flutter clean
dart run build_runner build --delete-conflicting-outputs
flutter pub get
flutter clean removes build/, including the iOS Linux engine libraries when that engine is enabled. Rebuild the required target with scripts/build-ish-ios.sh device, simulator, or macos; otherwise the linker will report missing engine files.
Resolve dependencies only after checking compatibility:
flutter pub upgrade
After changing an annotated model, run code generation as well; see Code Generation.
pubspec.yaml.