{"id":21455511,"url":"https://github.com/hookdeck/xata-per-user-db","last_synced_at":"2026-02-05T03:36:59.615Z","repository":{"id":259312466,"uuid":"867801853","full_name":"hookdeck/xata-per-user-db","owner":"hookdeck","description":"Per User Database Creation with Xata, Clerk, Hookdeck, and Next.js","archived":false,"fork":false,"pushed_at":"2024-10-31T17:01:10.000Z","size":3240,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T07:47:47.723Z","etag":null,"topics":["clerk","database","hookdeck","nextjs","xata"],"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/hookdeck.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2024-10-04T18:43:50.000Z","updated_at":"2025-01-31T07:49:34.000Z","dependencies_parsed_at":"2025-06-12T07:36:46.032Z","dependency_job_id":"95db1221-aa7e-4c71-9a9d-f1ff383902ce","html_url":"https://github.com/hookdeck/xata-per-user-db","commit_stats":null,"previous_names":["leggetter/xata-per-user-db","hookdeck/xata-per-user-db"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hookdeck/xata-per-user-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hookdeck%2Fxata-per-user-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hookdeck%2Fxata-per-user-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hookdeck%2Fxata-per-user-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hookdeck%2Fxata-per-user-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hookdeck","download_url":"https://codeload.github.com/hookdeck/xata-per-user-db/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hookdeck%2Fxata-per-user-db/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29109304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T03:27:05.906Z","status":"ssl_error","status_checked_at":"2026-02-05T03:26:43.416Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["clerk","database","hookdeck","nextjs","xata"],"created_at":"2024-11-23T05:12:27.856Z","updated_at":"2026-02-05T03:36:59.602Z","avatar_url":"https://github.com/hookdeck.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Per User Database Creation with Xata, Clerk, Hookdeck, and Next.js\n\nThis Next.js example demonstrates how to create a database within [Xata](https://xata.io) per user within a Xata Workspace whenever a new user is created within [Clerk](https://clerk.com/). [Hookdeck](https://hookdeck.com?ref=github-xata) is used to manage inbound webhooks.\n\n## Before you being\n\nYou'll a free account with the following services:\n\n- [Clerk](https://clerk.com)\n- [Xata](https://xata.io)\n- [Hookdeck](https://hookdeck.com?ref=github-xata)\n\nInstall the Hookdeck CLI:\n\n```\nnpm i -g hookdeck-cli\n```\n\nAnd login:\n\n```sh\nhookdeck login\n```\n\n## Get the code\n\n```sh\nnpx create-next-app xata-per-user-db -e https://github.com/hookdeck/xata-per-user-db\n```\n\n## Create the config\n\n\u003e [!NOTE]\n\u003e This is a little convoluted because you can't create a webhook subscription using the Clerk API.\n\nCreate a local config file:\n\n```sh\ncp .env.example\n.env.local\n```\n\n### Hookdeck and Clerk\n\nCreate a localtunnel with the Hookdeck CLI to get Hookdeck Source URL:\n\n```sh\nhookdeck listen 3000 clerk --path /webhooks/clerk\n```\n\nThe output will be similar to the following:\n\n```sh\nDashboard\n👉 Inspect and replay events: https://dashboard.hookdeck.com?team_id={team_id}\n\nSources\n🔌 clerk URL: https://hkdk.events/{source_id}\n\nConnections\nclerk -\u003e clerk_to_cli-clerk forwarding to /webhooks/clerk\n\n\u003e Ready! (^C to quit)\n```\n\nCopy the `clerk URL` value and head to [Clerk Dashboard](https://dashboard.clerk.com/) -\u003e Configure -\u003e Webhooks section.\n\nClick **+ Add Endpoint** and enter the Hookdeck URL you copied in the previous step. Click **Create**.\n\nCopy the **Signing Secret** value and set the `CLERK_WEBHOOK_SECRET` value in `.env.local`.\n\nPopulate the `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` variables with values from the [Clerk Dashboard](https://dashboard.clerk.com/) -\u003e Configure -\u003e API Keys section.\n\nGo to the [Hookdeck Dashboard](https://dashboard.hookdeck.com) -\u003e Settings -\u003e Secrets and add values for `HOOKDECK_API_KEY` and `HOOKDECK_WEBHOOK_SECRET` in `.env.local`.\n\n### Xata\n\nFrom your workspace settings get your API Key and Workspace slug/ID, and save those in `XATA_API_KEY` and `XATA_WORKSPACE_SLUG` in your `.env.local` file.\n\n### Run the setup script\n\nFinally, run the setup script:\n\n```sh\nnpm run hookdeck:setup\n```\n\nThis ensures that Hookdeck is set up to verify the Clerk webhooks.\n\nYou can see the setup connection in the [Connections section](https://dashboard.hookdeck.com/connections) of the Hookdeck dashboard.\n\n## Run the app\n\nIn a new terminal:\n\n```sh\nnpm run dev\n```\n\nNavigate to `localhost:3000` (or similar), click the **Sign in** button, complete the sign in/up flow, you will see the webhooks logged by the Hookdeck CLI and output from the terminal you ran `npm run dev` in.\n\nCheck the Xata dashboard to see the new per use database has been created.\n\n## Resources\n\n- [Hookdeck docs](https://hookdeck.com/docs?ref=github-xata)\n- [Clerk docs](https://clerk.com/docs)\n- [Xata docs](https://xata.io/docs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhookdeck%2Fxata-per-user-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhookdeck%2Fxata-per-user-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhookdeck%2Fxata-per-user-db/lists"}