Getting Started - zhnd/query-box GitHub Wiki

This guide will help you set up and run QueryBox locally. Follow the steps below to install prerequisites, configure the environment, run database migrations, and start the app.

This is the macOS version. For other operating systems, please refer to the installation content and handle the environment dependencies accordingly.

Prerequisites

  • Rust

Install via rustup using the following command:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Node.js

Download and install from https://nodejs.org

For specific version information, please check the .nvmrc file. It is recommended to use nvm for Node.js version management.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

more info of install nvm: Installing and Updating

pnpm

Using pnpm as package manager, specific version information: package.json

npm install -g pnpm
  • sqlx-cli

Related usage documentation:https://github.com/launchbadge/sqlx/blob/main/sqlx-cli/README.md

cargo install sqlx-cli
  • typeshare-cli

Generate TypeScript type file, Related usage documentation:https://github.com/1Password/typeshare

cargo install typeshare-cli

Setup

  1. Clone the repo and cd into it:
git clone https://github.com/your-org/query-box.git
cd query-box
  1. Create the SQLite database file:
touch app.sqlite
  1. Create environment variables: Copy the template and set DATABASE_URL to point at your local database.
touch src-tauri/.env

# edit .env directly to:
# DATABASE_URL=sqlite:/absolute/path/to/query-box/app.sqlite
  1. Run database migrations:
cd src-tauri
sqlx migrate run
  1. Prepare SQLx for compile‑time checking:
# src-tauri
cargo sqlx prepare
  1. Go back to the repo root and install dependencies:
cd ..
pnpm install
  1. Start the app in development mode:
pnpm tauri dev

This will launch the Tauri backend and the React frontend.

You’re all set! 🎉 Feel free to open issues or submit pull requests.