Skip to content

Add comprehensive tenancy package documentation to boost resources#1461

Open
eramitgupta wants to merge 5 commits into
archtechx:masterfrom
eramitgupta:master
Open

Add comprehensive tenancy package documentation to boost resources#1461
eramitgupta wants to merge 5 commits into
archtechx:masterfrom
eramitgupta:master

Conversation

@eramitgupta
Copy link
Copy Markdown

@eramitgupta eramitgupta commented May 28, 2026

Summary

Adds Laravel Boost skill resources for stancl/tenancy.

Notes

  • this is documentation-only
  • no runtime package code was changed

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive Laravel Tenancy docs set: guidelines, skill entry, and reference pages covering installation, configuration, context API, bootstrappers ordering, database tenancy strategies (incl. RLS), routing & asset handling, tenant identification, lifecycle jobs, migrations/commands, resource syncing, impersonation, optional features, testing guidance, and operational rules/checklists for tenancy implementations.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds comprehensive documentation for the stancl/tenancy Laravel package: a consolidated site-level guidelines page, a user-facing skill guide, a package-level reference, and 17 focused reference pages covering installation, configuration, identification, routing, database isolation, models, context API, lifecycle jobs, features, integrations, and testing.

Changes

Tenancy Laravel Documentation

Layer / File(s) Summary
Consolidated guidelines and user workflow
resources/boost/guidelines/core.blade.php, resources/boost/skills/laravel-tenancy/SKILL.md
Site-level guidelines and a skill page with metadata, installation workflow, tenant identification options, context helpers, bootstrapper guidance, routing/asset rules, model guidance, commands, optional features, and testing verification points.
Package architecture, installation, and configuration foundation
resources/boost/skills/laravel-tenancy/references/package.md, resources/boost/skills/laravel-tenancy/references/installation.md, resources/boost/skills/laravel-tenancy/references/configuration.md, resources/boost/skills/laravel-tenancy/references/bootstrappers.md
Package-level reference describing TenancyServiceProvider behavior, runtime API, published assets, installation steps, configuration checklist, and bootstrapper ordering/usage rules.
Request flow, routing, and data layer
resources/boost/skills/laravel-tenancy/references/identification.md, resources/boost/skills/laravel-tenancy/references/routing-assets.md, resources/boost/skills/laravel-tenancy/references/models-domains.md, resources/boost/skills/laravel-tenancy/references/database-tenancy.md, resources/boost/skills/laravel-tenancy/references/rls.md
Tenant identification middleware/resolver categories and rules, tenant routing and asset route behavior, tenant/domain model conventions, database isolation options, and PostgreSQL RLS guidance.
Runtime API, context management, and infrastructure scoping
resources/boost/skills/laravel-tenancy/references/context-api.md, resources/boost/skills/laravel-tenancy/references/features.md, resources/boost/skills/laravel-tenancy/references/filesystem-cache-queue.md
Context API entry points and semantics, optional feature system guarantees, and tenant-aware scoping for filesystem, cache/Redis, sessions, and queue job behavior.
Lifecycle operations, advanced features, and extensions
resources/boost/skills/laravel-tenancy/references/lifecycle-jobs.md, resources/boost/skills/laravel-tenancy/references/migrations-commands.md, resources/boost/skills/laravel-tenancy/references/impersonation.md, resources/boost/skills/laravel-tenancy/references/pending-tenants.md, resources/boost/skills/laravel-tenancy/references/resource-syncing.md, resources/boost/skills/laravel-tenancy/references/integrations.md
Tenant lifecycle job pipelines and events, tenant-aware migration/command lists and rules, impersonation setup and token purge, pending-tenant behavior, central→tenant resource syncing, and integration wiring.
Testing guidelines and validation
resources/boost/skills/laravel-tenancy/references/testing.md
Testing guidance for installation validation, central vs tenant route access, identification edge cases, context restoration, subsystem scoping, lifecycle jobs, and verification of tenant-scoped artisan commands.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit read the docs by night,
Tenants neatly set to right.
Pages, checks, and guides in tune—
Hopping through a tidy lune. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately describes the main change: adding comprehensive tenancy package documentation to the boost resources directory.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@resources/boost/skills/tenancy/references/package.md`:
- Around line 295-326: The reference lists two inconsistent command names
(`tenants:create-user-with-rls-policies` vs `tenants:rls`); pick a single
canonical name (e.g., `tenants:rls`) and update all occurrences so both the
bullet command list and the notes section use that same symbol; ensure any
explanatory text that mentions creating the RLS user or policies references the
chosen command (`tenants:rls` or `tenants:create-user-with-rls-policies`)
consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 91f7b086-179d-406f-98e7-b4c893e9f9d3

📥 Commits

Reviewing files that changed from the base of the PR and between da7eb94 and a800170.

📒 Files selected for processing (2)
  • resources/boost/skills/tenancy/SKILL.md
  • resources/boost/skills/tenancy/references/package.md

Comment thread resources/boost/skills/tenancy/references/package.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.90%. Comparing base (da7eb94) to head (656bcda).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1461   +/-   ##
=========================================
  Coverage     85.90%   85.90%           
  Complexity     1170     1170           
=========================================
  Files           185      185           
  Lines          3412     3412           
=========================================
  Hits           2931     2931           
  Misses          481      481           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@resources/boost/guidelines/core.blade.php`:
