{"id":16259667,"url":"https://github.com/tahul/nuxt-edgedb","last_synced_at":"2025-04-12T03:32:51.997Z","repository":{"id":206614349,"uuid":"717305157","full_name":"Tahul/nuxt-edgedb","owner":"Tahul","description":"💽 Nuxt 3 integration for EdgeDB","archived":false,"fork":false,"pushed_at":"2024-06-21T10:35:12.000Z","size":899,"stargazers_count":70,"open_issues_count":15,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-19T04:26:59.591Z","etag":null,"topics":["database","edgedb","nuxt","nuxt-module","vue"],"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/Tahul.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-11-11T04:06:47.000Z","updated_at":"2024-10-15T09:43:41.000Z","dependencies_parsed_at":"2024-01-16T21:01:12.687Z","dependency_job_id":"1e6d3b5a-c56a-40e5-9a22-cff825208dee","html_url":"https://github.com/Tahul/nuxt-edgedb","commit_stats":{"total_commits":160,"total_committers":5,"mean_commits":32.0,"dds":0.08125000000000004,"last_synced_commit":"a1ffd27c44b0ff9870654754fcab2b11baa6c211"},"previous_names":["tahul/nuxt-edgedb"],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tahul%2Fnuxt-edgedb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tahul%2Fnuxt-edgedb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tahul%2Fnuxt-edgedb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tahul%2Fnuxt-edgedb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tahul","download_url":"https://codeload.github.com/Tahul/nuxt-edgedb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512931,"owners_count":21116709,"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":["database","edgedb","nuxt","nuxt-module","vue"],"created_at":"2024-10-10T16:04:10.535Z","updated_at":"2025-04-12T03:32:51.975Z","avatar_url":"https://github.com/Tahul.png","language":"TypeScript","readme":"![nuxt-edgedb-module](./.github/social-card.jpeg)\n\n# Nuxt EdgeDB\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![License][license-src]][license-href]\n[![Nuxt][nuxt-src]][nuxt-href]\n\nIntegrate [Nuxt 3](https://nuxt.com) with [EdgeDB](https://www.edgedb.com) effortlessly, adding a robust database layer to your app with minimal configuration.\n\n## Features\n\n- 🍱 **Effortless Integration**: Set up a database with just one line of configuration.\n- 🎩 **Live Schema Updates**: Experience _HMR-like DX_ with watchers on **schema**, **queries**, and **migrations**.\n- 🛟 **Typed Query Generation**: Automatically generate a typed query client with [@edgedb/generate](https://www.edgedb.com/docs/clients/js/generation).\n- 🍩 **Integrated Database Management**: Pilot your database from [Nuxt DevTools](https://github.com/nuxt/devtools).\n- 🔐 **Flexible Auth**: 1-line toggle [Email](https://www.edgedb.com/docs/guides/auth/email_password) or [OAuth](https://www.edgedb.com/docs/guides/auth/oauth) authentication, with support for custom auth providers.\n- 🧙 **Initial guidance**: Guides you through [EdgeDB CLI](https://www.edgedb.com/docs/cli/index) setup and [project initialization](https://www.edgedb.com/docs/cli/edgedb_project/edgedb_project_init).\n\n## Quick Setup\n\n1. Add `nuxt-edgedb-module` dependency to your project\n\n```bash\nnpx nuxi@latest module add edgedb\n```\n\n2. Add `nuxt-edgedb-module` to the `modules` section of `nuxt.config.ts`\n\n```js\nexport default defineNuxtConfig({\n  modules: [\n    'nuxt-edgedb-module'\n  ]\n})\n```\n\n3. Run `npx nuxt-edgedb-module` in your project root to run the CLI setup wizard.\n\n```bash\nnpx nuxt-edgedb-module\n```\n\nThat's it! Your Nuxt project now have a database. ✨\n\nIf you do not already have [EdgeDB](https://www.edgedb.com) installed on your machine, the install wizard will help you install it.\n\n## Example project\n\nIf you want to run the example project, you have to clone this repository and run the playground.\n\nAs EdgeDB cannot run on web containers environment like Stackblitz or CodeSandbox.\n\n```bash\ngit clone git@github.com:Tahul/nuxt-edgedb.git\ncd nuxt-edgedb\npnpm install\npnpm stub\ncd playground\nedgedb project init\nnpx nuxt-edgedb-module\npnpm run dev\n```\n\n## Module options\n\nYou can configure any behavior from the module from your `nuxt.config.ts` file:\n\n```typescript\nexport default defineNuxtConfig({\n  modules: ['nuxt-edgedb-module'],\n  edgeDb: {\n    // Devtools integrations\n    devtools: true,\n    // Completely toggle watchers feature\n    watch: true,\n    // Enable or disable prompts on watch events\n    watchPrompt: true,\n    // Generate target for your queries and query builder\n    generateTarget: 'ts',\n    // dbschema/ dir\n    dbschemaDir: 'dbschema',\n    // Individual queries dir (useEdgeDbQueries composable)\n    queriesDir: 'queries',\n    // Toggle CLI install wizard\n    installCli: true,\n    // Toggles composables\n    composables: true,\n    // Toggles auto-injection on auth credentials\n    injectDbCredentials: true,\n    // Enables authentication integration\n    auth: false,\n    // Enables oauth integration\n    oauth: false,\n  }\n})\n```\n\n## Server usage\n\nThe module auto-imports all composables available in the `server/` context of your Nuxt app.\n\n### useEdgeDb\n\n`useEdgeDb` exposes the raw client from the `edgedb` import using your Nuxt environment configuration.\n\n```typescript\n// server/api/blogpost/[id].ts\nimport { defineEventHandler, getRouterParams } from 'h3'\n\nexport default defineEventHandler(async (req) =\u003e {\n  const params = getRouterParams(req)\n  const id = params.id\n  const client = useEdgeDb()\n\n  const blogpost = await client.querySingle(`\n    select BlogPost {\n      title,\n      description\n    } filter .id = \u003cuuid\u003e$id\n  `, {\n    id: id\n  });\n\n  return blogpost\n})\n```\n\n### useEdgeDbQueries\n\n`useEdgeDbQueries` exposes all your queries from `dbschema/queries.ts`.\n\nYou do not have to pass them a client. They will use the one generated by `useEdgeDb` that is scoped to the current request.\n\n```esdl\n// queries/getBlogPost.edgeql\nselect BlogPost {\n  title,\n  description\n} filter .id = \u003cuuid\u003e$blogpost_id\n```\n\n```typescript\n// server/api/blogpost/[id].ts\nimport { defineEventHandler, getRouterParams } from 'h3'\n\nexport default defineEventHandler(async (req) =\u003e {\n  const params = getRouterParams(req)\n  const id = params.id\n  const { getBlogpPost } = useEdgeDbQueries()\n  const blogPost = await getBlogpost({ blogpost_id: id })\n\n  return blogpost\n})\n```\n\nYou can still import [queries](https://www.edgedb.com/docs/clients/js/queries) directly from `#edgedb/queries` and pass them the client from `useEdgeDb()`.\n\n```typescript\n// server/api/blogpost/[id].ts\nimport { getBlogPost } from '#edgedb/queries'\nimport { defineEventHandler, getRouterParams } from 'h3'\n\nexport default defineEventHandler(async (req) =\u003e {\n  const params = getRouterParams(req)\n  const id = params.id\n  const client = useEdgeDb()\n  const blogPost = await getBlogpost(client, { blogpost_id: id })\n\n  return blogpost\n})\n```\n\n### useEdgeDbQueryBuilder\n\n`useEdgeDbQueryBuilder` exposes the generated [query builder](https://www.edgedb.com/docs/clients/js/querybuilder) directly to your `server/` context.\n\n```typescript\n// server/api/blogpost/[id].ts\nimport { defineEventHandler, getRouterParams } from 'h3'\n\nexport default defineEventHandler(async (req) =\u003e {\n  const params = getRouterParams(req)\n  const id = params.id\n  const client = useEdgeDb()\n  const e = useEdgeDbQueryBuilder()\n\n  const blogPostQuery = e.select(\n    e.BlogPost,\n    (blogPost) =\u003e ({\n      id: true,\n      title: true,\n      description: true,\n      filter_single: { id }\n    })\n  )\n\n  const blogPost = await blogPostQuery.run(client)\n\n  return blogpost\n})\n```\n\n### Typings\n\nAll the interfaces generated by EdgeDB are available through imports via `#edgedb/interfaces`.\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport type { BlogPost } from '#edgedb/interfaces'\n\ndefineProps\u003c{ blogPost: BlogPost }\u003e()\n\u003c/script\u003e\n```\n\n## Authentification\n\nYou can use EdgeDB as a server-only database exposed via `server/api` endpoints and `$fetch` on the client, avoiding the need for authentication.\n\nBut in some projects, you might want your users to login so they have an identity on the server as well. Luckily, the module got you covered.\n\n\u003e Before going through these auth installation steps, we strongly recommend you to read the [EdgeDB Auth](https://www.edgedb.com/docs/guides/auth/index#auth) documentation.\n\n### Enable the `auth` option in your Nuxt configuration\n\n```ts\nexport default defineNuxtConfig({\n  modules: ['nuxt-edgedb-module'],\n  edgedb: {\n    auth: true\n  }\n})\n```\n\n### Setup EdgeDB Auth in your schema\n\nIn this example, you can notice:\n\n- `global current_user` which defines a [global property](https://www.edgedb.com/docs/datamodel/globals) linked to the client token identity.\n- `type User` is the model if your user, you are free to change it, that can be done later on thanks to migrations.\n- `access policy author_has_full_access` \u0026 `using (.author ?= global current_user);` defines the policy for the users to only have access to their own `BlogPost`.\n\n```esdl\n// dbschema/default.esdl\nusing extension auth;\n\nmodule default {\n  global current_user := (\n    assert_single((\n      select User { id, name }\n      filter .identity = global ext::auth::ClientTokenIdentity\n    ))\n  );\n\n  type User {\n    required name: str;\n    required identity: ext::auth::Identity;\n  }\n\n  type BlogPost {\n    property content: str {\n      default := 'My blog post content.';\n    };\n    property title: str {\n      default := 'My blog post';\n    };\n    required author: User;\n\n    access policy author_has_full_access\n      allow all\n      using (.author ?= global current_user);\n\n    access policy others_read_only\n      allow select;\n  }\n}\n```\n\nYou can edit this schema while your server is running and accept the prompted messages to auto-migrate.\n\nIf you are doing these edits while the server is off, you can run `edgedb migration create` and `edgedb migrate`.\n\n### Setup EdgeDB auth in your server\n\nYou will need to enable auth providers on your EdgeDB server.\n\nThat can be done in the `EdgeDB` tab through your DevTools.\n\nBrowse your database to `Auth Admin` and specify:\n\n- `auth_signing_key`\n- `allowed_redirect_urls`\n\nYou must also enable some providers. You can start with `Email + Password` for instance.\n\nIf you enable `required_verification`, you will need to configure a SMTP server for you EdgeDB instance.\n\nYou can find further instructions on how to use [Mailtrap](https://mailpit.axllent.org/docs/configuration/) locally to try this feature [here](https://www.edgedb.com/docs/guides/auth/index#email-and-password).\n\n\u003e Do not forget these steps must also be performed on your production environment.\n\n### Use authentication components on the client\n\nAs you enabled auth in your config, the module injected these components in your project:\n\n- [`EdgeDbAuthEmailLogin`](./src/runtime/components/EdgeDbAuthEmailLogin.vue)\n- [`EdgeDbAuthEmailVerify`](./src/runtime/components/EdgeDbAuthEmailVerify.vue)\n- [`EdgeDbAuthLogout`](./src/runtime/components/EdgeDbAuthLogout.vue)\n- [`EdgeDbAuthResetPassword`](./src/runtime/components/EdgeDbAuthResetPassword.vue)\n- [`EdgeDbAuthSendPasswordReset`](./src/runtime/components/EdgeDbAuthSendPasswordReset.vue)\n- [`EdgeDbAuthSignup`](./src/runtime/components/EdgeDbAuthSignup.vue)\n- [`EdgeDbAuthProviders`](./src/runtime/components/EdgeDbAuthProviders.vue)\n\nYou can look at the sources of these components to learn more about their props.\n\nThey all are unstyled components that only expose the necessary logic to achieve a smooth authentication flow.\n\n```vue\n\u003ctemplate\u003e\n  \u003cEdgeDbAuthEmailLogin\n    v-slot=\"{ email, updateEmail, password, updatePassword, submit, loading }\"\n    redirect-to=\"/\"\n  \u003e\n    \u003cdiv\u003e\n      \u003cinput\n        type=\"email\"\n        :value=\"email\"\n        placeholder=\"your@email.com\"\n        @change=\"(e) =\u003e updateEmail(e.target.value)\"\n      \u003e\n      \u003cinput\n        type=\"password\"\n        :value=\"password\"\n        placeholder=\"password\"\n        @change=\"(e) =\u003e updatePassword(e.target.value)\"\n      \u003e\n      \u003cbutton\n        type=\"button\"\n        @click=\"(e) =\u003e !loading \u0026\u0026 submit()\"\n      \u003e\n        {{ loading ? 'Loading' : 'Login' }}\n      \u003c/button\u003e\n    \u003c/div\u003e\n  \u003c/EdgeDbAuthEmailLogin\u003e\n\u003c/template\u003e\n```\n\nOf course, you can totally rewrite any of these components locally to implement your own authentication flow.\n\n### OAuth\n\nIf you want to use OAuth, you will have to enable it in your `nuxt.config`:\n\n```typescript\nexport default defineNuxtConfig({\n  edgeDb: {\n    oauth: true\n  }\n})\n```\n\nThat will inject two new components to your app:\n\n- [`EdgeDbOAuthButton`](./src/runtime/components/EdgeDbOAuthButton.vue)\n- [`EdgeDbOAuthCallback`](./src/runtime/components/EdgeDbOAuthCallback.vue)\n\nEdgeDB currently supports [OAuth](https://www.edgedb.com/docs/guides/auth/oauth#oauth) for the following providers:\n\n- Apple\n- Azure (Microsoft)\n- GitHub\n- Google\n\nIn order to get OAuth working, you will have to visit your EdgeDB Instance UI, via the Nuxt DevTools.\n\nBrowse to your database and visit the \"Auth Admin\" tab.\n\nIn your list of providers, you can then add any provider you want and configure the necessary keys (usually client `appid` and `secret`).\n\n\u003e Do not forget to set the callback url of your provider to the one listed at the top of your EdgeDB Auth Admin.\n\nThen, you can then create a simple OAuth button in your app like this:\n\n```vue\n\u003ctemplate\u003e\n  \u003c!-- Gives access to all available auth providers --\u003e\n  \u003cEdgeDbAuthProviders v-slot=\"{ oAuthProviders: providers }\"\u003e\n    \u003c!-- Create a OAuth button behavior from a provider name --\u003e\n    \u003cEdgeDbOAuthButton\n      v-for=\"provider of providers\"\n      :key=\"provider.name\"\n      v-slot=\"{ redirect }\"\n      :provider=\"provider.name\"\n    \u003e\n      \u003c!-- Call `redirect` from the OAuthButton --\u003e\n      \u003cbutton @click=\"() =\u003e redirect()\"\u003e\n        {{ provider.display_name }}\n      \u003c/button\u003e\n    \u003c/EdgeDbOAuthButton\u003e\n  \u003c/EdgeDbAuthProviders\u003e\n\u003c/template\u003e\n```\n\nYou will also need a call back page, that can use `EdgeDbAuthCallback`.\n\n```vue\n\u003ctemplate\u003e\n  \u003cEdgeDbOAuthCallback\n    v-slot=\"{ loading }\"\n    redirect-to=\"/\"\n  \u003e\n    \u003cdiv\u003e\n      \u003ch2\u003eOAuth callback\u003c/h2\u003e\n      \u003cp v-if=\"loading\"\u003e\n        Loading...\n      \u003c/p\u003e\n      \u003c/UCard\u003e\n    \u003c/div\u003e\n  \u003c/EdgeDbOAuthCallback\u003e\n\u003c/template\u003e\n```\n\nAmazing right?! In just a few lines, we just added a basic authentication to our application.\n\n### Client-side usage\n\nNow that the authentication is implemented, you also have access to the `useEdgeDbIdentity` composable in your Nuxt app.\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nconst { isLoggedIn } = useEdgeDbIdentity()\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cLoginButton v-if=\"isLoggedIn\" /\u003e\n    \u003cLogoutButton v-else /\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\nYou can look at the [`useEdgeDbIdentity`](./src/runtime/composables/useEdgeDbIdentity.ts) for more details.\n\n### Server-side usage\n\nThe authentication process does use a cookie called `edgedb-auth-token`.\n\nOn the server, if you want to authenticate your requests to the database for the current user, you only have to pass the current request object to composables:\n\n```typescript\nexport default defineEventHandler(async (req) =\u003e {\n  // Will throw an error, as you cannot delete a BlogPost without being the author\n  const { deleteBlogPost } = useEdgeDbQueries()\n  await deleteBlogPost({ blogpost_id: id })\n\n  // Success\n  const { deleteBlogPost: deleteBlogPostAuthenticated } = useEdgeDbQueries(req)\n  await deleteBlogPostAuthenticated({ blogpost_id: id })\n\n  return { id }\n})\n```\n\n### Other authentication solutions\n\nEdgeDDB Auth is a great solution, but eventually your app may require more features later.\n\nDo not forget that EdgeDB can also be used as a database. You can build your own auth or use existing solutions like:\n\n- [Sidebase Nuxt Auth](https://github.com/sidebase/nuxt-auth)\n- [Nuxt Auth (when ready)](https://github.com/nuxt-community/auth-module)\n- [Nuxt Auth Utils](https://github.com/Atinux/nuxt-auth-utils#supported-oauth-providers)\n- Your own implementation\n\nYou can also use _both_ and create Identity objects from your own authentication provider, and use `edgedb-auth-token` as your cookie.\n\nI would recommend looking at [https://github.com/edgedb/edgedb-examples] that is filled with great examples of custom authentications built on EdgeDB.\n\n### Authentication environment variables\n\n```sh\n# Your EdgeDB instance auth extension base URL\nNUXT_EDGEDB_AUTH_BASE_URL=http://localhost:10702/db/edgedb/ext/auth/\n# Your EdgeDB instance OAuth callback URL\nNUXT_EDGEDB_OAUTH_CALLBACK=http://localhost:10702/db/edgedb/ext/auth/callback\n# Your app callback page\nNUXT_EDGEDB_OAUTH_REDIRECT_URL=http://localhost:3000/auth/callback\n# Your app app reset password URL (receiving the token from the forgot password email)\nNUXT_EDGEDB_AUTH_RESET_PASSWORD_URL=http://localhost:3000/auth/reset-password\n# Your app email verify url (receiving the token from email verify feature)\nNUXT_EDGEDB_AUTH_VERIFY_REDIRECT_URL=http://localhost:3000/auth/verify\n```\n\n### Going further with authentication\n\nEdgeDB Auth only provides the bare minimal identity feature for authentication.\n\nIn the code example provided for authentication setup, a `User` type goes along with the `Identity` interface.\n\nIf you want to fill `User` with other attributes upon registration, you will have to implement this behavior yourself.\n\nIf you want to resolve data from OAuth providers, you can use the Nitro hook called `edgedb:auth:callback` from a Nitro plugin.\n\n```\n// server/plugins/auth.ts\n\nexport default defineNitroPlugin((app) =\u003e {\n  app.hooks.hook('edgedb:auth:callback', (data) =\u003e {\n    const {\n      code,\n      verifier,\n      codeExchangeUrl,\n      codeExchangeResponseData,\n    } = data\n\n    // codeExchangeResponseData contains the OAuth token from the provider.\n    // ... implement your own authentication logic.\n  })\n})\n```\n\n## Production\n\nIf you want to get out of development and deploy your database to prodution, you must follow the [EdgeDB guides](https://www.edgedb.com/docs/guides/deployment/index).\n\n[EdgeDB](https://www.edgedb.com) is an open-source database that is designed to be self-hosted.\n\nHowever, they also offer a [Cloud](https://www.edgedb.com/docs/guides/cloud), which is fully compatible with this module thanks to environment variables.\n\nIf you want to customize the [DSN] used by the composables, you can use the environment variables provided by the module:\n\n```\nNUXT_EDGEDB_HOST=\nNUXT_EDGEDB_PORT=\nNUXT_EDGEDB_USER=\nNUXT_EDGEDB_PASS=\nNUXT_EDGEDB_DATABASE=\n```\n\n\u003e If you want to use the env variables, you have to specify **ALL** of them, otherwise the client will fallback on default values.\n\n## Q\u0026A\n\n### Will my database client be exposed in userland?\n\nNo, `useEdgeDb` and `useEdgeDbQueries` are only available in the [server/](https://nuxt.com/docs/guide/directory-structure/server) context of Nuxt.\n\nYou can, as an **opt-in** feature, import queries from `@dbschema/queries` on the client.\n\nYou will need to provide these queries with a client from `createClient()`.\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport { createClient } from 'edgedb'\nimport { getUser } from '@dbschema/queries'\n\nconst client = createClient()\nconst user = await getUser(client, 42)\n\u003c/script\u003e\n```\n\nYou can also, still as an **opt-in** feature, import the query builder to the client.\n\nI guess that can be useful for a super-admin/internal dashboard, but use it at your own risks in terms of security access.\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport e, { type $infer } from '#edgedb/builder'\n\nconst query = e.select(e.Movie, () =\u003e ({ id: true, title: true }))\ntype result = $infer\u003ctypeof query\u003e\n//   ^ { id: string; title: string }[]\n\u003c/script\u003e\n```\n\nBe careful with these imports, as if you import wrong queries, you might end up with write operations available to the client, potentially damaging your database.\n\n### How do I run my migrations in production?\n\n- Clone your Nuxt project on your production environment\n- Ensure you have [EdgeDB CLI](https://www.edgedb.com/docs/cli/index) installed on the server\n- Add `edgedb migrate --quiet` to your CLI script\n\n### Should I version generated files?\n\nNo, as they are generated with your Nuxt client, you should add them to your `.gitignore`\n\n```.gitignore\n**/*.edgeql.ts\ndbschema/queries.*\ndbschema/query-builder\ndbschema/interfaces.ts\nqueries/*.query.ts\n```\n\nYou must change these paths accordingly if you change the `**Dir` options.\n\n### Is HMR for my database schema really safe?\n\nWell, it depends on when you want to use it.\n\nI would suggest keeping `watchPrompt` enabled while you casually dev on your project.\n\nThat will prevent from running any unwanted migration, and will only prompt when you add new things to your schemas.\n\nIf you want to go fast and know what you are doing, you can set `watchPrompt` to false, and profit from automatic migration creation and applying on any change on your schemas.\n\nIf you do not want any of these features, just set `watch` to false and feel safe about changes applied to your development database.\n\n\u003e HMR on your database obviously has **NO** effect in production context.\n\n### Why the name isn't `nuxt-edgedb`\n\nBecause that handle is already taken on NPM.\n\nIt seem to be taken by [`ohmree`](https://github.com/ohmree), but the package seem inactive.\n\nIf anyone happens to know him, I would be happy to get in touch with him!\n\n### Contributions\n\nThere is still plenty of great features to build for this integration.\n\nI would be happy to receive and review any Pull Request.\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Generate type stubs\nnpm run dev:prepare\n\n# Develop with the playground\nnpm run dev\n\n# Build the playground\nnpm run dev:build\n\n# Run ESLint\nnpm run lint\n\n# Run Vitest\nnpm run test\nnpm run test:watch\n\n# Release new version\nnpm run release\n```\n\n## Sponsors\n\n[![thecompaniesapi.com](./.github/thecompaniesapi.png)](https://thecompaniesapi.com)\n\n\u003c!-- Badges --\u003e\n[npm-version-src]: https://img.shields.io/npm/v/nuxt-edgedb-module/latest.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[npm-version-href]: https://npmjs.com/package/nuxt-edgedb-module\n\n[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-edgedb-module.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[npm-downloads-href]: https://npmjs.com/package/nuxt-edgedb-module\n\n[license-src]: https://img.shields.io/npm/l/nuxt-edgedb-module.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[license-href]: https://npmjs.com/package/nuxt-edgedb-module\n\n[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js\n[nuxt-href]: https://nuxt.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahul%2Fnuxt-edgedb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftahul%2Fnuxt-edgedb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahul%2Fnuxt-edgedb/lists"}