Settings — Downloads
Audience: Sales · Support · QA · Management · Engineering · Where in app: Settings → Downloads (/settings/downloads) · Plan availability: All plans (no permission gate)
The Downloads screen provides links to install the {brand} apps: the Desktop app (Windows / macOS / Linux) and the Mobile companion apps (iOS / Android). It detects the visitor's OS and CPU architecture, fetches the latest desktop installers directly from the GitHub release for the current brand, highlights the matching platform, and offers a one-click "Download for Your System" button. All links are white-label aware — a white-labeled deployment points at the Next Level AI repo, asset prefix, and app-store listings instead of Knock Knock's.
What it does
- Two tabs: Desktop (default) and Mobile.
- Desktop: cards for Windows, macOS, Linux, each linking to the correct installer; auto-highlights the detected OS; an "auto download" banner with a direct link for the detected system.
- Mobile: App Store (iOS) and Google Play (Android) buttons.
- OS + architecture detection to pick the right asset (e.g. macOS arm64 vs x64).
- White-label switching of repo, asset prefix, app-store URLs, and brand name.
How it works
The view (settings/downloads/Index.vue) detects the platform on mount and fetches the latest GitHub release.
OS detection and default tab
detectOS()parsesnavigator.userAgent→windows/mac/linux/ios/android/unknown.- On iOS/Android the screen auto-switches to the Mobile tab; otherwise it stays on Desktop and sets
detectedOS("Windows" / "macOS" / "Linux" / "your system").
Architecture detection
detectArch() prefers navigator.userAgentData.getHighEntropyValues(['architecture']), falling back to UA string sniffing. Returns arm64 or x64 (defaults macOS to arm64). Used to choose between macOS arm64 and x64 DMGs, preferring the detected arch and falling back to the other.
GitHub release fetching
fetchReleases() calls https://api.github.com/repos/KnockKnockAppLtd/<repo>/releases/latest (cache: 'no-store') and pickAsset() matches assets by regex against the brand's asset prefix:
| Platform | Asset pattern (prefix = Knock-Knock-App or Next-Level-AI) |
|---|---|
| Windows | <prefix>-Windows-x64-*-Setup.exe |
| macOS x64 | <prefix>-Mac-x64-*-Installer.dmg |
| macOS arm64 | <prefix>-Mac-arm64-*-Installer.dmg |
| Linux | <prefix>-Linux-*.AppImage |
If a matched asset can't be found, the card falls back to the releases-latest page (fallbackLink).
White-label awareness
Driven by appStore.isWhiteLabeled:
| Aspect | Default (Knock Knock) | White-labeled (Next Level AI) |
|---|---|---|
| Release repo | KnockKnock | NextLevelAI (both under org KnockKnockAppLtd) |
| Asset prefix | Knock-Knock-App | Next-Level-AI |
| iOS link | knock-knock-admin App Store listing | next-level-ai App Store listing |
| Android link | com.knockknock.android | com.nextlevelai.app |
| Brand name in copy | appStore.brandingName | agency/white-label name |
Configuration & options
This screen has no saved settings — it's a download surface. Behavior is driven by runtime detection and the brand:
| Element | Source |
|---|---|
| Desktop installers | Latest GitHub release assets for the brand repo |
| macOS arch choice | detectArch() (arm64/x64) |
| Highlighted platform / auto-download | detectedOS |
| Mobile app links | White-label-aware App Store / Play URLs |
| Platform support copy | Windows 10+, macOS 10.15+, Linux AppImage, Android 8.0+ (UI copy) |
Behaviors & edge cases
- GitHub fetch failure: logged; cards fall back to the brand's releases-latest page so links still work.
- Architecture fallback: if the detected macOS arch DMG is missing, the other arch DMG is offered.
- Auto-download banner only appears for desktop OSes (
isDesktopOS); its link resolves to the matched installer for the detected OS or the fallback page. - Mobile default tab: users on iOS/Android land on the Mobile tab automatically.
- No-store cache: the release call bypasses cache to always reflect the latest version.
- White-label correctness matters for QA: verify a white-labeled tenant shows Next Level AI repo/assets/app-store links and the agency name (never Knock Knock).
Plan & limits
Available on all plans, no permission gate. The desktop app's own feature gating (which features require a subscription) is governed elsewhere — this screen only distributes installers. White-label availability depends on the account being a white-labeled/agency deployment (verify with Agency / branding config).
Technical implementation
- View:
frontend/src/views/settings/downloads/Index.vue - Route: name
settings-downloads, path/settings/downloads, meta{ title: 'Downloads' }(no permission) —frontend/src/router/index.js - Release API:
GET https://api.github.com/repos/KnockKnockAppLtd/{KnockKnock|NextLevelAI}/releases/latest - Asset matching:
pickAsset()regexes against the brand asset prefix (seedesktop/electron-builder.config.jsfor the producing side) - White-label flags:
appStore.isWhiteLabeled,appStore.brandingName - Desktop app: built/published by the desktop service — see Desktop Overview and services/desktop.
Related
- Desktop Overview — what the desktop app does and how it's packaged.
- services/desktop — the Electron build/release pipeline that produces these installers.
- Settings — Notifications — the desktop-only "launch on startup" toggle.
- Agency — white-label branding that drives the repo/asset/app-store switching.