-
-
Notifications
You must be signed in to change notification settings - Fork 5
Building from Source
- Node.js 24 and npm
-
Python (required by
node-gyp) - A C++17 toolchain supported by
node-gyp
Platform toolchains:
| Platform | Toolchain |
|---|---|
| Linux |
build-essential, python3
|
| macOS | Xcode Command Line Tools |
| Windows | Visual Studio Build Tools with the C++ workload |
For Orchard Mobile you additionally need JDK 17 and Android SDK 36.
git clone https://github.com/SFG5453/Orchard.git
cd Orchard
npm ciUse npm ci rather than npm install so you get the locked dependency tree.
npm run devThis builds the native audio analyzer, starts Vite on 127.0.0.1:5173, and launches
Electron against the dev server. The two run concurrently and both stop together.
DevTools are available in non-packaged builds.
npm run buildRuns build:native then build:frontend. To build only one half:
npm run build:native # N-API audio analyzer only
npm run build:frontend # Vue renderer onlyRun the locally built app:
npm run startnpm testRuns the whole suite with Node's built-in test runner (node --test test/*.test.js).
The audio-specific subset, useful while working on the analysis or transition pipeline:
npm run test:nativeThat covers nativeAudioAnalysis, audioAnalysisService, smartCrossfadeAnalysis,
queueTransitionSort, transitionPlanner, crossfadeMixer, autoCrossfade,
subscribedArtists, and libraryCategory.
| Command | Result |
|---|---|
npm run package |
Unpacked Electron application directory |
npm run make |
Distributable packages for the current platform |
npm run package:linux-system |
Package against a system Electron on Linux |
npm run make:mac |
Cross-build a universal macOS ZIP from Linux |
Packaging is configured in electron-builder.config.cjs.
npm run build:native:windows # Windows addon from Linux
npm run build:native:macos:cross # macOS addon from LinuxThese back the cross-build scripts in scripts/.
The beat-tracking model is fetched rather than committed:
npm run fetch:beat-modelSee mobile/docs/BEAT_MODEL.md for details on the model and its quantization.
npm run build:artist-packBuilds the official artist pack from workers/artist-packs/content/. See
Artist Packs.
Each worker in workers/ is a separate npm project with its own wrangler.jsonc, secrets,
and deploy command. See Cloudflare Workers.
cd mobile/android
./gradlew assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apkTests and lint:
./gradlew testDebugUnitTest assembleDebug lintDebugnode-gyp fails immediately. Almost always a missing Python or C++ toolchain. Confirm
python3 --version and that a compiler is on PATH.
Native addon builds but does not load. Check that the addon architecture matches your Node and Electron architecture. Release CI includes an explicit architecture-verification step for arm64 Linux builds for exactly this reason.
Vite starts but Electron shows a blank window. The dev launcher waits on
http://127.0.0.1:5173. If something else holds that port, the launcher attaches to the
wrong server.
Tests pass locally but fail in CI. CI runs on Node 24 with a clean npm ci tree.
Reproduce with rm -rf node_modules && npm ci.
Orchard is licensed AGPL-3.0-or-later from 4.0.0 onward. Copyright © 2025–2026 SFG545. Orchard is not affiliated with or endorsed by YouTube or Google.
Using Orchard
Features
- Playback and Queues
- Explicit and Age-Restricted Tracks
- Best Mix
- Smart Crossfade
- Audio Engine
- Song Cache
- Library and Discovery
- Replay
- Listening Parties
- Orchard Connect
- Integrations
- Appearance
- Artist Packs
Mobile
Development
- Architecture
- Building from Source
- Native Audio Analyzer
- Cloudflare Workers
- Releases and Updates
- Contributing
Policy