Implemented product-based host routing for the staff application, replacing tenant/company-based URLs.
Configured product hosts:
Updated login flow to redirect users based on subscribed modules instead of the tenant URL.
Company (tenant) information is now maintained in the session, while the URL represents the subscribed product(s).
Updated sidebar and route protection to display only modules allowed by the current product host and subscription plan.
Added deep-link validation to prevent unauthorized module access through direct URLs.
Kept the NexShop storefront running separately on port 5174 (`{tenant}.localhost:5174`) while staff applications continue on port 5173.
Moved application ports and domain configuration to `.env` (`VITE_ECOMMERCE_APP_PORT` and related URLs) for easier environment management.
Fixed login loop issue caused by product hosts being incorrectly identified as tenant hosts.
Updated Landing page Login button to redirect users to Accounts (`accounts.localhost:5180/login`) instead of `/dashboard`.
Updated architecture documentation, task matrix, environment configuration, and `.env.example` to reflect the new product-based routing.
`pos.localhost:5173`
`landscaping.localhost:5173`
`shop.localhost:5173`
`posls.localhost:5173`
`store.localhost:5173`
`lanscom.localhost:5173`
`superset.localhost:5173`
Outcome
Successfully migrated the application toward a product-first architecture, where users access the correct application based on their subscribed products, navigation is restricted appropriately, login routing is simplified, and the customer storefront remains independent from staff applications.