- Line 776: Update the documentation entry that currently shows the wrong
Artisan command name "tenant:dump" to the correct command "tenants:dump"; search
for any other occurrences of "tenant:dump" in the same template and replace them
with "tenants:dump" so the example matches the package command referenced in the
PR.

In `@resources/boost/skills/tenancy/references/installation.md`:
- Around line 22-49: Update the numbered ordered list in the installation steps
so every list item uses "1." (rather than mixing numbering styles) to satisfy
markdownlint MD029; specifically change the step numbers for the sequence that
includes the installer command "php artisan tenancy:install --no-interaction",
the confirmation list of files (`config/tenancy.php`, `routes/tenant.php`,
`app/Providers/TenancyServiceProvider.php`, migration filenames and
`database/migrations/tenant`), the "Review `config/tenancy.php`" line, the "Run
central migrations" block (`php artisan migrate`), and subsequent steps ("Add
tenant migrations...", "Create tenants and domains...", "Run tenant migrations")
so each step begins with "1." for consistent, lint-compliant numbering.

In `@resources/boost/skills/tenancy/references/migrations-commands.md`:
- Around line 35-40: Update the documented Artisan command name in the snippet:
change the incorrect "php artisan tenant:dump" to the correct "php artisan
tenants:dump" so the commands list uses "php artisan tenants:run cache:clear",
"php artisan tenant:tinker", "php artisan tenants:list", and "php artisan
tenants:dump" (fix the single-line entry referring to tenant:dump to
tenants:dump).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 70126611-d45e-4b9c-ac86-18868dc10fda

📥 Commits

Reviewing files that changed from the base of the PR and between c94c0cd and fde2bf0.

📒 Files selected for processing (21)
  • resources/boost/guidelines/core.blade.php
  • resources/boost/skills/tenancy/SKILL.md
  • resources/boost/skills/tenancy/references/bootstrappers.md
  • resources/boost/skills/tenancy/references/configuration.md
  • resources/boost/skills/tenancy/references/context-api.md
  • resources/boost/skills/tenancy/references/database-tenancy.md
  • resources/boost/skills/tenancy/references/features.md
  • resources/boost/skills/tenancy/references/filesystem-cache-queue.md
  • resources/boost/skills/tenancy/references/identification.md
  • resources/boost/skills/tenancy/references/impersonation.md
  • resources/boost/skills/tenancy/references/installation.md
  • resources/boost/skills/tenancy/references/integrations.md
  • resources/boost/skills/tenancy/references/lifecycle-jobs.md
  • resources/boost/skills/tenancy/references/migrations-commands.md
  • resources/boost/skills/tenancy/references/models-domains.md
  • resources/boost/skills/tenancy/references/package.md
  • resources/boost/skills/tenancy/references/pending-tenants.md
  • resources/boost/skills/tenancy/references/resource-syncing.md
  • resources/boost/skills/tenancy/references/rls.md
  • resources/boost/skills/tenancy/references/routing-assets.md
  • resources/boost/skills/tenancy/references/testing.md

Comment thread resources/boost/guidelines/core.blade.php Outdated
Comment thread resources/boost/skills/tenancy/references/installation.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant