Commit Graph
117 Commits
Author SHA1 Message Date
Alireza HassaniandCursor 5e7bdc0cf2 Use SPF v=spf1 mx -all for Email DNS upserts.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 11:29:53 +03:30
Alireza Hassani 19c0ea25e1 Fix Arvan mail A record value to array of IPs
Arvan CDN 4.0 rejects A creates when value is a single { ip } object
(422: value must be an array). Send [{ ip }] and compare listed A
values as arrays so ensureMailRecords no longer fails before DKIM.
2026-09-18 10:56:32 +03:30
Alireza Hassani 95d851f9dd Accept value-only DKIM TXT pastes for Email DNS
Allow v=DKIM1… pastes without a zone name by taking an optional
selector hint so Arvan/Cloudflare still get the right _domainkey record.
2026-09-18 10:38:06 +03:30
Alireza HassaniandCursor b7ca306097 Count page views once per load and skip known bots.
Stop auto-counting list APIs and homepage sliders, track static pages via pageKey, and add store-specials AI list matching.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 17:33:44 +03:30
Alireza HassaniandCursor 6517877bed Use id+slug paths for user products and count their visits.
Align storefront/sitemap URLs with catalog products, add by-id public APIs, and include user-product detail views in the product visit chart.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 15:35:46 +03:30
Alireza HassaniandCursor 3aef62c1b8 Add business gallery API and marketplace profile fields.
Expose list/add/remove gallery endpoints via media_attachments, plus profile title, banner, and category tag/nameFa support needed by the marketplace dashboard.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 14:41:32 +03:30
Alireza HassaniandCursor d68ef2d08a Add business profile AI fill endpoint for abstract and description.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 09:36:06 +03:30
Alireza HassaniandCursor aaf7a83742 Add Schema.org JSON-LD, SEO meta overrides, and resilient bulk SMS.
Expose Organization/LocalBusiness and Product/BlogPosting jsonLd, optional seoMeta fields on content/categories, and continue mass SMS after per-recipient failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 23:30:24 +03:30
Alireza HassaniandCursor db305c58a4 Allow creating customers with only first or last name.
Password stays optional; missing password gets a random hash server-side.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 12:32:18 +03:30
Alireza HassaniandCursor a2dacfdc97 Track SMS sent counts by type (mass, singular, auth, auto, admin).
Charge/refund bump the matching counter plus total; expose smsSentByType on business APIs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 11:31:17 +03:30
Alireza HassaniandCursor 717a203d48 Fix SMS billing build and make credit conversion idempotent.
Import the purchase-price constant for Nest build, and only convert IRT-scale balances so migrate re-runs do not divide credits again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 11:12:27 +03:30
Alireza HassaniandCursor 584c01fcee Switch SMS billing to credit units with IRT top-ups.
Balance is SMS credits (1 per 64 chars); top-ups add floor(IRT/500) credits, track sms_sent_count, and convert existing IRT balances.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 11:10:22 +03:30
Alireza HassaniandCursor 07f3304c07 Fix advertising SMS shortcode to 5000990009.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 17:43:24 +03:30
Alireza HassaniandCursor 4a1d60dbef Add SMS templates, prepaid IRT billing, and advertising shortcode 9000590009.
Charge ceil(len/64)*400 IRT per recipient across OTP, customer, and partner SMS; seed new businesses with 500k IRT; default partner sends to the advertising line.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 16:24:15 +03:30
Alireza HassaniandCursor 4623061a4f Update PROJECT_CONTEXT sitemap path docs for slug-based content URLs.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 14:53:07 +03:30
Alireza HassaniandCursor 9a020d748d Align storefront content URLs with live slug-based routes.
Use /blog/{slug}, /portfolio/{slug}, and /instruction/{slug} in sitemap defaults and emit CMS slugs for blogs/portfolios instead of title-derived paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 14:51:12 +03:30
Alireza HassaniandCursor 4823cf97f6 Require Next.js standalone output in website AI prompt and deploy.
Document mandatory output: "standalone" for shared-VM RAM, and align websites-agent deploy to prefer .next/standalone/server.js.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 14:21:44 +03:30
Alireza HassaniandCursor b1dcecc468 Add customer Excel import/export and Gama bulk SMS sending.
Business SMS uses optional settings.sms.senderNumber (else advertising shortcode) with SendQuick for one recipient and SendBulk for quantity.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 14:12:48 +03:30
Alireza HassaniandCursor cf459807d8 Document storefront mini-cart and customer-dashboard checkout.
Website agents must add variants to a local guest cart and redirect to customer.{domain} for login and checkout instead of building those pages on the shop.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-06 08:55:11 +03:30
Alireza HassaniandCursor 5c701d0841 Use Node http for long storefront deploys instead of undici.
This API VM's Node 20 build has no node:undici, so require() crash-looped the process and took login down.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 15:51:07 +03:30
Alireza HassaniandCursor 53fe8b72bd Allow storefront deploys to wait up to 30 minutes.
Node fetch was aborting at undici's 5-minute headers timeout, so Super Admin marked long npm ci / next builds as failed while the websites VM was still compiling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 15:22:23 +03:30
Alireza HassaniandCursor d14f91a606 Add catalog EN/AR translations with AI translate-all by locale.
Store product/category translations in entity_translations, expose CMS APIs, and gate the MultiLanguage Data module for businesses.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 09:51:11 +03:30
Alireza HassaniandCursor 42cf29bc4e Add Torob Product API v3 for store-module sites with a store setting to enable it.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 15:26:23 +03:30
Alireza HassaniandCursor 6f1b13b6dc Add Email DNS upsert for Stalwart DKIM, MX, and SPF.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 22:00:04 +03:30
Alireza HassaniandCursor 6b8073f998 Expose visit summary totals for the Statistics dashboard.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 11:10:52 +03:30
Alireza HassaniandCursor f42e6fe2a4 Allow add/edit domain to upsert tenant DNS on Cloudflare or Arvan.
Update DNS writes @, www, business, customer, and api records on the chosen provider instead of Arvan only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 18:46:48 +03:30
Alireza HassaniandCursor d1f60b5313 Add parked alias domains with Arvan or Cloudflare DNS and websites SSL.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 18:09:09 +03:30
Alireza HassaniandCursor 5813e9fc53 Allow adding or editing a storefront git repo from the Websites domain editor.
Provision uses the same websites-VM agent as Businesses; DNS still goes through Arvan ensureTenantRecords.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 16:32:20 +03:30
Alireza HassaniandCursor cda901d049 Probe tenant dashboard TLS via business/customer.meshkee.com.
The API VM resolver often NXDOMAINs business.* / customer.* CNAMEs even when the certs are valid, which made the SSL button always fail after a successful issue.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 16:32:10 +03:30
Alireza HassaniandCursor dcf8b6423a Drop the domain from public AI prompt URLs.
Copied links now use business name and prompt name only; old host-prefixed URLs still resolve.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 16:19:45 +03:30
Alireza HassaniandCursor 73588db1c6 Keep product migrate from crashing the API on large image copies.
PM2 was restarting at 512MB while Sharp cached buffers, which returned 502 to the migrate UI after categories had already succeeded.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 15:02:40 +03:30
Alireza HassaniandCursor a5f2f8d63b Fix SSL list badges, labeled AI prompt URLs, and product-category migrate.
Storefront SSL now follows apex expiry instead of requiring www, prompt links include domain and prompt name, and extra color variations merge instead of aborting migrate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 14:47:10 +03:30
Alireza HassaniandCursor e37cb4a20d Stop storefront deploys from inheriting the agent PORT and leftover standalone cwd.
pm2 restart --update-env leaked PORT=9050 onto Next sites and left nginx 502 when a build dropped standalone output.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 09:41:37 +03:30
Alireza HassaniandCursor 0c1c3f7ff9 Add AI English name translation and aggregate website view analytics.
Website views chart uses kind=all across page kinds; home hits also count static-images loads.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 20:39:37 +03:30
Alireza HassaniandCursor 0d9c2fd8ea Add published user products to the storefront sitemap.
Expose /sitemap-user-products.xml when customer_products is enabled, invalidate on listing mutations, and proxy the new path from nginx provision scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 07:16:05 +03:30
Alireza HassaniandCursor fb04425df7 Clarify technical-info docs and ship pending owner/color fixes.
Document that product specs need /technical-info for labels, auto-verify admin-created business owners, and expand category color presets with Farsi aliases.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 06:46:28 +03:30
Alireza HassaniandCursor 3d3abeb65b Patch sitemap SEO proxies on both HTTP and HTTPS nginx blocks.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 19:10:15 +03:30
Alireza HassaniandCursor 730407ec3a Split blogs and other modules into child sitemaps.
Move blogs, portfolios, videos, instructions, and workshops out of sitemap-main into dedicated files like products, and allow saving migrated Farsi category color labels without wiping store-item links.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 19:02:38 +03:30
Alireza HassaniandCursor 5850c90d84 Re-provision storefront nginx when domain host is renamed.
Also create origin HTTPS with a self-signed cert on provision so Cloudflare Full does not fall through to another site's default SSL vhost.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:31:56 +03:30
Alireza HassaniandCursor cbe7aced6d Serve public AI prompts as plain text.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:47:27 +03:30
Alireza HassaniandCursor 91a20a89d6 Add public AI prompt templates for websites.
Manage reusable templates in Super Admin, attach editable per-site prompts with Meshkee API public links that require no auth.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:28:41 +03:30
Alireza HassaniandCursor 4db9c7709d Default annual renewal to business created date.
Backfill null renewals from created_at and use now when create omits the date.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 10:33:26 +03:30
Alireza HassaniandCursor 92601ae729 Add page-view analytics, product counters, SSL expiry, and business renewal.
Auto-count storefront page views with 6-month event retention and lifetime counters, track product visit/cart/sale stats, persist SSL cert expiry with daily probes, and support owner titles plus annual contract renewal.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 10:13:06 +03:30
Alireza HassaniandCursor 6cd0b009ef Call per-tenant dashboard SSL agent when issuing domain SSL.
Issue SSL on one domain now passes tenantApex to the dashboards agent instead of renewing the shared multi-tenant cert.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 01:20:03 +03:30
Alireza HassaniandCursor 3f266a2dcb Add website view analytics for dashboard traffic charts.
Track storefront views via POST /tenants/{domain}/analytics/views, expose business activity API, and add product/website/portfolio/blog 30-day chart types for super-admin selection.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 01:12:44 +03:30
Alireza HassaniandCursor b8f60c5141 Skip dashboard SSL hosts without DNS and shorten sync errors.
Dashboard cert renewal no longer fails when unrelated tenants lack business/customer DNS records; Issue SSL errors summarize blocked hostnames instead of dumping certbot logs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 00:55:58 +03:30
Alireza HassaniandCursor ead16080b8 Add website favicon API and manual favicon profile updates.
Expose GET /tenants/{domain}/website/favicon for storefront tab icons, allow faviconMediaId on profile PATCH, and sync website API docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 00:51:11 +03:30
Alireza HassaniandCursor 6ce6f959ac Add dark-mode business logo, payment order steps, and Arvan DNS diagnostics.
Store logo_dark_media_id on businesses, expose logoDarkUrl on tenant/website APIs, prepend awaiting-payment steps to order workflows, and surface clearer Arvan API network errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 00:21:46 +03:30
Alireza HassaniandCursor e942348b1d Route payment bank callbacks through storefront domains.
ZarinPal rejects api.meshkee.com when the terminal is registered to the store apex; nginx now proxies /meshkee/payments/{gateway}/callback to a host-scoped API route.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 21:34:56 +03:30
Alireza HassaniandCursor 40284df880 Surface the real build error when website deploy.sh fails.
Super Admin was only showing "exited with code 1" because the ERR trap never copied the last compiler or module-not-found line from the deploy log.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 17:39:03 +03:30