{"id":16977532,"url":"https://github.com/hieuhani/nuxt-multi-tenancy","last_synced_at":"2026-01-26T18:53:57.962Z","repository":{"id":40308564,"uuid":"289408954","full_name":"hieuhani/nuxt-multi-tenancy","owner":"hieuhani","description":"Nuxt Multi Tenancy Module - multi-tenancy by sub domain for Nuxt application","archived":false,"fork":false,"pushed_at":"2025-08-04T08:47:03.000Z","size":523,"stargazers_count":267,"open_issues_count":7,"forks_count":23,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-14T11:07:28.290Z","etag":null,"topics":["multi-tenancy","nitro","nuxt-module","nuxt3"],"latest_commit_sha":null,"homepage":"https://techgoda.net/","language":"Vue","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/hieuhani.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-08-22T03:04:11.000Z","updated_at":"2025-10-13T17:54:10.000Z","dependencies_parsed_at":"2023-11-20T08:08:17.870Z","dependency_job_id":"73931d97-3a17-483a-b9ef-e11cd4c862db","html_url":"https://github.com/hieuhani/nuxt-multi-tenancy","commit_stats":{"total_commits":29,"total_committers":4,"mean_commits":7.25,"dds":"0.10344827586206895","last_synced_commit":"b3f6e82291f845c12f4a4d02e669f37d0771939e"},"previous_names":["hieuhani/nuxt-multi-tenancy","hieuhani/nuxt-multi-tenancy-module"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/hieuhani/nuxt-multi-tenancy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hieuhani%2Fnuxt-multi-tenancy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hieuhani%2Fnuxt-multi-tenancy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hieuhani%2Fnuxt-multi-tenancy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hieuhani%2Fnuxt-multi-tenancy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hieuhani","download_url":"https://codeload.github.com/hieuhani/nuxt-multi-tenancy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hieuhani%2Fnuxt-multi-tenancy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28785172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: 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":["multi-tenancy","nitro","nuxt-module","nuxt3"],"created_at":"2024-10-14T01:29:10.793Z","updated_at":"2026-01-26T18:53:57.956Z","avatar_url":"https://github.com/hieuhani.png","language":"Vue","funding_links":[],"categories":["Vue","Starter Kits"],"sub_categories":[],"readme":"# Nuxt 3 Multi-tenancy\n\nNuxt 3 Multi-tenancy module for building multi-tenant applications on Nuxt 3\n\n\u003cp\u003e\n  \u003ca href=\"#features\"\u003e\u003cstrong\u003eFeatures\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"https://techgoda.net\"\u003e\u003cstrong\u003eDemo\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#quick-setup\"\u003e\u003cstrong\u003eQuick Setup\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#contributing\"\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n⛰ \u0026nbsp;Multi-tenancy Nuxt dynamic tenant sites support by subdomains\n\n🌻 \u0026nbsp;Multiple Nuxt app sites in pages folder\n\n🦄 \u0026nbsp;Custom domain for each tenant route in pages folder\n\n✨ \u0026nbsp;A fully functional sample playground deployed on Vercel\n\n\n\n## Quick Setup\n\n1. Add `nuxt-multi-tenancy` dependency to your project\n\n```bash\n# Using pnpm\npnpm add -D nuxt-multi-tenancy\n\n# Using yarn\nyarn add --dev nuxt-multi-tenancy\n\n# Using npm\nnpm install --save-dev nuxt-multi-tenancy\n```\n\n2. Add `nuxt-multi-tenancy` to the `modules` section of `nuxt.config.ts`\n\n```js\nexport default defineNuxtConfig({\n  modules: [\n    'nuxt-multi-tenancy'\n  ]\n})\n```\n\n3. If you want to use dynamic tenants, create `[site]` folder under your Nuxt `pages` directory, you can check the [playground's pages folder](./playground/pages/[site]/) for referencing.\n\nThat's it! You can now use Nuxt Multi-tenancy in your Nuxt app ✨\n\n4. If you want to have some additional system sites to be serving as a sub domain, for example: [jobs page](./playground/pages/jobs/)\n\nConfigure the sites property to add the list of tenant you want to be serving as system sites.\n```js\nexport default defineNuxtConfig({\n  modules: ['nuxt-multi-tenancy'],\n  multiTenancy: {\n    tenantDynamicRoute: 'site',\n    rootDomains: [\"nuxtdev.local\", \"techgoda.net\"],\n    sites: ['jobs']\n  },\n})\n```\n\n5. If you are using a hoster that provides preview environments with temporary domains including subdomains (e.g. `jobs.project-name-hash.example-hoster.com`), you can also disable the strict subdomain check, so only the first subdomain is used as the tenant (e.g. `foo.bar.baz.dev` → `foo`) and an exact match is not required (i.e. site + root domain).\n\n```js\nexport default defineNuxtConfig({\n  modules: ['nuxt-multi-tenancy'],\n  multiTenancy: {\n    tenantDynamicRoute: 'site',\n    rootDomains: [\"nuxtdev.local\", \"techgoda.net\", \"example-hoster.com\"],\n    strictSubdomains: false\n    sites: ['jobs']\n  },\n})\n```\n\n\n6. If you want to custom domain for each tenant route, configure the `customDomains` property a map with key of domain and value of mapping tenant route. For example: `nuxtnews.com` to `news` route.\n\n```js\nexport default defineNuxtConfig({\n  modules: ['nuxt-multi-tenancy'],\n  multiTenancy: {\n    tenantDynamicRoute: 'site',\n    rootDomains: [\"nuxtdev.local\", \"techgoda.net\"],\n    customDomains: {\n      \"nuxtnews.com\": \"news\"\n    }\n  },\n})\n```\n\n## Options\n\nConfigure Nuxt Multi-tenancy module with the `multiTenancy` property.\n\n```js\nexport default defineNuxtConfig({\n  modules: ['nuxt-multi-tenancy'],\n  // default options\n  multiTenancy: {\n    tenantDynamicRoute: 'site',\n    rootDomains: [\"nuxtdev.local\", \"techgoda.net\"],\n    strictSubdomains: true,\n    sites: [],\n    customDomains: {},\n  },\n})\n```\n\n## useTenant composition API\n\nUse useTenant() to get the tenant ID\n\n```js\nimport { useTenant } from '#imports'\nconst tenant = useTenant()\n```\n\n\n## Development\n\n```bash\n# Install dependencies\nyarn install\n\n# Generate type stubs\nyarn dev:prepare\n\n# Develop with the playground\nyarn dev\n\n# Build the playground\nyarn dev:build\n\n# Run ESLint\nyarn lint\n\n# Run Vitest\nyarn test\nyarn test:watch\n\n# Release new version\nyarn release\n```\n\n## Demo\n\nYou can view the demo at [techgoda.net](https://techgoda.net)\n\nFeatures:\n\n- A home page to list top first 30 articles from dev.to\n- Tenant detail page. For example: [The Dev Team organization](https://dnse.techgoda.net)\n- A custom static tenant page.\n- An article detail page\n\n\n\n## Contributing\n\n- [Open an issue](https://github.com/hieuhani/nuxt-multi-tenancy/issues) if you believe you've encountered a bug with the module.\n\n## License\n\n[MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhieuhani%2Fnuxt-multi-tenancy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhieuhani%2Fnuxt-multi-tenancy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhieuhani%2Fnuxt-multi-tenancy/lists"}