Documentation

QueryCraft Docs

QueryCraft is a visual query builder for constructing nested database/API filters, previewing generated query syntax, validating query logic, and executing filters against mock datasets.

Visual query construction

Create rules and groups through an interface instead of writing raw query syntax manually.

Recursive nested logic

Combine unlimited AND/OR groups to model advanced filtering logic.

Multi-format previews

Generate SQL, MySQL, MongoDB, and GraphQL style output from the same query tree.

Execution simulator

Run the query against mock data and inspect matching results instantly.

Core Concepts

1. Choose a field

Each rule starts with a schema field like name, age, status, country, or createdAt.

2. Pick a valid operator

Operators are restricted by field type. For example, numbers support greater_than and less_than, while strings support contains and starts_with.

3. Enter a value

Inputs adapt to the field type, including text inputs, number inputs, date inputs, and enum dropdowns.

4. Group logic

Wrap conditions inside AND/OR groups to build complex nested filters.

Example Query

A user can visually build a nested query like this:

(age > 18 AND country = "Nigeria")
OR
(status = "active" AND purchases > 10)

Validation

  • • Prevents empty fields
  • • Blocks invalid operators
  • • Detects empty groups
  • • Validates number values
  • • Guards imported JSON

Architecture

Normalized query tree state
Recursive component rendering
Immutable tree updates
Schema-driven operator control
Validation engine
Query generation engine
Execution simulator
LocalStorage persistence

Shortcuts

Ctrl / Cmd + ZUndo last query change
Ctrl / Cmd + YRedo previously undone change
Ctrl / Cmd + SSave current query as preset
EscapeClear current query

Import & Export

QueryCraft supports exporting the query tree as JSON and importing it later. This makes it easy to share presets, restore work, or test complex query structures.

Try it now