From d7090373004bc20b6e202a82a3abd29a9f74e72f Mon Sep 17 00:00:00 2001 From: Amirul Islam Redwan71 Date: Sat, 28 Nov 2026 06:52:02 +0600 Subject: [PATCH] feat(pricing): remove all hardcoded prices, fetch live modular plans & standalone services from /api/public/plans --- src/data.jsx | 66 +----------- src/pages.jsx | 281 +++++++++++++++++++++++++++++++++----------------- 2 files changed, 192 insertions(+), 155 deletions(-) diff --git a/src/data.jsx b/src/data.jsx index 8be87d5..8281d4b 100644 --- a/src/data.jsx +++ b/src/data.jsx @@ -305,68 +305,10 @@ const PORTFOLIO_DATA = { // "new agency, real results coming soon" state when this is empty. testimonials: [], - pricingTiers: [ - { - name: "Starter Shield", - badge: "Founders Club · bKash", - priceBdt: "৳1,999", - price: 16, - period: "/month", - description: "Entry shield for growing BD F-Commerce & E-Commerce shops (15–50 orders/day). Pays for itself by blocking just 6–15 fake COD orders.", - color: "emerald", - features: [ - "24/7 Bengali & English AI Inbox (Facebook, Instagram, WhatsApp & Telegram)", - "Aura Risk Shield — Live 4-Courier Fake-Order & Return Rate Scanner", - "1-Click Multi-Courier Booking (Steadfast, Pathao, RedX & Paperfly)", - "Official Meta Cloud API WhatsApp at Direct Meta Rates (0% Markup)", - "Customer 360 Auto-COD Track Record Inside Live Chat", - "bKash Monthly Billing · Up to 2,000 Active Contacts", - "Free 2-Min Fake-Order Audit + 7-Day Zero-Risk Real Trial (৳0)", - ], - cta: "Start 7-Day Free Trial (৳0)", - href: "https://auth.auraajenticai.cloud/register", - }, - { - name: "Growth Autopilot", - badge: "Most Popular", - priceBdt: "৳3,499", - price: 29, - period: "/month", - description: "Full revenue engine for scaling brands (50–200 orders/day) to slash COD returns, recover carts, and launch high-ROAS creatives.", - color: "cyan", - features: [ - "Everything in Starter Shield + Unlimited Contacts & Conversations", - "Revenue Booster — Automated Abandoned Chat, NDR & 28-Day Refill Recovery", - "WhatsApp Tier-1 Broadcast Campaigns (94–96% Read Rate)", - "Fahi-Vids PRO — 10 AI Bengali Ad Videos, Voiceovers & Thumbnails / month", - "WooCommerce & Shopify 2-Way Catalog Sync + Live Meta Pixel Telemetry", - "Google Maps Rooftop Geocoding & Automated Zone Delivery Fee Engine", - "Priority WhatsApp & Live Engineering Support", - ], - cta: "Start Growth Trial", - href: "https://auth.auraajenticai.cloud/register", - }, - { - name: "Scale Enterprise", - badge: "Full Growth OS", - priceBdt: "৳5,999", - price: 49, - period: "/month", - description: "Complete multi-outlet D2C & agency automation suite with Bengali Voice IVR, team RBAC, and Google Enterprise Analytics.", - color: "amber", - features: [ - "Everything in Growth Autopilot + Multi-Seat Team Roles (Manager / Agent RBAC)", - "Twilio Bengali Voice IVR — Automated Phone Call COD Order Confirmation", - "Snehalata Marketplace Priority Listing & AI Virtual Try-On Exposure", - "Google Enterprise Suite (Live Verified GA4, GTM & Google Ads Sync)", - "Dedicated n8n Custom Automation Pipelines & Webhook Orchestration", - "Standalone Aura Courier MCP API Access for Developers & Agencies", - "Direct WhatsApp Priority Access to Aura Core Engineers", - ], - cta: "Deploy Scale OS", - href: "https://auth.auraajenticai.cloud/register", - }, - ], + // Dynamic SSOT: Pricing tiers are fetched LIVE at runtime from + // https://aura.auraajenticai.cloud/api/public/plans (Master Admin billing_plans table). + // NEVER hardcode prices here — edit plans live inside https://aura.auraajenticai.cloud/billing. + pricingTiers: [], // Empty on purpose -- the old array here was fabricated (fake publish dates predating Aura's own // founding, an invented "18 months of production data" claim, and made-up client numbers matching diff --git a/src/pages.jsx b/src/pages.jsx index e868b23..8b56dc5 100644 --- a/src/pages.jsx +++ b/src/pages.jsx @@ -536,107 +536,202 @@ const PRICING_COLORS = { }; const PricingPage = () => { - const D = PORTFOLIO_DATA; + const [plans, setPlans] = React.useState([]); + const [standaloneServices, setStandaloneServices] = React.useState([]); + const [trialPlan, setTrialPlan] = React.useState(null); + const [loading, setLoading] = React.useState(true); + const [err, setErr] = React.useState(false); + + React.useEffect(() => { + let active = true; + fetch(`${DASHBOARD_API}/api/public/plans`, { signal: AbortSignal.timeout(5000) }) + .then(r => (r.ok ? r.json() : Promise.reject(new Error('HTTP ' + r.status)))) + .then(data => { + if (!active) return; + const all = Array.isArray(data?.plans) ? data.plans : []; + const tr = all.find(p => p.is_trial || p.id === 'trial') || null; + const paid = all.filter(p => !(p.is_trial || p.id === 'trial')); + setTrialPlan(tr); + setPlans(paid); + setStandaloneServices(Array.isArray(data?.standalone_services) ? data.standalone_services : []); + setLoading(false); + }) + .catch(() => { + if (!active) return; + setErr(true); + setLoading(false); + }); + return () => { active = false; }; + }, []); + + const startingBdt = plans.length > 0 ? Math.min(...plans.map(p => Number(p.monthly_price || 0)).filter(n => n > 0)) : null; + const trialDays = trialPlan?.trial_days || 7; + return (
Zero agency markups. Start at ৳1,999/mo with 7-day free trial.} - sub="No lock-in to a single courier. Connect Steadfast, Pathao, RedX & Paperfly with live COD Fraud Shield, 24/7 Bengali AI Inbox, and Official Meta Cloud API (0% markup) — payable directly via bKash or card." + eyebrow="Live Platform Plans & Subscriptions" + title={ + <> + Zero agency markups.{' '} + + {startingBdt ? `Start at ৳${startingBdt.toLocaleString()}/mo with ${trialDays}-day free trial.` : 'Transparent monthly plans synced live.'} + + + } + sub="No lock-in to a single courier. Connect Steadfast, Pathao, RedX & Paperfly with live COD Fraud Shield, 24/7 Bengali AI Inbox, and Official Meta Cloud API (0% markup) — payable via bKash or card." />
-
- {D.pricingTiers.map((tier, i) => { - const c = PRICING_COLORS[tier.color] || PRICING_COLORS.violet; - const isPopular = tier.badge === "Most Popular"; - return ( -
- {tier.badge && ( -
{tier.badge}
- )} - -
-

{tier.name}

-

{tier.description}

-
- -
- {tier.priceBdt ? ( -
-
- {tier.priceBdt} - {tier.period} -
- {tier.price && ( -
- ≈ ${tier.price} USD{tier.period} · bKash / Card · 7-Day Free Trial (৳0) -
- )} -
- ) : tier.price ? ( -
- USD - ${tier.price.toLocaleString()} - {tier.period} -
- ) : ( -
Custom Architecture
- )} -
- -
    - {tier.features.map((f, fi) => ( -
  • - ✓ - {f} -
  • - ))} -
- - + Loading live plans from Aura Cloud… +
+ ) : err || plans.length === 0 ? ( + + ) : ( +
+ {plans.map((tier, i) => { + const c = PRICING_COLORS[tier.color] || PRICING_COLORS.violet; + const isPopular = Boolean(tier.popular || tier.badge === "Most Popular"); + const bdt = Number(tier.monthly_price || 0); + const approxUsd = bdt > 0 ? Math.max(1, Math.round(bdt / 122)) : 0; + const feats = Array.isArray(tier.highlights) && tier.highlights.length > 0 + ? tier.highlights + : [ + `${Number(tier.included_messages || 0).toLocaleString()} included AI conversations / month`, + tier.overage_rate > 0 ? `Overage ৳${tier.overage_rate}/msg` : 'Predictable flat monthly billing', + ]; + return ( +
e.currentTarget.style.opacity = "0.85"} - onMouseLeave={e => e.currentTarget.style.opacity = "1"} - >{tier.cta} → + > + {tier.badge && ( +
{tier.badge}
+ )} + +
+

{tier.name}

+

{tier.description}

+
+ +
+ {bdt > 0 ? ( +
+
+ + {tier.currency === 'USD' ? `$${bdt.toLocaleString()}` : `৳${bdt.toLocaleString()}`} + + /month +
+
+ {tier.currency !== 'USD' ? `≈ $${approxUsd} USD/mo · ` : ''}bKash / Card · {trialDays}-Day Free Trial (৳0) +
+
+ ) : ( +
Custom Architecture
+ )} +
+ + {Array.isArray(tier.included_services_detail) && tier.included_services_detail.length > 0 && ( +
+ {tier.included_services_detail.map((svc, si) => ( + {svc.name} + ))} +
+ )} + +
    + {feats.map((f, fi) => ( +
  • + ✓ + {f} +
  • + ))} +
+ + e.currentTarget.style.opacity = "0.85"} + onMouseLeave={e => e.currentTarget.style.opacity = "1"} + >{tier.cta || 'Start Free Trial'} → +
+ ); + })} +
+ )} + + {standaloneServices.length > 0 && ( +
+
+
+ Modular Standalone Services
- ); - })} -
+

Or pick any individual Aura service à la carte

+

Live pricing synchronized directly from Aura Cloud Catalog — bundle any combination or start with a single tool.

+
+
+ {standaloneServices.map((svc, idx) => ( +
+
+
+ {svc.name} + {svc.category} +
+ {svc.description &&

{svc.description}

} +
+
+ + {svc.monthly_price && svc.monthly_price > 0 ? `৳${Number(svc.monthly_price).toLocaleString()}/mo` : 'Custom / Included'} + + {svc.trial_days > 0 && {svc.trial_days}d trial} +
+
+ ))} +
+
+ )}
{ gap: 24, alignItems: "center", }} className="pricing-cta-row">
-

3-Step Zero-Risk Onboarding: 2-Min Free Fake-Order Audit → 7-Day Trial (৳0) → bKash Lock-in

+

3-Step Zero-Risk Onboarding: 2-Min Free Fake-Order Audit → {trialDays}-Day Trial (৳0) → bKash Lock-in

Send 20 recent customer numbers on WhatsApp (+880 1317-685758) for a free live 4-courier fraud audit, or email hello@auraajenticai.cloud for agency / custom ERP deployment.