{"id":15290822,"url":"https://github.com/g4brym/workers-dbms","last_synced_at":"2025-07-02T10:32:15.418Z","repository":{"id":257803867,"uuid":"856570243","full_name":"G4brym/workers-dbms","owner":"G4brym","description":"Workers Database Management System for Durable Objects","archived":false,"fork":false,"pushed_at":"2024-10-05T15:56:09.000Z","size":1689,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T00:39:09.904Z","etag":null,"topics":["cloudflare","cloudflare-durable-objects","cloudflare-workers","durable-objects","durable-objects-sqlite","sqlite"],"latest_commit_sha":null,"homepage":"","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/G4brym.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,"zenodo":null}},"created_at":"2024-09-12T19:58:38.000Z","updated_at":"2025-06-02T05:25:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"77672544-cb31-47e3-95d2-7f53ef6204df","html_url":"https://github.com/G4brym/workers-dbms","commit_stats":null,"previous_names":["g4brym/workers-dbms"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/G4brym/workers-dbms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G4brym%2Fworkers-dbms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G4brym%2Fworkers-dbms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G4brym%2Fworkers-dbms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G4brym%2Fworkers-dbms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/G4brym","download_url":"https://codeload.github.com/G4brym/workers-dbms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G4brym%2Fworkers-dbms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263120850,"owners_count":23416891,"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":["cloudflare","cloudflare-durable-objects","cloudflare-workers","durable-objects","durable-objects-sqlite","sqlite"],"created_at":"2024-09-30T16:09:37.822Z","updated_at":"2025-07-02T10:32:15.411Z","avatar_url":"https://github.com/G4brym.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# workers-dbms\nWorkers Database Management System for Durable Objects\n\nThis project aims to provide a standard interface for \"traditional\" frameworks that are currently not supported by\ncloudflare workers to be able to use Durable Objects with SQLite as the backend database!\n\nThe main differences from Cloudflare D1 are:\n- Websocket support (this really makes a difference when executing dozens of queries sequentially)\n- Experimental transactions support\n\n\n## Features\n- On demand SQLite databases (like neon.tech)\n- https endpoints to manage and query databases\n- Websocket endpoint to query databases\n- **Transactions support** in websocket mode!\n\n\n## Supported frameworks\n- Django using [django-cf](https://github.com/G4brym/django-cf)\n\n\n## Get started\n\n```bash\nnpm install --save workers-dbms\nnpm install --save wrangler\n```\n\nCreate a `index.ts` file with this:\n```ts\nimport { generateApp } from \"workers-dbms\";\nexport { DBMSDO } from \"workers-dbms\";\n\nexport default generateApp()\n```\n\nCreate a `wrangler.toml` file with this:\n```toml\n#:schema node_modules/wrangler/config-schema.json\nname = \"workers-dbms\"\nmain = \"index.ts\"\ncompatibility_date = \"2024-09-28\"\n# workers_dev = false  # uncomment this for enhanced security !\n\n[[durable_objects.bindings]]\nname = \"DBSM_DO\"\nclass_name = \"DBMSDO\"\n\n[[migrations]]\ntag = \"v1\"\nnew_sqlite_classes = [\"DBMSDO\"]\n```\n\nDeploy your dbms with wrangler:\n```bash\nwrangler deploy\n```\n\nYou can now access your dbms on the worker deployed url\n\nThere is also a swagger interface with all the endpoints documented at `/api` path.\n\n\n## Images\n\nHome page\n![homepage](https://github.com/G4brym/workers-dbms/raw/main/docs/home-page.png)\n\nDatabase details\n![homepage](https://github.com/G4brym/workers-dbms/raw/main/docs/database-details.png)\n\nAPI Documentation with swagger\n![homepage](https://github.com/G4brym/workers-dbms/raw/main/docs/swagger.png)\n\n\n## FAQ\n\n### Handshake status 426 Upgrade Required\n\nWhen using a custom domain for your worker, make sure to enable WebSockets on the domain Network configuration,\notherwise you will not be able to use the websocket endpoint!\n\n![enable websockets](https://github.com/G4brym/workers-dbms/raw/main/docs/enable-websockets.png)\n\n\n### Anyone can access my databases\n\n1. For secure databases, you should uncomment the `workers_dev = false` line in your `wrangler.toml`\n2. Create a custom domain for your worker [docs here](https://developers.cloudflare.com/workers/configuration/routing/custom-domains/#add-a-custom-domain)\n3. Setup zero trust for this worker [docs here](https://developers.cloudflare.com/cloudflare-one/applications/configure-apps/self-hosted-apps/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4brym%2Fworkers-dbms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg4brym%2Fworkers-dbms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4brym%2Fworkers-dbms/lists"}