{"id":18493779,"url":"https://github.com/neurocode-io/d1-manager","last_synced_at":"2025-05-14T02:14:23.877Z","repository":{"id":213750001,"uuid":"734830198","full_name":"neurocode-io/d1-manager","owner":"neurocode-io","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-19T23:02:54.000Z","size":5616,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-25T16:29:35.675Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Svelte","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/neurocode-io.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":"2023-12-22T18:38:06.000Z","updated_at":"2023-12-22T18:39:00.000Z","dependencies_parsed_at":"2024-12-25T16:27:06.644Z","dependency_job_id":"19c6a493-feea-4985-a10c-2f32e63c60a6","html_url":"https://github.com/neurocode-io/d1-manager","commit_stats":null,"previous_names":["neurocode-io/d1-manager"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocode-io%2Fd1-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocode-io%2Fd1-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocode-io%2Fd1-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurocode-io%2Fd1-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neurocode-io","download_url":"https://codeload.github.com/neurocode-io/d1-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239208876,"owners_count":19600221,"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":[],"created_at":"2024-11-06T13:16:01.247Z","updated_at":"2025-02-16T23:23:06.500Z","avatar_url":"https://github.com/neurocode-io.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# D1 Manager\n\nD1 Manager is a web UI and API for Cloudflare D1, a serverless SQL database. It provides a user-friendly interface for managing databases, tables, and records, as well as an API for performing operations programmatically. D1 Manager simplifies database management, enabling users to focus on their data.\n\n[![semantic-query-demo](./images/semantic-query-demo.gif)](https://storage.jacoblin.cool/semantic-query-demo.mp4)\n\n## Features\n\n-   [x] Multiple D1 Databases\n-   [x] List all tables in a database\n-   [x] Show table schema\n-   [x] Run SQL queries\n-   [x] Run Semantic Queries (with `OPENAI_API_KEY` env var set)\n-   [x] Edit table data through UI\n-   [x] I18n support (English, Chinese) [add more](./locales/)\n-   [x] API support (see [routes/api](./src/routes/api/) for details)\n\n## Setup\n\n1. Fork this repo\n2. Setup a **Cloudflare Pages** with the forked repo\n3. Use **Cloudflare Access** to protect the your site\n4. **Bind databases** to `DB_*` environment variables\n\n![bind-d1](./images/bind-d1.png)\n\n\u003e Note: You can bind multiple databases to the manager. In theis example, `DB` will be `default` in the UI, and `DB_test` will be `test`.\n\n### Environment Variables\n\nSome plugins (e.g. Semantic Query) require additional environment variables to be set.\n\n![set-env-var](./images/set-env-var.png)\n\nAlso, there are some configuration options that can be set through environment variables.\n\n-   `SHOW_INTERNAL_TABLES`: Show internal tables (`splite_*` and `d1_*`) in the UI.\n-   `OPENAI_API_KEY`: OpenAI API key for Semantic Query.\n-   `OPENAI_API_URL`: You may use this with Cloudflare AI Gateway to proxy requests to OpenAI API.\n\n## Screenshots\n\n![tables](./images/tables.png)\n\n![run-query](./images/run-query.png)\n\n![table-browser](./images/table-browser.png)\n\n![add-record](./images/add-record.png)\n\n![semantic-query](./images/semantic-query.png)\n\n\u003e Semantic Query uses OpenAI GPT-3.5 Turbo to translate natural language queries into SQL.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurocode-io%2Fd1-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurocode-io%2Fd1-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurocode-io%2Fd1-manager/lists"}