PageSourceSearch

https://thesaashub.com/assets/SharedAudit-BlicckMp.js

js thesaashub.com collected 2026-10-06 11:02:29 UTC 7,596 bytes, 1 lines download raw bytes

1import{j as e}from"./ui-vendor-CoYFvwbA.js";import{r as d}from"./react-vendor-SCck3TKl.js";import{b as u,M as k,F as p,C as a,c as l,B as y,H as _,j as c,k as i,v as j,T,m as n,s as B}from"./index-ClNvF6Go.js";import{A as E,a as U,b as z,c as F}from"./accordion-D9udzJDV.js";import{C as H}from"./circle-check-n_2PRIwW.js";import{C as R}from"./circle-alert-Cb30_g5P.js";import"./query-vendor-5_ACa-1l.js";function P(){const[b,v]=d.useState(!0),[t,w]=d.useState(null),[f,S]=d.useState("");d.useEffect(()=>{(async()=>{const o=window.location.pathname.replace("/store-audit/","");if(o)try{const m=decodeURIComponent(o),{data:x,error:g}=await B.rpc("get_latest_audit_by_url",{_url:m});if(g)throw g;const h=Array.isArray(x)?x[0]:x;if(!h)throw new Error("Audit not found");w(h.analysis_data),S(h.website_url)}catch(m){console.error("Error loading audit:",m)}finally{v(!1)}})()},[]);const N=s=>s>=80?"text-green-600":s>=60?"text-yellow-600":"text-red-600",C=s=>({high:"default",medium:"secondary",low:"outline"})[s]||"outline",A=s=>({low:"default",medium:"secondary",high:"outline"})[s]||"outline";return b?e.jsxs("div",{className:"min-h-screen flex flex-col bg-gradient-to-b from-background to-muted/20",children:[e.jsx(u,{}),e.jsx("main",{className:"flex-1 container mx-auto px-4 py-12 flex items-center justify-center",children:e.jsx(k,{className:"w-8 h-8 animate-spin text-primary"})}),e.jsx(p,{})]}):t?e.jsxs(e.Fragment,{children:[e.jsxs(_,{children:[e.jsx("title",{children:"Shopify Store Audit Report | Gold-Standard Site Auditor"}),e.jsx("meta",{name:"description",content:`Comprehensive Shopify store audit for ${f}`})]}),e.jsxs("div",{className:"min-h-screen flex flex-col bg-gradient-to-b from-background to-muted/20",children:[e.jsx(u,{}),e.jsx("main",{className:"flex-1 container mx-auto px-4 py-12",children:e.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[e.jsx(a,{className:"bg-gradient-to-r from-primary/10 to-primary/5 border-primary/20",children:e.jsxs(l,{className:"pt-6 text-center",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-2",children:"Shopify Gold-Standard Site Auditor"}),e.jsxs("p",{className:"text-muted-foreground mb-2",children:["Comprehensive audit for: ",e.jsx("span",{className:"font-medium text-foreground",children:f})]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Powered by"," ",e.jsx("a",{href:"https://thesaashub.com",className:"text-primary hover:underline font-medium",target:"_blank",rel:"noopener noreferrer",children:"TheSaasHub.com"})]})]})}),e.jsx(a,{className:"border-2",children:e.jsx(c,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(i,{className:"text-2xl",children:"Overall Store Score"}),e.jsx(j,{children:t.summary})]}),e.jsxs("div",{className:`text-5xl font-bold ${N(t.overallScore)}`,children:[t.overallScore,e.jsx("span",{className:"text-2xl text-muted-foreground",children:"/100"})]})]})})}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs(a,{children:[e.jsx(c,{children:e.jsxs(i,{className:"flex items-center gap-2",children:[e.jsx(H,{className:"w-5 h-5 text-green-600"}),"What's Working Well"]})}),e.jsx(l,{children:e.jsx("ul",{className:"space-y-2",children:t.strengths.map((s,r)=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-green-600 mt-1",children:"✓"}),e.jsx("span",{children:s})]},r))})})]}),e.jsxs(a,{children:[e.jsx(c,{children:e.jsxs(i,{className:"flex items-center gap-2",children:[e.jsx(T,{className:"w-5 h-5 text-orange-600"}),"Areas for Improvement"]})}),e.jsx(l,{children:e.jsx("ul",{className:"space-y-2",children:t.improvements.map((s,r)=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-orange-600 mt-1",children:"→"}),e.jsx("span",{children:s})]},r))})})]})]}),e.jsxs(a,{children:[e.jsxs(c,{children:[e.jsx(i,{children:"Detailed Section Breakdown"}),e.jsx(j,{children:"10 weighted categories analyzed with confidence scoring"})]}),e.jsx(l,{children:e.jsx(E,{type:"single",collapsible:!0,className:"w-full",children:t.sections.map(s=>e.jsxs(U,{value:s.key,children:[e.jsx(z,{children:e.jsxs("div",{className:"flex items-center justify-between w-full pr-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"font-medium",children:s.name}),e.jsxs(n,{variant:"outline",className:"text-xs",children:["Weight: ",s.weight,"%"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:["Confidence: ",Math.round(s.confidence*100),"%"]}),e.jsxs(n,{className:N(s.score/s.maxScore*100),children:[s.score,"/",s.maxScore]})]})]})}),e.jsx(F,{children:e.jsx("div",{className:"space-y-3 pt-4",children:s.findings.map((r,o)=>e.jsxs("div",{className:"border-l-2 pl-4 py-2 space-y-1",style:{borderColor:r.result==="pass"?"#22c55e":r.result==="fail"?"#ef4444":r.result==="partial"?"#f59e0b":"#94a3b8"},children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-medium",children:r.check}),e.jsxs(n,{variant:r.result==="pass"?"default":r.result==="fail"?"destructive":"secondary",className:"text-xs",children:[r.score," pts"]})]}),r.evidence&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["📌 ",r.evidence]}),r.recommendation&&e.jsxs("p",{className:"text-xs text-blue-600 dar
1k:text-blue-400",children:["💡 ",r.recommendation]})]},o))})})]},s.key))})})]}),e.jsxs(a,{children:[e.jsxs(c,{children:[e.jsxs(i,{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-5 h-5"}),"Top Recommendations"]}),e.jsx(j,{children:"Prioritized action items to improve store performance"})]}),e.jsx(l,{className:"space-y-4",children:t.topRecommendations.map((s,r)=>e.jsxs("div",{className:"border rounded-lg p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("h4",{className:"font-semibold flex items-center gap-2",children:[e.jsxs("span",{className:"text-primary",children:[r+1,"."]}),s.title]}),e.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[e.jsxs(n,{variant:C(s.impact),className:"text-xs",children:[s.impact," impact"]}),e.jsxs(n,{variant:A(s.effort),className:"text-xs",children:[s.effort," effort"]})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.description}),e.jsxs(n,{variant:"outline",className:"text-xs",children:["Section: ",s.section]})]},r))})]}),e.jsx(a,{className:"bg-primary/5 border-primary/20",children:e.jsxs(l,{className:"pt-6 text-center",children:[e.jsx("h3",{className:"text-xl font-semibold mb-2",children:"Get Your Own Free Audit"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Analyze your Shopify store and get expert recommendations"}),e.jsx(y,{size:"lg",onClick:()=>window.location.href="/store-audit",children:"Analyze My Store"})]})})]})}),e.jsx(p,{})]})]}):e.jsxs("div",{className:"min-h-screen flex flex-col bg-gradient-to-b from-background to-muted/20",children:[e.jsx(u,{}),e.jsx("main",{className:"flex-1 container mx-auto px-4 py-12",children:e.jsx(a,{className:"max-w-2xl mx-auto",children:e.jsxs(l,{className:"pt-6 text-center",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Audit Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"This audit report could not be found or may have been removed."}),e.jsx(y,{onClick:()=>window.location.href="/store-audit",children:"Create Your Own Audit"})]})})}),e.jsx(p,{})]})}export{P as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.