Added a development environment that allows developers to easily run the project locally #4
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.
Development Environment Tenant Selection System - Summary
What Was Added
I've implemented a development tenant selection system that allows developers to easily switch between organizations during local development without needing subdomain
routing.
The Problem It Solves
Before:
Now:
Key Features
- When you visit the app without a selected tenant, you're automatically redirected to the selection page
- Once you select an organization, it's remembered in your session
- Wide cards with prominent borders showing all organizations
- Each card displays: organization name, subdomain, and number of branches
- Hover effects with pointer cursor for clear interactivity
- Active tenant is clearly marked with a badge
- Loading states when switching organizations
- Visit /select-tenant anytime to switch organizations
- Clear current selection option available
- No page reloads needed after selection
- Only activates when APP_ENV=local
- In production, the system is completely bypassed
- Production continues using subdomain-based routing
Technical Implementation
New Files Added:
Routes Added:
How It Works:
Benefits for Development Team
How Developers Use It
This system makes local development much smoother and removes the complexity of managing subdomains while keeping production behavior unchanged.