SKILL.md
Vendix Frontend Domain
Source of Truth
apps/frontend/src/app/core/services/app-config.service.tsapps/frontend/src/app/core/models/domain-config.interface.tsapps/frontend/src/app/core/models/environment.enum.ts- Route files under
apps/frontend/src/app/routes/
Current Model
AppConfigService is async and builds an AppConfig object through setupConfig() and detectDomain(). It does not expose the old BehaviorSubject domain_config$$ pattern documented in legacy guidance.
It currently:
- resolves the domain through
${environment.apiUrl}/public/domains/resolve/${hostname} - decides effective environment from domain config plus cached authenticated user environment
- builds public/private routes dynamically
- transforms branding through
ThemeService - caches app config and user environment in localStorage
DomainConfig Reality
Current config includes fields such as:
environmentdomainTypeorganization_slugstore_slugorganization_idstore_idstorelogourlisVendixDomainisMainVendixDomaincustomConfig, which can includebrandingandcurrency
Rules
- For new domain/app behavior, update
AppConfigServiceand the route maps rather than creating duplicate domain-config services. - Treat app environment as the primary frontend router switch.
- Keep branding resolution centralized in
ThemeService. - Preserve SSR/browser guards already present in
detectDomain()and theme setup.
Related Skills
vendix-app-architecturevendix-frontend-routingvendix-frontend-theme