Building from Source
Relevant source files
The following files were used as context for generating this wiki page:
Building Conduit from source allows you to compile the Flutter mobile client and its associated internal packages. The project uses a Flutter workspace architecture, managing multiple internal packages and third-party submodules to provide a native mobile experience for Open WebUI and other model endpoints.
Sources: README.md:31-36, pubspec.yaml:10-18
Project Architecture and Workspace
Conduit operates as a Flutter workspace. The root pubspec.yaml serves as the workspace anchor, ensuring that all internal packages resolve against a single lockfile to prevent version drift.
Internal Workspace Members
The following packages are defined within the workspace:
| Package Name | Path | Description |
|---|---|---|
conduit_core | packages/conduit_core | Business logic, auth, API, and database schema. |
conduit_ddgs | packages/conduit_ddgs | Web search scrapers for on-device models. |
conduit_markdown | packages/conduit_markdown | Custom markdown preprocessing and block model parsers. |
conduit_theme | packages/conduit_theme | Shared UI theme definitions. |
Sources: pubspec.yaml:18-23, packages/conduit_core/pubspec.yaml:2-6, packages/conduit_markdown/pubspec.yaml:2-6, packages/conduit_ddgs/pubspec.yaml:2-5
Dependency Graph
This diagram illustrates the relationship between the main app and the internal workspace packages.
Environment Requirements
To build the project, you must install the following toolchains:
- Flutter SDK: Version
>=3.47.0. - Dart SDK: Version
>=3.13.0 <4.0.0. - Git: Required for cloning submodules.
Sources: pubspec.yaml:7-9, README.md:237-241
Build Procedure
Follow these steps to build and run the application from the command line:
- Clone the repository recursively: You must use the
--recursiveflag to include submodules like the Mermaid renderer and VAD components.git clone --recursive https://github.com/cogwheel0/conduit.git cd conduit - Fetch dependencies: Run
flutter pub getfrom the root directory to populate the workspace lockfile. - Generate code: The project relies on
build_runnerfor generating files (e.g., Freezed classes, Riverpod providers, and Drift database code).dart run build_runner build - Execute the application:
- For iOS:
flutter run -d ios - For Android:
flutter run -d android
- For iOS:
Sources: README.md:237-243, pubspec.yaml:129-136
Platform Specifics
iOS Configuration
Native assets for iOS require specific handling. For example, when using the vad package, you must ensure Xcode build settings do not strip required symbols.
- Set Strip Linked Product to
No. - Set Strip Style to
Non-Global-Symbols.
Sources: third_party/vad/UPSTREAM_README.md:549-556
Submodules and Third-Party Components
Certain components are pinned as submodules under third_party/ because they require specific modifications or are unpublished workspace packages.
- Mermaid Renderer: Located in
third_party/mermaid/. - VAD (Voice Activity Detection): Located in
third_party/vad/.
Sources: pubspec.yaml:73-77, pubspec.yaml:85-86
Release and CI Scripts
The repository includes a scripts/release.sh utility to automate version bumping and CI-driven builds.
Release Workflow
Key Build Automation Functions
The release script performs the following actions:
- Version Parsing: Reads the current version from
pubspec.yamland calculates the new version based on themajor,minor, orpatchargument. - Metadata Updates: Updates the iOS
Deliverfileand Android Fastlane changelogs. - Validation: Runs
tool/validate_release_notes.dartto ensure release documentation is present.
Sources: scripts/release.sh:76-105, scripts/release.sh:120-135
Conclusion
Building Conduit from source requires a standard Flutter development environment with specific attention to recursive submodule initialization and code generation via build_runner. The project's workspace structure ensures that core business logic in conduit_core remains decoupled from the Flutter UI, facilitating consistency across the mobile application.