{"id":13629080,"url":"https://github.com/StarlaneStudios/cirql","last_synced_at":"2025-04-17T04:33:01.549Z","repository":{"id":65282152,"uuid":"587345360","full_name":"StarlaneStudios/cirql","owner":"StarlaneStudios","description":"🔧 A flexible SurrealDB ORM \u0026 query builder with Zod powered validation 🏋️‍♂️","archived":false,"fork":false,"pushed_at":"2024-12-30T21:53:21.000Z","size":683,"stargazers_count":210,"open_issues_count":9,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-09T05:08:33.444Z","etag":null,"topics":["browser","builder","javascript","node","orm","query","sql","surql","surrealdb","surrealql","typescript","zod"],"latest_commit_sha":null,"homepage":"https://docs.starlane.studio/cirql","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StarlaneStudios.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://paypal.me/ExodiusStudios"]}},"created_at":"2023-01-10T14:38:15.000Z","updated_at":"2025-04-02T10:51:57.000Z","dependencies_parsed_at":"2023-02-15T16:45:26.019Z","dependency_job_id":"f7f11b0b-5e58-4445-8e9d-6c294c2f092d","html_url":"https://github.com/StarlaneStudios/cirql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlaneStudios%2Fcirql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlaneStudios%2Fcirql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlaneStudios%2Fcirql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlaneStudios%2Fcirql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StarlaneStudios","download_url":"https://codeload.github.com/StarlaneStudios/cirql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249316050,"owners_count":21249883,"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":["browser","builder","javascript","node","orm","query","sql","surql","surrealdb","surrealql","typescript","zod"],"created_at":"2024-08-01T22:01:02.323Z","updated_at":"2025-04-17T04:33:01.541Z","avatar_url":"https://github.com/StarlaneStudios.png","language":"TypeScript","funding_links":["https://paypal.me/ExodiusStudios","https://paypal.me/StarlaneStudios"],"categories":["Libraries"],"sub_categories":[],"readme":"\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/StarlaneStudios/cirql/main/.github/branding/logo.png\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003ch3\u003e⚠️ This project is no-longer being maintained and should not be used in production! ⚠️\u003c/h3\u003e\n\u003c/div\u003e\n\n\u003chr /\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://cirql.starlane.studio\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-available-de12b4\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/StarlaneStudios/cirql/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/StarlaneStudios/cirql\"\u003e \n  \u003c/a\u003e\n  \u003ca href=\"https://discord.gg/exaQDX2\"\u003e\n      \u003cimg src=\"https://img.shields.io/discord/414532188722298881\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/bundlephobia/min/cirql\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/contributors/StarlaneStudios/cirql\"\u003e\n\u003c/p\u003e\n\nCirql (pronounced Circle) is a simple lightweight ORM and query builder for [SurrealDB](https://surrealdb.com/), providing fully type-safe queries and [Zod](https://github.com/colinhacks/zod) powered parsing \u0026 validation. Unlike most query builders, Cirql's flexible nature leaves you with complete control over your queries, while still providing powerful APIs to query your database in a concise manner.\n\n## Features\n- 🔗 Connect to SurrealDB over stateful WebSockets or stateless HTTP requests\n- 📦 Support for query batching \u0026 transactions\n- ⚙️ Zod-powered schema validation of query results\n- 📝 Full TypeScript support with Zod schema inference\n- 💎 Write flexible queries using the Query Writer API\n- ✂️ Support for raw query strings and native Surreal functions\n- 🔥 Works both in browser and backend environments\n\n## Notice\nCirql is still in early developmental stages. While you can use it for production applications, it may still lack specific features and edge cases. Feel free to submit feature requests or pull requests to add additional functionality to Cirql. We do ask you to please read our [Contributor Guide](CONTRIBUTING.md).\n\nWhile we try to prevent making any significant API changes, we cannot guarantee this.\n\n## Installation\nThe first step to use Cirql is to install the package from npm, together with a supported version of zod.\n```\nnpm install cirql zod\n```\n\n## How to use\nYou can [read our documentation](https://cirql.starlane.studio/) for information on how to use Cirql.\n\n## Example\nThe following query fetches up to 5 organisations that are enabled and have the given user as a member. The result is parsed and validated using the provided Zod schema.\n\n```ts\nimport { RecordSchema, select } from 'cirql';\nimport { z } from 'zod';\n\n// Define your Zod schemas\nconst Organisation = RecordSchema.extend({\n    name: z.string(),\n    isEnabled: z.boolean(),\n    createdAt: z.string()\n});\n\n// Execute a select query\nconst organisations = await cirql.execute({\n    query: select()\n        .from('organisation')\n        .with(Organisation) // Specify the schema\n        .limit(5)\n        .where({\n            isEnabled: true,\n            members: any(userId)\n        })\n});\n```\n\nVisit our [Basic Usage](https://cirql.starlane.studio/docs/guide/basic-usage) guide for more examples.\n\n## Contributing\nWe welcome any issues and PRs submitted to Cirql. Since we currently work on multiple other projects and our time is limited, we value any community help in supporting a rich future for Cirql.\n\nBefore you open an issue or PR please read our [Contributor Guide](CONTRIBUTING.md).\n\n### Requirements\n- [PNPM](https://pnpm.io/) (npm i -g pnpm)\n\n### Roadmap\nYou can find the roadmap of intended features [here](ROADMAP.md).\n\n### Changelog\nThe changelog of previous versions can be found [here](CHANGELOG.md).\n\n### Live Development\nTo run in live development mode, run `pnpm dev` in the project directory. This will start the Vite development server.\n\n## Maintainers\n\u003ca href=\"https://starlane.studio\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/StarlaneStudios/cirql/main/.github/branding/starlane.png\" height=\"64\"\u003e\n\u003c/a\u003e\n\nCirql is built and maintained by \u003ca href=\"https://starlane.studio/\"\u003eStarlane Studios\u003c/a\u003e at no cost. If you would like to support our work feel free to [donate to us](https://paypal.me/StarlaneStudios) ⚡\n\n## License\n\nCirql is licensed under [MIT](LICENSE)\n\nCopyright (c) 2023-2025, Starlane Studios\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStarlaneStudios%2Fcirql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStarlaneStudios%2Fcirql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStarlaneStudios%2Fcirql/lists"}