When remoteApiToken is empty, sign SuperAdmin→product /super/settings
with the same SMS_REMOTE_SHARED_SECRET + domain headers used by SMS.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add Tenant.serverAccessBlocked, toggle API with appVersion bump and settings push, and expose stealth server_reachable in get_user.
Co-authored-by: Cursor <cursoragent@cursor.com>
Local Vite frontends can call production adm.montzar.ir get_user/get_version without running a local API.
Co-authored-by: Cursor <cursoragent@cursor.com>
Appearance/avatar/name/uiVariant updates auto-increment Tenant.appVersion so clients refetch get_user only after get_version changes.
Co-authored-by: Cursor <cursoragent@cursor.com>
When multiple tenants claim the same host via domains aliases, resolve the tenant whose primary domain matches first so branding edits apply to the expected version.
Co-authored-by: Cursor <cursoragent@cursor.com>
Serve PWA/APK web manifest per domain (name, theme colors, multi-size icons from avatar), exclude from api prefix, and proxy via nginx.
Co-authored-by: Cursor <cursoragent@cursor.com>
Drop unique tenant_id on server_accounts and add create/update/delete/renew APIs per server account, with list/expiring using the worst status.
Co-authored-by: Cursor <cursoragent@cursor.com>
Products can authenticate with one shared secret and tenant domain instead of per-version tokens; Bearer token remains as fallback.
Co-authored-by: Cursor <cursoragent@cursor.com>
Mirrors Hamkar so each khanegi tenant can restore its factory ui-config without exposing defaultSnapshot publicly.
Co-authored-by: Cursor <cursoragent@cursor.com>
Includes mobile auth, get_user/get_version, SMS wallet parity endpoints, appearance backfill, and related Prisma migrations.
Co-authored-by: Cursor <cursoragent@cursor.com>