Initial commit: Meshkee dashboards monorepo.

Includes business, customer, and super-admin apps with shared packages and production deploy scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-07-22 13:48:53 +03:30
co-authored by Cursor
commit f566387c61
509 changed files with 62690 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
import {
CUSTOMER_SUBDOMAIN_PREFIX,
getBaseDomainFromHost,
getCustomerDashboardHost,
isCustomerDashboardHost,
} from '@meshkee/dashboard-core'
export { CUSTOMER_SUBDOMAIN_PREFIX }
/** Base tenant domain without customer. prefix (e.g. sanihome.ir). */
export function getBaseBusinessDomain(hostname = window.location.hostname): string {
return getBaseDomainFromHost(hostname, import.meta.env.VITE_BUSINESS_DOMAIN)
}
/** Expected customer dashboard host (e.g. customer.sanihome.ir). */
export function getCustomerDashboardHostForApp(baseDomain?: string): string {
return getCustomerDashboardHost(baseDomain ?? getBaseBusinessDomain())
}
export function isAllowedCustomerHost(hostname = window.location.hostname): boolean {
const host = hostname.toLowerCase().trim()
if (host === 'localhost' || host === '127.0.0.1') {
return true
}
return isCustomerDashboardHost(host)
}
/** Domain sent to tenant resolution and customer registration APIs. */
export function getTenantDomain(): string {
return getBaseBusinessDomain()
}