Show Arvan DNS errors when adding a domain in super-admin.

Add-domain now reports dnsError from the API and documents that tenant records are written in Arvan automatically.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-14 11:16:36 +03:30
co-authored by Cursor
parent c16ec3787b
commit 8e8929050e
3 changed files with 18 additions and 9 deletions
+14 -4
View File
@@ -851,6 +851,7 @@ export function BusinessesPage() {
deploySlug?: string | null
gitRepoUrl?: string | null
provisionError?: string | null
dnsError?: string | null
}
setData((prev) => {
if (!prev) return prev
@@ -875,12 +876,16 @@ export function BusinessesPage() {
if (updated.provisionError) {
showToast(`Domain updated to "${host}", but storefront setup failed.`, 'error')
showToast(updated.provisionError, 'error')
} else if (gitRepoUrl && updated.deploySlug) {
}
if (updated.dnsError) {
showToast(`Domain updated to "${host}", but Arvan DNS failed.`, 'error')
showToast(updated.dnsError, 'error')
} else if (!updated.provisionError && gitRepoUrl && updated.deploySlug) {
showToast(
`Domain updated. Storefront deploy is ready on Websites.`,
'success',
)
} else {
} else if (!updated.provisionError) {
showToast(`Domain updated to "${host}".`, 'success')
}
} else {
@@ -895,6 +900,7 @@ export function BusinessesPage() {
deploySlug?: string | null
gitRepoUrl?: string | null
provisionError?: string | null
dnsError?: string | null
}
setData((prev) => {
if (!prev) return prev
@@ -921,12 +927,16 @@ export function BusinessesPage() {
if (created.provisionError) {
showToast(`Domain "${host}" added, but storefront setup failed.`, 'error')
showToast(created.provisionError, 'error')
} else if (gitRepoUrl && created.deploySlug) {
}
if (created.dnsError) {
showToast(`Domain "${host}" added, but Arvan DNS failed.`, 'error')
showToast(created.dnsError, 'error')
} else if (!created.provisionError && gitRepoUrl && created.deploySlug) {
showToast(
`Domain "${host}" added. Storefront deploy is ready on Websites.`,
'success',
)
} else {
} else if (!created.provisionError) {
showToast(`Domain "${host}" added.`, 'success')
}
}
+2 -3
View File
@@ -13,9 +13,8 @@ API: `https://api.meshkee.com/api/v1` (separate server).
## New tenant SSL (automatic)
1. Add business + domain in Super Admin (apex, e.g. `sanihome.ir`)
2. Add Arvan **A** records (DNS-only): `business` + `customer` → dashboards VPS IP
3. In Super Admin → **Websites** → **Sync SSL now** (or wait for cron ~2h)
1. Add business + domain in Super Admin (apex, e.g. `sanihome.ir`). The API writes Arvan records on that zone (`@` ANAME → `ns.meshkee.com`, `www` CNAME → the apex, plus `business` / `customer` / `api` CNAMEs to Meshkee hosts). The domain must already exist in Arvan.
2. In Super Admin → **Websites** → **Sync SSL now** (or wait for cron ~2h)
Manual on the VPS: `sudo /opt/meshkee/dashboards/deploy/ssl-sync.sh`
+2 -2
View File
@@ -3,7 +3,7 @@
> **For AI agents:** Read this file at the start of a new chat before making changes.
> Update this document when a major feature is completed or architecture changes.
Last updated: August 13, 2026
Last updated: August 14, 2026
---
@@ -138,7 +138,7 @@ Add to `/etc/hosts` (one line per tenant):
|------|------|
| `/login` | Login |
| `/` | Home |
| `/businesses` | Businesses list (migrate-from-old + delete-data for portfolios/blogs(+news)/customers + categories; single-select). **Add domain** accepts optional Git repo URL → provisions storefront on websites VM and sets `deploy_slug` |
| `/businesses` | Businesses list (migrate-from-old + delete-data for portfolios/blogs(+news)/customers + categories; single-select). **Add domain** accepts optional Git repo URL → provisions storefront on websites VM and sets `deploy_slug`. Also upserts Arvan DNS (`@` ANAME → `ns.meshkee.com`, `www` CNAME → apex, `business`/`customer`/`api` CNAMEs). |
| `/businesses/:businessId/invoices` | Business invoices list |
| `/businesses/:businessId/invoices/new` | Issue invoice (full page) |
| `/users` | Users (business filter: Customer vs Manager → Admin/Editor/Viewer; Admin assignable by super-admin only; owners locked) |