{"id":27373469,"url":"https://github.com/cnimmo16/quory","last_synced_at":"2026-02-08T14:33:00.636Z","repository":{"id":267384189,"uuid":"899708327","full_name":"CNimmo16/quory","owner":"CNimmo16","description":"The database client for support engineers 🧑‍🔧","archived":false,"fork":false,"pushed_at":"2025-01-26T13:04:03.000Z","size":896,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T11:14:52.130Z","etag":null,"topics":["data-apps","database-client","database-management","debugging","electron","entity-relationship"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CNimmo16.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-06T20:53:37.000Z","updated_at":"2025-01-26T13:02:44.000Z","dependencies_parsed_at":"2024-12-24T15:38:08.436Z","dependency_job_id":"1253ed5c-abaf-44bd-a271-b25ad75be52d","html_url":"https://github.com/CNimmo16/quory","commit_stats":null,"previous_names":["cnimmo16/quory"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNimmo16%2Fquory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNimmo16%2Fquory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNimmo16%2Fquory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CNimmo16%2Fquory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CNimmo16","download_url":"https://codeload.github.com/CNimmo16/quory/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703198,"owners_count":21148118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-apps","database-client","database-management","debugging","electron","entity-relationship"],"created_at":"2025-04-13T11:14:59.426Z","updated_at":"2026-02-08T14:33:00.600Z","avatar_url":"https://github.com/CNimmo16.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quory\n\nThe open source database client for support engineers.\n\n## Why do I need this?\n\nQuory was created out of frustration at the way most database clients handle querying relationships.\n\nIn general, database clients are designed for two things: **managing databases** and **analyzing data**. But if you commonly work on debugging individual customer queries, especially at small companies without much internal tooling, you'll know about another use case:\n\n**\"Show me all the relevant information that I need to solve this particular query, even if that information is stored across multiple database tables.\"**\n\nQuory is a database client focused on this use case, helping you to find the data you need to help your customers as quickly as possible.\n\n\u003e At its core, Quory is also a collection of Typescript functions for joining tables without writing SQL. [Find out about using Quory to build data apps.](#building-your-own-data-app-quorycore-)\n\n## Getting started\n\nQuory is distributed as an Electron app for all major operating systems.\n\nWindows, Mac and Linux installers can be found here https://github.com/CNimmo16/quory/releases/latest.\n\n### Which installer to pick?\n\nIf you're unsure which file to download from the release, here is some guidance:\n\n- On Windows, download the `quory-{version}-setup.exe` and follow the installer instructions.\n- For Linux, download the `quory-{version}.AppImage` file, or a specific file for your distro if it isn't compatible with AppImage.\n- On Mac OS, either:\n  - download the `quory-{version}.dmg` file to install Quory to the Applications folder\n  - download the `quory-{version}-arm64-mac.zip`, extract the zip file, and use it to run Quory directly\n\u003e For Mac OS, you'll need to run `xattr -c \u003cpath/to/application.app\u003e` from the terminal after installing the app. This is because the app is unsigned (as I do not have an Apple developer account). If you'd prefer to build from source, [see \"Building the electron client\"](#building-the-electron-client).\n\n## Quory Cloud (coming soon!)\n\nWorking in a team? With [Quory cloud](TODO) you can setup an affordable, fully managed Quory deployment in seconds, with access to cloud-exclusive features, including row and column level access control, integrations with customer support tools like Intercom, and support for additional data sources.\n\n## Other ways to use Quory\n\n### Integrating a Quory client within an existing Javascript web app (@quory/stack) [![npm version](https://badge.fury.io/js/@quory%2Fstack.svg)](https://badge.fury.io/js/@quory%2Fstack)\n\nThis option is for those who need a Quory client to sit on a page within their existing Javascript-based web application, either because:\n\n- You want it to be deployed in a subdirectory of your existing server\n- You need the client to be rendered within an existing webpage, without the use of an `\u003ciframe\u003e`\n- You want to deploy Quory as a serverless app (we recommend [Quory cloud](TODO) instead for this use case to get managed updates and access to additional features)\n\nCurrently only React is supported for the frontend.\n\n#### Installation\n\nInstall the `@quory/stack` module, as well as the dedicated driver for the database you will be interacting with.\n\nEg.\n\n```\nnpm install @quory/stack @quory/postgres --save\n```\n\nAvailable drivers:\n\n- `@quory/postgres`\n- `@quory/mysql`\n- `@quory/sqlite`\n\nNeed a driver not yet on this list? See [contributing](CONTRIBUTING.md).\n\n#### Setup\n\nIn your backend code, configure a Quory request handler for your project, specifying your database connection and any other configuration parameters you'd like to specify.\n\n```ts\nimport { makeQuoryRequestHandler } from \"@quory/stack\";\n\nconst handleQuoryRequest = makeQuoryRequestHandler({\n  database: {\n    hostOrFilePath: \"localhost\",\n    type: \"postgres\",\n    database: \"postgres\",\n    port: 5432,\n    username: \"postgres\",\n    password: \"postgres\",\n  },\n});\n```\n\nNow add an API route to handle POST requests from the frontend. The route should call the request handler from above, passing the JSON-parsed request body as the only argument.\n\nFor example, in express:\n\n```ts\napp.use(express.json());\napp.post(\"/quory\", async (req, res) =\u003e {\n  try {\n    const ret = await handleQuoryRequest(req.body);\n    res.json(ret);\n  } catch (error) {\n    console.error(error);\n  }\n});\n```\n\nNow on the frontend, start by wrapping your React application with the `\u003cQuoryProvider /\u003e`. This provides the configuration needed for Quory to fetch data from the backend\n\n```tsx\nimport { QuoryProvider } from \"@quory/stack/react\";\n\nexport default function MyApp() {\n  return (\n    \u003cQuoryProvider\n      endpointUrl=\"http://localhost:3000/quory\" // the URL from the post request configured above\n    \u003e\n      ...\n    \u003c/QuoryProvider\u003e\n  );\n}\n```\n\n\u003c!-- TODO: document this better --\u003e\n\nYou now have access to several hooks importable from `@quory/stack/react`\n\n- `useQuery` - fetch data for a Quory query from the backend\n\n```ts\n  const [_query, setQuery] = useState({\n    base: {\n      tableRef: 'public.users',\n      select: '*',\n    }\n  })\n  const { query, data, error, isLoading, joinActions } = useQuery(\n    _query,\n    setQuery\n  );\n```\n\n- `useQueryCount` - fetch only the total items count for a Quory query\n\n```ts\n  const { query, data, error, isLoading, joinActions } = useQueryCount({\n    tableRef: 'public.books',\n    select: ['name', 'author_id'],\n  });\n```\n\n- `useFetchSchema` - fetch the database schema information from the backend\n\n```ts\n  const { data: schemaData } = useFetchSchema();\n```\n\n### Building your own data app (@quory/core) [![npm version](https://badge.fury.io/js/@quory%2Fcore.svg)](https://badge.fury.io/js/@quory%2Fcore)\n\nIf you are building a data app, or want to interact with your own database directly, consider `@quory/core`. This is the package which powers Quory's auto-joining magic under the hood.\n\nIt provides a set of functions to obtain information about your database's schema and relationships, as well as a query builder to instantly fetch data from across multiple tables via a single SQL query, without the need to specify how to join the tables.\n\n[Read the docs for Quory core](/packages/core/README.md)\n\n## Local development\n\n### Prerequisites\n\n### Setup\n\n1. Clone the repo\n2. Run `npm install`\n\n#### Building packages\nRun `npm run dev` to run the `build:watch` scripts from all packages in the /packages folder. Note: this script may error when first run, if so just run it a second time.\n\n#### Running Electron client locally\nRun `npx turbo serve` to run the `serve` script from the `/packages/client/package.json`, which should launch the Electron app locally.\n\n#### Building the Electron client\nRun `npx turbo build:\u003cos\u003e` replacing `\u003cos\u003e` with your operating system - `mac`, `linux` or `windows`. The resulting build files will be created in the `/packages/client/dist` folder.\n\n#### Testing\nEach of the packages has a suite of tests, these can be run simultaneously by running `npm run test` from the root directory, or run `npm run test --workspace @quory/\u003cpackage-name\u003e` to run tests for a single package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnimmo16%2Fquory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnimmo16%2Fquory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnimmo16%2Fquory/lists"}