{"id":31271775,"url":"https://github.com/basecamp/activerecord-tenanted","last_synced_at":"2025-10-09T05:19:40.313Z","repository":{"id":313219547,"uuid":"878634828","full_name":"basecamp/activerecord-tenanted","owner":"basecamp","description":"Enable a Rails application to have separate databases for each tenant.","archived":false,"fork":false,"pushed_at":"2025-09-29T09:07:49.000Z","size":586,"stargazers_count":368,"open_issues_count":7,"forks_count":12,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-09-30T10:38:37.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/basecamp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"MIT-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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-25T18:54:56.000Z","updated_at":"2025-09-30T09:32:10.000Z","dependencies_parsed_at":"2025-09-04T17:30:57.820Z","dependency_job_id":"061de67d-015c-40e9-a9bb-bb8c928cb8a6","html_url":"https://github.com/basecamp/activerecord-tenanted","commit_stats":null,"previous_names":["basecamp/activerecord-tenanted"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/basecamp/activerecord-tenanted","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Factiverecord-tenanted","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Factiverecord-tenanted/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Factiverecord-tenanted/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Factiverecord-tenanted/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basecamp","download_url":"https://codeload.github.com/basecamp/activerecord-tenanted/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Factiverecord-tenanted/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278687116,"owners_count":26028431,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-09-23T20:02:13.088Z","updated_at":"2025-10-09T05:19:40.303Z","avatar_url":"https://github.com/basecamp.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# ActiveRecord::Tenanted\n\nEnable a Rails application to host multiple isolated tenants.\n\n\u003e [!NOTE]\n\u003e Only the sqlite3 database adapter is fully supported right now. If you have a use case for tenanting one of the other databases supported by Rails, please reach out to the maintainers!\n\n## Summary\n\n### What is \"multi-tenancy\"?\n\nA \"multi-tenant application\" can be informally defined as:\n\n\u003e ... a single instance of a software application (and its underlying database and hardware)\n\u003e serv[ing] multiple tenants (or user accounts).\n\u003e\n\u003e A tenant can be an individual user, but more frequently, it’s a group of users — such as a\n\u003e customer organization — that shares common access to and privileges within the application\n\u003e instance. Each tenant’s data is isolated from, and invisible to, the other tenants sharing the\n\u003e application instance, ensuring data security and privacy for all tenants.\n\u003e\n\u003e -- [IBM.com, \"What is multi-tenant?\"](https://www.ibm.com/think/topics/multi-tenant)\n\nThis gem's design is rooted in a few guiding principles in order to safely allow multiple tenants to share a Rails application instance:\n\n- Data \"at rest\" is persisted in a separate store for each tenant's data, isolated either physically or logically from other tenants.\n- Data \"in transit\" is only sent to users with authenticated access to the tenant instance.\n- All tenant-related code execution must happen within a well-defined isolated tenant context with controls around data access and transmission.\n\n\n### Making it dead simple.\n\nAnother guiding principle, though, is:\n\n- Developing a multi-tenant Rails app should be as easy as developing a single-tenant app.\n\nYour code shouldn't have to know about tenanting! The hope is that you will rarely need to think about managing tenant isolation, and that as long as you're following Rails conventions, this gem and the framework will keep your tenants' data safe.\n\nThis gem extends or integrates tightly with Rails to ensure that any data persisted or transmitted happens within an isolated tenant context — without developers having to think about it.\n\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```bash\nbundle add activerecord-tenanted\n```\n\n\n## Usage\n\nFor detailed configuration and usage, see [GUIDE.md](./GUIDE.md).\n\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/basecamp/activerecord-tenanted. The tests are split between:\n\n- fast unit tests run by `bin/test-unit`\n- slower integration tests run by `bin/test-integration`\n\nFor a full test feedback loop, run `bin/ci`.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Factiverecord-tenanted","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasecamp%2Factiverecord-tenanted","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Factiverecord-tenanted/lists"}