{"id":20253956,"url":"https://github.com/frectonz/jabroni","last_synced_at":"2025-09-10T08:43:46.758Z","repository":{"id":262750357,"uuid":"887834059","full_name":"frectonz/jabroni","owner":"frectonz","description":"Query your SQLite DB over WebSockets","archived":false,"fork":false,"pushed_at":"2024-11-14T03:37:02.000Z","size":506,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T23:51:23.114Z","etag":null,"topics":["rust","sqlite","sqlite3","websocket"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/frectonz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-13T11:14:51.000Z","updated_at":"2025-02-01T19:03:07.000Z","dependencies_parsed_at":"2024-11-14T07:16:03.762Z","dependency_job_id":null,"html_url":"https://github.com/frectonz/jabroni","commit_stats":null,"previous_names":["frectonz/jabroni"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/frectonz/jabroni","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frectonz%2Fjabroni","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frectonz%2Fjabroni/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frectonz%2Fjabroni/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frectonz%2Fjabroni/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frectonz","download_url":"https://codeload.github.com/frectonz/jabroni/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frectonz%2Fjabroni/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274434054,"owners_count":25284429,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["rust","sqlite","sqlite3","websocket"],"created_at":"2024-11-14T10:28:54.141Z","updated_at":"2025-09-10T08:43:46.733Z","avatar_url":"https://github.com/frectonz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jabroni\n\nJabroni let's you connect to your SQLite database over WebSockets and query your data. Jabroni also generates a type-safe typescript client library that provides an API similar to the browser's built in `fetch`.\n\n## Features\n\n- List rows in a table.\n- Select specific columns to be returned.\n- Paginate results by using a page number.\n- Batch insert rows.\n- Create, Read, Update and Delete a single rows.\n- Round robin connection pooling, to solve socket congestion.\n- Type safe client library.\n- All the benefits of a WebSocket connection.\n\n## Planned Features\n\n- [ ] Authorization using a JWT\n- [ ] Support for table joins\n\n## Install\n\n### Linux and MacOS\n\n```\ncurl --proto '=https' --tlsv1.2 -LsSf https://github.com/frectonz/jabroni/releases/download/0.1.0/jabroni-installer.sh | sh\n```\n\n### Windows\n\n```\npowershell -ExecutionPolicy ByPass -c \"irm https://github.com/frectonz/jabroni/releases/download/0.1.0/jabroni-installer.ps1 | iex\"\n```\n\n### Nix\n\n```\nnix shell github:frectonz/jabroni\n```\n\n### Docker\n\n```\ndocker run \\\n  -e ADDRESS=0.0.0.0:4949 \\\n  -e DATABASE=/data/sample.sqlite3 \\\n  -v $(pwd)/sample.sqlite3:/data/sample.sqlite3 \\\n  frectonz/jabroni \\\n  serve\n```\n\n## Usage\n\nStart a jabroni server\n\n```bash\n$ jabroni sample.sqlite3 serve\n2024-11-13T11:29:13.776666Z  INFO jabroni::db: found 13 tables in sample.sqlite3\n2024-11-13T11:29:13.776809Z  INFO jabroni: listening on: 127.0.0.1:3030\n```\n\nStart a jabroni server on a custom address\n\n```bash\n$ jabroni sample.sqlite3 serve --address localhost:4949\n2024-11-13T11:34:21.546608Z  INFO jabroni::db: found 13 tables in sample.sqlite3\n2024-11-13T11:34:21.547339Z  INFO jabroni: listening on: localhost:4949\n```\n\nGenerate a jabroni client library for a database\n\n\u003e [!IMPORTANT]\n\u003e The jabroni client library depends on `zod` and `nanoid`, so you should have them installed in your project.\n\n```bash\n$ jabroni sample.sqlite3 generate -o jabroni.ts\n2024-11-13T11:32:10.130350Z  INFO jabroni::db: found 13 tables in sample.sqlite3\n2024-11-13T11:32:10.130458Z  INFO jabroni: generating client library\n2024-11-13T11:32:10.133559Z  INFO jabroni: client library generated at jabroni.ts\n```\n\n## Client Library\n\nExample usage of the client library\n\n```ts\nimport { nanoid } from \"nanoid\";\nimport { makeWebSocketFetch } from \"./jabroni.ts\";\n\n// Initialize client library\nconst $fetch = await makeWebSocketFetch({\n  url: \"ws://127.0.0.1:3030\",\n  connectionCount: 10,\n});\n\n// Fetch all rows and all columns in the \"employees\" table\nconst resp = $fetch({\n  type: \"ListRows\",\n  table: \"employees\",\n  select: [],\n  request_id: nanoid(),\n});\n\n// Only fetch the \"FirstName\" and \"LastName\" columns\nconst resp = $fetch({\n  type: \"ListRows\",\n  table: \"employees\",\n  select: [\"FirstName\", \"LastName\"],\n  request_id: nanoid(),\n});\n\n// Sort response on the \"FirstName\" column\nconst resp = $fetch({\n  type: \"ListRows\",\n  table: \"employees\",\n  select: [\"FirstName\", \"EmployeeId\"],\n  sort: { column: \"FirstName\", order: \"Asc\" },\n  request_id: nanoid(),\n});\n\n// Paginate response\nconst resp = $fetch({\n  type: \"ListRows\",\n  table: \"employees\",\n  page: { number: 2, size: 2 },\n  request_id: nanoid(),\n});\n\n// Inset a new emplyoee in the \"employees\" table\nconst resp = $fetch({\n  type: \"InsertRow\",\n  table: \"employees\",\n  data: {\n    FirstName: \"John\",\n    LastName: \"Doe\",\n    Phone: \"+1 (780) 428-9482\",\n    Email: \"johndoe@test.com\",\n    Title: \"General Manager\",\n    Fax: \"+1 (780) 428-3457\",\n    Address: \"11120 Jasper Ave NW\",\n    City: \"Edmonton\",\n    State: \"AB\",\n    Country: \"Canada\",\n    BirthDate: \"1962-02-18 00:00:00\",\n    HireDate: \"2002-08-14 00:00:00\",\n    PostalCode: \"T5K 2N1\",\n    ReportsTo: null,\n  },\n  request_id: nanoid(),\n});\n\n\n// ...\n```\n\n## You Keep Using This Word `Jabroni`, and It's Awesome\n\nIt's a [cool word](https://www.youtube.com/watch?v=eCV9254WaLQ).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrectonz%2Fjabroni","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrectonz%2Fjabroni","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrectonz%2Fjabroni/lists"}