Skip to content

Feature/desktop tauri#168

Open
khaliltbn wants to merge 58 commits intoGuepard-Corp:mainfrom
khaliltbn:feature/desktop-tauri
Open

Feature/desktop tauri#168
khaliltbn wants to merge 58 commits intoGuepard-Corp:mainfrom
khaliltbn:feature/desktop-tauri

Conversation

@khaliltbn
Copy link
Contributor

What

Adds a Tauri-based desktop app (apps/desktop) so Qwery can run as a native desktop application (Linux, macOS, Windows) instead of only in the browser. The desktop app reuses the same React Router app and UI as the web app, and runs the existing API server as a Bun sidecar so chat, projects, datasources, and MCP work offline-capable in a single window.

How

  • New app: apps/desktop with Tauri 2, React Router 7, Vite; shares routes and components with apps/web via path aliases.
  • API server: Bundled and run as a Tauri sidecar (Bun). Desktop proxies /api and /qwery to the sidecar; Rust waits for the server to listen before considering the app ready.
  • Env for AI: .env is loaded in Rust (dotenvy) and passed to the sidecar so AZURE_RESOURCE_NAME and other provider vars are available to the API server.
  • Desktop shell: Custom titlebar (window controls, drag region, native menu with File/Edit/View/Help), desktop API (minimize/maximize/close, file open/save via Tauri plugins), and keyboard shortcuts (e.g. command palette).
  • Build: predev downloads Bun and builds the server; desktop build runs extensions build, server build, then tsc and React Router build; Tauri packages the binary and sidecars.

Review Guide

  1. apps/desktop/src-tauri/src/lib.rs – Tauri setup, sidecar spawn, .env loading, server-ready wait.
  2. apps/desktop/app/root.tsx – Root layout, titlebar, RootProviders, desktop API init.
  3. apps/desktop/app/components/titlebar.tsx – Native titlebar and menu.
  4. apps/desktop/app/routes.ts – Route config reusing web routes.
  5. apps/desktop/vite.config.ts – Port, proxy, optimizeDeps, resolve for desktop.
  6. apps/desktop/package.json – Scripts and deps (Tauri, React Router, @qwery/ui, etc.).
  7. apps/desktop/scripts/download-bun.js – Bun download for the sidecar.

Testing

  • Manual testing performed: desktop dev and build on host OS; chat, projects, navigation.
  • Unit tests added/updated
  • E2E tests added/updated

Documentation

  • Code comments added for complex logic
  • README or docs updated if needed
  • CHANGELOG.md updated (if applicable)

User Impact

  • Users can install and run Qwery as a native desktop app (no browser tab).
  • Same workflows as web (projects, datasources, chat, MCP); API runs locally in the same process tree.
  • Requires Bun binary (downloaded by script) and correct .env (e.g. Azure) for AI features.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Tests pass locally (pnpm test)
  • Lint passes (pnpm lint:fix)
  • Type check passes (pnpm typecheck)
  • This PR can be safely reverted if needed


const tmpZip = path.join(BINARIES_DIR, `bun-tmp-${Date.now()}.zip`);
const tmpDir = path.join(BINARIES_DIR, `bun-tmp-${Date.now()}`);
fs.writeFileSync(tmpZip, buffer);

Check warning

Code scanning / CodeQL

Network data written to file Medium

Write to file system depends on
Untrusted data
.
import tailwindCssVitePlugin from '@qwery/tailwind-config/vite';
import devtoolsJson from 'vite-plugin-devtools-json';
import tsconfigPaths from 'vite-tsconfig-paths';
import topLevelAwait from 'vite-plugin-top-level-await';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import topLevelAwait.
@khaliltbn khaliltbn requested a review from hchalouati March 3, 2026 11:33
khaliltbn and others added 30 commits March 8, 2026 16:22
Removed duplicate GITHUB_TOKEN environment variable.
Add step to generate route types in release workflow
Added a step to install Linux dependencies for Tauri on Ubuntu.
Added a step to copy the api-server to desktop binaries before building the desktop app.
Updated the copy command for api-server to include platform-specific handling and error checking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants