Repository navigation
Add tenant management module with multi-host resolution - #32
Merged
Merged
Conversation
antosubash
force-pushed
the
claude/tenant-management-plan-7T0E7
branch
from
March 30, 2026 19:24
74117d2 to
89eea29
Compare
Deploying simplemodule-website with
|
| Latest commit: |
ce20932
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cb25754c.simplemodule-website.pages.dev |
| Branch Preview URL: | https://claude-tenant-management-pla.simplemodule-website.pages.dev |
antosubash
force-pushed
the
claude/tenant-management-plan-7T0E7
branch
from
March 30, 2026 19:27
89eea29 to
6fbbe2a
Compare
…lag integration - New Tenants module: CRUD for tenants with name, slug, status, admin email, edition, connection string, and validity period - Multi-host support: each tenant can have multiple hostnames, resolved via TenantResolutionMiddleware (hostname → header → claim priority) - Implements ITenantContext from Core, enabling the framework's built-in multi-tenant entity filtering for all modules that opt in - Extends FeatureFlags OverrideType with Tenant (=2) so feature flags can be toggled per-tenant from the tenant management UI - React pages: Browse, Manage, Create, Edit (with host management), Features (per-tenant feature flag toggles) - Seed data: 3 tenants with hosts for local development - 22 unit tests covering service CRUD, host management, and validators
- Remove unused Bogus dependency from production csproj - Fix N+1 override queries: use Task.WhenAll for parallel flag override fetching - Cache HostNameTenantResolver with GetOrCreateAsync to prevent thundering herd - Lazy-cache ITenantContext resolution in FeatureFlagService (avoid per-call GetService) - Strip sensitive fields from anonymous Browse endpoint (project only public fields) - Reduce unnecessary Include(Hosts) in UpdateTenantAsync/ChangeStatusAsync - Collapse GetTenantByHostNameAsync to single query via navigation property - Remove unnecessary inline comments from TenantResolutionMiddleware
antosubash
force-pushed
the
claude/tenant-management-plan-7T0E7
branch
from
March 30, 2026 19:40
6fbbe2a to
760a967
Compare
- Use CrudEndpoints.Delete in RemoveHostEndpoint instead of manual implementation - Extract TenantFeatureHelper for shared override fetching logic (dedup 2 endpoints + 1 view) - Import Tenant/TenantHost types from generated types.ts instead of redeclaring inline - Extract statusLabels/statusColors to shared tenantStatus.ts
antosubash
force-pushed
the
claude/tenant-management-plan-7T0E7
branch
from
March 30, 2026 20:25
5bf0155 to
ce20932
Compare
1 task done
antosubash
added a commit
that referenced
this pull request
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TenantResolutionMiddleware(hostname → header → claim priority chain)ITenantContextfrom Core framework, enabling the built-in multi-tenant entity filtering (IMultiTenant,ApplyMultiTenantFilters) for all modules that opt inOverrideTypeenum withTenant = 2, adds tenant-level feature flag management UI and API endpointsTest plan
dotnet build— zero errors/warningsdotnet test(Tenants 22/22, FeatureFlags 14/14, Products 39/39) — all passnpm run build— frontend buildsnpm run check— Biome lint/format cleannpm run validate-pages— all view endpoints registered/tenants/manage, create/edit/delete tenants