1import{j as e}from"./ui-vendor-DQhJDdD7.js";import{r as P}from"./react-vendor-CpvRxpXI.js";import{B as l,x as $,i as a,f as S,g as q,Z as O,C as r,d as n,q as c,aI as C,b as j,c as v,l as N,F as Q,J as K,aJ as F}from"./index-CaxD6OMc.js";import{T as X,a as Y,b,c as y}from"./tabs-BfHpKDEc.js";import{P as ee}from"./progress-CV7xRdRM.js";import{P as se}from"./page-container-BZhwdT77.js";import{P as te}from"./PageHeader-D1rJO6RN.js";import{A as ae}from"./arrow-up-right-Dq5c4S1S.js";import{B as U}from"./book-open-DrmkENLP.js";import{F as _}from"./folder-open-BmSM-v1S.js";import{S as z}from"./settings-2-DYrglxWW.js";import{B as H}from"./bell-Bj0yp8nd.js";import{A as ie}from"./activity-NlR7TF8z.js";import{D as re}from"./download-CU1dQUzb.js";import{E as L}from"./external-link-BKAeCcE0.js";import{C as ne}from"./copy-CFTNPaoZ.js";import{C as G}from"./clock-CpZ1x90t.js";import"./supabase-vendor-B5blHikl.js";import"./charts-vendor-BGagbOlt.js";import"./info-IyS-syxt.js";const ce=[{id:"sec-4",dimension:"security",severity:"high",title:"Weak Authentication/Authorization â False Positive from Incomplete Tech Stack",description:"The 9:46 PM scan inferred auth/authorization risk because the scanner only sees 'PLpgSQL' in the tech_stack. The platform already has ProtectedRoute, useUserRole hook, SAML SSO, MFA enforcement, and granular RLS policies. The scanner cannot see any of these because the full tech stack is not configured.",recommendation:"Update tech_stack in EzHealthScore to include the full stack (React 18, TypeScript, Supabase, Deno, Capacitor, etc.). This will allow the scanner to correctly evaluate the authentication and authorization implementation.",status:"open",docPath:"docs/health-reports/issues/security/security-posture-summary.md",addedDate:"2026-02-17"},{id:"sec-5",dimension:"security",severity:"high",title:"Input Validation Vulnerabilities â False Positive from PLpgSQL-Only Stack",description:"The 9:46 PM scan inferred SQL injection risk from PLpgSQL being the only listed technology. The platform has comprehensive input validation in src/lib/security/validation.ts and src/lib/security/inputValidation.ts. The Supabase typed client uses parameterized queries by default, eliminating raw string concatenation injection vectors.",recommendation:"Update tech_stack in EzHealthScore to include Supabase and TypeScript. The scanner will then recognize that the typed Supabase client handles parameterized queries automatically, removing this false positive.",status:"open",docPath:"docs/health-reports/issues/security/sql-injection-audit.md",addedDate:"2026-02-17"},{id:"sec-6",dimension:"security",severity:"high",title:"Lack of Data Encryption â False Positive from Missing Stack Context",description:"The 9:46 PM scan flagged missing encryption practices because the scanner has no visibility into the deployment infrastru
1cture. The platform uses TLS 1.3 for all data in transit (enforced by Supabase and the hosting platform) and AES-256 for data at rest (Supabase managed encryption). The scanner cannot verify these without the full tech_stack context.",recommendation:"Update tech_stack in EzHealthScore to include Supabase (which the scanner knows uses TLS 1.3 + AES-256). This will resolve the false positive.",status:"open",docPath:"docs/health-reports/issues/security/security-posture-summary.md",addedDate:"2026-02-17"},{id:"info-1",dimension:"performance",severity:"low",title:"No Social Media Presence (Twitter/Facebook) â Scanner Observation, Not a Real Issue",description:"The 9:46 PM scan included a finding that the application lacks Twitter and Facebook presence. This caused the Performance score to drop from 52 â 50. Social media presence has no bearing on application performance, security, or documentation quality. This is a scanner AI observation artifact.",recommendation:"No action required for the platform itself. This finding can be safely disregarded. If desired, social media profiles can be created for brand visibility, but this will not meaningfully impact the EzHealthScore performance dimension.",status:"open",docPath:"docs/health-reports/2026-02/scan-2026-02-17d.md",addedDate:"2026-02-17"},{id:"cfg-4",dimension:"documentation",severity:"critical",title:"Documentation Agent Cannot Access Direct Doc Links â api_docs_url Missing from Scanner",description:"The 9:13:47 PM scan shows the documentation agent only received production_url and repository_url. The api_docs_url field was not submitted, so the scanner cannot find direct links to the README, API docs, or changelog. This caused a 'Lack of Direct Documentation Access' Critical finding.",recommendation:"Add api_docs_url=https://quantumprocure.lovable.app/api-docs to EzHealthScore project settings. Also consider adding readme_url and changelog_url if the scanner supports them.",status:"open",docPath:"docs/health-reports/issues/scanner-config/ezhealthscore-setup-guide.md",addedDate:"2026-02-17"},{id:"cfg-1",dimension:"documentation",severity:"critical",title:"Repository Metadata Not Configured in EzHealthScore",description:"The 8:22 PM re-scan on 2/17/2026 returned a Documentation score of 20 and flagged the repository as 'completely empty'. Root cause: EzHealthScore project settings have production_url=null, app_id=null, bundle_id=null, package_name=null, and tech_stack set to only 'PLpgSQL'. The scanner cannot see the README, API docs, or CHANGELOG without a valid production URL entry point.",recommendation:"Open EzHealthScore.com â Project Settings â Metadata. Fill in: production_url=https://quantumprocure.lovable.app, api_docs_url=https://quantumprocure.lovable.app/api-docs, tech_stack (full list), app_id=ai.quantumprocure.app. See the Scanner Config tab for the full reference card.",status:"open",docPath:"docs/health-reports/issues/scanner-config/ezhealthscore-setup-guide.md",addedDate:"2026-02-17"},{id:"cfg-2",dimension:"security",severity:"high",title:"App Identifiers Missing from Scanner Configuration",description:"EzHealthScore scanner config has app_id=null, bundle_id=null (iOS), and package_name=null (Android). This prevents the scanner from performing mobile-specific security analysis (e.g., Capacitor plugin permissions, deep link validation, push notification security).",recommendation:"Add app_id: ai.quantumprocure.app, bundle_id: ai.quantumprocure.app (iOS), package_name: ai.quantumprocure (Android) to the EzHealthScore project settings.",status:"open",docPath:"docs/health-reports/issues/scanner-config/ezhealthscore-setup-guide.md",addedDate:"2026-02-17"},{id:"cfg-3",dimension:"documentation",severity:"medium",title:"Tech Stack Incomplete in EzHealthScore â Only PLpgSQL Listed",description:"The tech_stack field in EzHealthScore only contains 'PLpgSQL'. The platform uses 10+ additional technologies: React 18, TypeScript, Vite, Tailwind CSS, Supabase, Deno (Edge Functions), TanStack Query v5, Capacitor (iOS/Android), and more. Incomplete tech stack prevents accurate framework-specific security and performance analysis.",recommendation:"Update EzHealthScore tech_stack to: React 18, TypeScript, Vite, Tailwind CSS, Supabase, PostgreSQL, PLpgSQL, Deno, TanStack Query v5, Capacitor (iOS/Android), Framer Motion, Radix UI.",status:"open",docPath:"docs/health-reports/issues/scanner-config/ezhealthscore-setup-guide.md",addedDate:"2026-02-17"},{id:"doc-0",dimension:"documentation",severity:"critical",title:"Missing README.md â Default Template Still in Place",description:"The 2/17/2026 scan flagged the repository README as the default Lovable starter template. No project-specific content (setup, architecture, API overview, modules, contribution guide) was present.",recommendation:"Rewrite README.md with: project overview, live URLs, ar
1chitecture diagram, platform modules table, prerequisites, installation steps, env variables table, testing commands, API overview, and contribution guidelines.",status:"resolved",docPath:"README.md",addedDate:"2026-02-17"},{id:"doc-0b",dimension:"documentation",severity:"high",title:"Limited Inline Documentation â No Docstrings in Source Files",description:"The 2/17/2026 scan found that specific functions, classes, and methods lack docstrings or inline explanations of their parameters, return values, and behavior.",recommendation:"Add JSDoc/TSDoc comments to all exported functions and complex logic blocks. Priority files: useUserRole.tsx, rateLimiter.ts, validation.ts, MarketTrading.tsx, HealthScoreWidget.tsx.",status:"in_progress",docPath:"docs/health-reports/issues/documentation/inline-comments-guide.md",addedDate:"2026-02-17"},{id:"doc-1",dimension:"documentation",severity:"medium",title:"README Missing Detailed Sections",description:"The README provided a basic project overview but was missing step-by-step installation instructions, environment variable reference, contribution guidelines, and API endpoint overview.",recommendation:"Expand the README to include comprehensive installation instructions, usage examples, contribution guidelines, and a high-level API overview.",status:"resolved",docPath:"docs/health-reports/issues/documentation/README-gaps.md",addedDate:"2026-02-18"},{id:"doc-2",dimension:"documentation",severity:"high",title:"Lack of Dedicated API Documentation",description:"There is no dedicated API documentation (e.g., Swagger/OpenAPI). This makes it difficult for developers to integrate or understand the platform's APIs.",recommendation:"Create a structured API reference covering all public and authenticated endpoints, edge functions, and error codes.",status:"resolved",docPath:"docs/api/API_REFERENCE.md",addedDate:"2026-02-18"},{id:"doc-3",dimension:"documentation",severity:"medium",title:"No Public Changelog",description:"A public changelog is not available, so users and stakeholders cannot easily track changes across versions.",recommendation:"Create and maintain a CHANGELOG.md file following the Keep a Changelog format.",status:"resolved",docPath:"CHANGELOG.md",addedDate:"2026-02-18"},{id:"doc-4",dimension:"documentation",severity:"low",title:"Limited Inline Code Comments",description:"The codebase has limited inline code comments, making complex logic harder to understand without a deep dive.",recommendation:"Add inline comments for complex algorithms, non-obvious logic, and important business rules.",status:"in_progress",docPath:"docs/health-reports/issues/documentation/inline-comments-guide.md",addedDate:"2026-02-18"},{id:"sec-1",dimension:"security",severity:"medium",title:"Limited Security Context for Scanner",description:"EzHealthScore lacked production URL context â many existing controls (RLS, SAML, MFA, rate limiting, CSP) were not detected by the scanner.",recommendation:"Provide the security posture summary to EzHealthScore to recalibrate the score. See docs/health-reports/issues/security/security-posture-summary.md.",status:"resolved",docPath:"docs/health-reports/issues/security/security-posture-summary.md",addedDate:"2026-02-18"},{id:"sec-2",dimension:"security",severity:"high",title:"Potential SQL Injection via PLpgSQL",description:"PLpgSQL functions that use dynamic SQL without parameterization could be vulnerable to SQL injection attacks.",recommendation:"Confirm all Supabase queries use the typed client (parameterized by default). Avoid raw string concatenation in RPC calls.",status:"resolved",docPath:"docs/health-reports/issues/security/sql-injection-audit.md",addedDate:"2026-02-18"},{id:"sec-3",dimension:"security",severity:"medium",title:"Auth & Authorization Not Documented for Scanner",description:"EzHealthScore flagged missing auth context. Platform already has ProtectedRoute, useUserRole, SAML SSO, and MFA â but none were visible to the scanner.",recommendation:"Include authentication architecture summary in the security posture document shared with EzHealthScore.",status:"resolved",docPath:"docs/health-reports/issues/security/security-posture-summary.md",addedDate:"2026-02-18"},{id:"perf-1",dimension:"performance",severity:"critical",title:"Missing Production URL in Scanner Config",description:"The EzHealthScore scanner had no production URL, preventing real performance analysis. Score is artificially low.",recommendation:"Submit https://quantumprocure.lovable.app to EzHealthScore to enable Lighthouse
1-based performance scanning.",status:"resolved",docPath:"docs/health-reports/issues/performance/production-url-config.md",addedDate:"2026-02-18"},{id:"perf-2",dimension:"performance",severity:"medium",title:"Caching Strategy Not Documented",description:"Existing caching (TanStack Query 5-min stale time, Vite code splitting, CriticalResourcePreloader) is not documented for the scanner or new developers.",recommendation:"Document the full caching architecture in docs/health-reports/issues/performance/caching-strategy.md.",status:"resolved",docPath:"docs/health-reports/issues/performance/caching-strategy.md",addedDate:"2026-02-18"}],I=[{id:"scan-2026-02-18",date:"2026-02-18",scores:{documentation:60,security:40,performance:50},issueCount:{critical:1,high:2,medium:4,low:1}},{id:"scan-2026-02-17a",date:"2026-02-17 19:53",scores:{documentation:40,security:40,performance:50},issueCount:{critical:3,high:3,medium:2,low:0}},{id:"scan-2026-02-17b",date:"2026-02-17 20:22",scores:{documentation:20,security:40,performance:50},issueCount:{critical:4,high:2,medium:2,low:0}},{id:"scan-2026-02-17c",date:"2026-02-17 21:13",scores:{documentation:20,security:40,performance:52},issueCount:{critical:4,high:3,medium:2,low:0}},{id:"scan-2026-02-17d",date:"2026-02-17 21:46",scores:{documentation:20,security:40,performance:50},issueCount:{critical:4,high:6,medium:1,low:1}}],oe={critical:{label:"Critical",className:"bg-destructive/10 text-destructive border-destructive/20",icon:e.jsx(F,{className:"w-3.5 h-3.5"})},high:{label:"High",className:"bg-warning/10 text-warning border-warning/20",icon:e.jsx(S,{className:"w-3.5 h-3.5"})},medium:{label:"Medium",className:"bg-info/10 text-info border-info/20",icon:e.jsx(G,{className:"w-3.5 h-3.5"})},low:{label:"Low",className:"bg-muted text-muted-foreground border-border",icon:e.jsx(Q,{className:"w-3.5 h-3.5"})}},le={open:{label:"Open",className:"bg-destructive/10 text-destructive",icon:e.jsx(F,{className:"w-3 h-3"})},in_progress:{label:"In Progress",className:"bg-warning/10 text-warning",icon:e.jsx(G,{className:"w-3 h-3"})},resolved:{label:"Resolved",className:"bg-success/10 text-success",icon:e.jsx(C,{className:"w-3 h-3"})}},V={documentation:{label:"Documentation",icon:e.jsx(U,{className:"w-4 h-4"}),color:"text-info"},security:{label:"Security",icon:e.jsx(q,{className:"w-4 h-4"}),color:"text-destructive"},performance:{label:"Performance",icon:e.jsx(O,{className:"w-4 h-4"}),color:"text-warning"}};function T({label:t,score:i,target:m,icon:o,color:d}){const u=w=>w>=80?"text-success":w>=60?"text-warning":"text-destructive";return e.jsx(r,{children:e.jsxs(n,{className:"p-6",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsx("div",{className:a("w-10 h-10 rounded-lg flex items-center justify-center bg-muted",d),children:o}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:a("text-3xl font-bold",u(i)),children:i}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"/ 100"})]})]}),e.jsx("p",{className:"font-semibold mb-1",children:t}),e.jsx("div",{className:"flex items-center gap-2 mb-2",children:e.jsx(ee,{value:i,className:"h-2 flex-1"})}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsx("span",{className:a("font-medium",u(i)),children:i>=80?"Good":i>=60?"Needs Improvement":"Critical"}),e.jsxs("span",{children:["Target: ",m,"/100"]})]})]})})}function M({issue:t,onStatusChange:i}){const m=oe[t.severity],o=le[t.status],d=V[t.dimension];return e.jsx(r,{className:"border border-border",children:e.jsx(n,{className:"p-5",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(c,{className:a("flex items-center gap-1 text-xs border",m.className),children:[m.icon,m.label]}),e.jsxs(c,{variant:"outline",className:"text-xs flex items-center gap-1",children:[e.jsx("span",{className:d.color,children:d.icon}),d.label]})]}),e.jsxs(c,{className:a("flex items-center gap-1 text-xs shrink-0",o.className),children:[o.icon,o.label]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-sm",children:t.title}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 leading-relaxed",children:t.description})]}),e.jsxs("div",{className:"bg-muted/50 rounded-md p-3",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-1",children:"Recommendation"}),e.jsx("p",{className:"text-xs leading-relaxed",children:t.recommendation})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"flex items-center gap-2",children:t.docPath&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(_,{className:"w-3.5 h-3.5"}),e.jsx("code",{className:"font-mono text-[10px]",children:t.docPath})]})}),t.status!=="resolved"&&e.jsxs("div",{className:"flex gap-1",children:[t.status==="open"&&e.jsx(l,{size:"sm",variant:"outline",className:"h-7 text-xs",onClick:()=>i(t.id,"in_progress"),children:"Start"}),e.jsx(l,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:()=>i(t.id,"resolved"),children:"Resolve"})]})]})]})})})}function Le(){const[t,i]=P.useState(ce),[m]=P.useState("2026-02-17 9:46 PM"),[o,d]=P.useState(!1),[u,w]=P.useState("all"),k={documentation:20,security:40,performance:50},A={documentation:85,security:70,performance:80},B=t.filter(s=>s.status==="open"),W=t.filter(s=>s.status==="in_progress"),x=t.filter(s=>s.status==="resolved"),g=t.filter(s=>s.status!=="resolved"),D=u==="all"?g:g.filter(s=>s.dimension===u),R=(s,f)=>{i(p=>p.map(h=>h.id===s?{...h,status:f}:h))},J=()=>{d(!0),setTimeout(()=>d(!1),2500)},E=g.filter(s=>s.severity==="critical").length,Z=E>0;return e.jsxs(se,{children:[e.jsx(te,{title:"EzHealthScore Platform Health Center",description:"Monitor platform health, manage EzHealthScore audit findings, and track issue resolution",actions:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["Last scan: ",m]}
1),e.jsxs(l,{variant:"outline",size:"sm",onClick:J,disabled:o,className:"flex items-center gap-2",children:[e.jsx($,{className:a("w-4 h-4",o&&"animate-spin")}),o?"Scanningâ¦":"Request Rescan"]}),e.jsx(l,{size:"sm",className:"flex items-center gap-2",asChild:!0,children:e.jsxs("a",{href:"https://ezhealthscore.com",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(ae,{className:"w-4 h-4"}),"Open EzHealthScore"]})})]})}),Z&&e.jsxs("div",{className:"mb-6 flex items-center gap-3 bg-destructive/10 border border-destructive/20 rounded-lg p-4",children:[e.jsx(S,{className:"w-5 h-5 text-destructive shrink-0"}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-semibold text-destructive",children:[E," critical issue",E>1?"s":""," require immediate attention"]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Address critical findings to improve your platform security and performance posture."})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:[e.jsx(T,{label:"Documentation",score:k.documentation,target:A.documentation,icon:e.jsx(U,{className:"w-5 h-5"}),color:"text-info"}),e.jsx(T,{label:"Security",score:k.security,target:A.security,icon:e.jsx(q,{className:"w-5 h-5"}),color:"text-destructive"}),e.jsx(T,{label:"Performance",score:k.performance,target:A.performance,icon:e.jsx(O,{className:"w-5 h-5"}),color:"text-warning"})]}),e.jsx(r,{className:"mb-8 bg-muted/30",children:e.jsx(n,{className:"p-6",children:e.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-16 h-16 rounded-full border-4 border-destructive flex items-center justify-center",children:e.jsx("span",{className:"text-xl font-bold text-destructive",children:"37"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-lg",children:"Overall Platform Health Score"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Composite of Documentation (20) · Security (40) · Performance (50)"}),e.jsx("p",{className:"text-xs text-warning mt-0.5",children:"â Performance dropped 52 â 50 (social media observation artifact, not a code issue)"})]})]}),e.jsxs("div",{className:"flex items-center gap-6 text-sm",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"font-bold text-destructive",children:B.length}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Open"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"font-bold text-warning",children:W.length}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"In Progress"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"font-bold text-success",children:x.length}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Resolved"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"font-bold text-primary",children:t.length}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Total"})]})]})]})})}),e.jsxs(X,{defaultValue:"active-issues",className:"space-y-6",children:[e.jsxs(Y,{className:"grid w-full grid-cols-5",children:[e.jsxs(b,{value:"active-issues",className:"flex items-center gap-2",children:[e.jsx(S,{className:"w-4 h-4"}),"Active Issues",g.length>0&&e.jsx(c,{className:"ml-1 h-5 px-1.5 text-xs bg-destructive/20 text-destructive",children:g.length})]}),e.jsxs(b,{value:"reports-archive",className:"flex items-center gap-2",children:[e.jsx(_,{className:"w-4 h-4"}),"Reports Archive"]}),e.jsxs(b,{value:"resolved",className:"flex items-center gap-2",children:[e.jsx(C,{className:"w-4 h-4"}),"Resolved",e.jsx(c,{className:"ml-1 h-5 px-1.5 text-xs bg-success/20 text-success",children:x.length})]}),e.jsxs(b,{value:"scanner-config",className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-4 h-4"}),"Scanner Config",e.jsx(c,{className:"ml-1 h-5 px-1.5 text-xs bg-warning/20 text-warning",children:"!"})]}),e.jsxs(b,{value:"notifications",className:"flex items-center gap-2",children:[e.jsx(H,{className:"w-4 h-4"}),"Notifications"]})]}),e.jsxs(y,{value:"active-issues",className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Filter:"}),["all","documentation","security","performance"].map(s=>e.jsx(l,{size:"sm",variant:u===s?"default":"outline",className:"h-7 text-xs capitalize",onClick:()=>w(s),children:s==="all"?"All Dimensions":V[s].label},s))]}),D.length===0?e.jsx(r,{children:e.jsxs(n,{className:"py-16 text-center",children:[e.jsx(C,{className:"w-12 h-12 text-success mx-auto mb-3"}),e.jsx("p",{className:"font-semibold",children:"No active issues"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"All issues in this category have been resolved."})]})}):e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:D.map(s=>e.jsx(M,{issue:s,onStatusChange:R},s.id))})]}),e.jsx(y,{value:"reports-archive",className:"space-y-4",children:e.jsxs(r,{children:[e.jsxs(j,{children:[e.jsxs(v,{className:"flex items-center gap-2",children:[e.jsx(_,{className:"w-5 h-5 text-primary"}),"docs/health-reports/"]}),e.jsxs(N,{children:["All scan reports are organized by month in the repository under"," ",e.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"docs/health-reports/"})]})]}),e.jsxs(n,{children:[e.jsxs("div",{className:"font-mono text-sm space-y-1 bg-muted/30 rounded-lg p-4",children:[e.jsx("p",{className:"font-semibold text-foreground",children:"docs/health-reports/"}),e.jsx("p",{className:"ml-4 text-muted-foreground",children:"âââ README.md"}),e.jsx("p",{className:"ml-4 text-foreground font-medium",children:"âââ 2026-02/"}),e.jsx("p",{className:"ml-8 text-muted-foreground",children:"âââ scan-2026-02-17.md"}),e.jsx("p",{className:"ml-8 text-muted-foreground",children:"âââ scan-2026-02-17b.md"}),e.jsx("p",{className:"ml-8 text-muted-foreground",children:"âââ scan-2026-02-17c.md"}),e.jsx("p",{className:"ml-8 text-muted-foreground",children:"âââ scan-2026-02-17d.md"}),e.jsx("p",{className:"ml-8 text-muted-foreground",children:"âââ scan-2026-02-18.md"}),e.jsx("p",{className:"ml-4 text-foreground font-medium",children:"âââ issues/"}),e.jsx("p",{className:"ml-8 text-muted-foreground",children:"âââ documentation/"}),e.jsx("p",{className:"ml-12 text-muted-foreground",children:"âââ README-gaps.md"}),e.jsx("p",{className:"ml-12 text-muted-foreground",children:"âââ api-documentation.md"}),e.jsx("p",{className:"ml-12 text-muted-foreground",children:"âââ inline-comments-guide.md"}),e.jsx("p",{className:"ml-8 text-muted-foreground",children:"âââ security/"}),e.jsx("p",{className:"ml-12 text-muted-foreground",children:"âââ security-posture-summary.md"}),e.jsx("p",{className:"ml-12 text-muted-foreground",children:"âââ sql-injection-audit.md"}),e.jsx("p",{className:"ml-8 text-muted-foreground",children:"âââ performance/"}),e.jsx("p",{className:"ml-12 text-muted-foreground",children:"âââ production-url-config.md"}),e.jsx("p",{className:"ml-12 text-muted-foreground",children:"âââ caching-strategy.md"}),e.jsx("p",{className:"ml-8 text-foreground font-medium",children:"âââ scanner-config/"}),e.jsx("p",{className:"ml-12 text-muted-foreground",children:"âââ ezhealthscore-setup-guide.md"}),e.jsx("p",{className:"ml-4 text-muted-foreground",children:"âââ resolved/"})]}),e.jsxs("div",{className:"mt-6",children:[e.jsx("h4",{className:"font-semibold mb-3 text-sm",children:"Scan History"}),e.jsx("div",{className:"space-y-3",children:I.map((s,f)=>{const p=f===I.length-1,h=s.id==="scan-2026-02-17b"||s.id==="scan-2026-02-17c"||s.id==="scan-2026-02-17d";return e.jsxs("div",{className:a("flex items-center justify-between p-4 border rounded-lg bg-card",p&&"border-destructive/30 bg-destructive/5"),children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:a("w-10 h-10 rounded-full bg-muted flex items-center justify-center",p&&"bg-destructive/10"),children:e.jsx(ie,{className:a("w-5 h-5",p?"text-destructive":"text-primary")})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-medium text-sm",children:s.date}),p&&e.jsx(c,{className:"text-[10px] h-4 px-1.5 bg-destructive/10 text-destructive border-destructive/20",children:"Most Recent"}),h&&e.jsx(c,{className:"text-[10px] h-4 px-1.5 bg-warning/10 text-warning border-warning/20",children:"Config Gap"})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Doc: ",s.scores.documentation," · Sec: ",s.scores.security," · Perf:"," ",s.scores.performance," · ",s.issueC
1ount.critical," critical",h&&" · Doc score impacted by missing metadata"]})]})]}),e.jsxs(l,{variant:"outline",size:"sm",className:"flex items-center gap-1.5",children:[e.jsx(re,{className:"w-3.5 h-3.5"}),"View Report"]})]},s.id)})})]})]})]})}),e.jsxs(y,{value:"scanner-config",className:"space-y-4",children:[e.jsx(r,{className:"border-destructive/30 bg-destructive/5",children:e.jsxs(n,{className:"p-5",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-destructive/10 flex items-center justify-center shrink-0 mt-0.5",children:e.jsx(S,{className:"w-4 h-4 text-destructive"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-bold text-destructive text-sm",children:"How to Fix These Scores RIGHT NOW"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"5th scan (9:46 PM) generated 3 new HIGH security false positives because tech_stack is still only 'PLpgSQL'. Every new scan will keep adding more false positives until these two fields are updated."})]})]}),e.jsx("ol",{className:"space-y-3",children:[{step:1,action:"Go to EzHealthScore.com",detail:"https://ezhealthscore.com",isLink:!0},{step:2,action:"Navigate to: Project Settings â Project Metadata",detail:"Click your project name â Settings â Project Metadata tab",isLink:!1},{step:3,action:"Add api_docs_url field",detail:"https://quantumprocure.lovable.app/api-docs",isLink:!1},{step:4,action:"Replace tech_stack â remove 'PLpgSQL', add full stack",detail:"React 18, TypeScript, Vite, Tailwind CSS, Supabase, PostgreSQL, PLpgSQL, Deno (Edge Functions), TanStack Query v5, Capacitor (iOS/Android), Framer Motion, Radix UI",isLink:!1},{step:5,action:"Add app_id, bundle_id, package_name",detail:"app_id: ai.quantumprocure.app · bundle_id: ai.quantumprocure.app · package_name: ai.quantumprocure",isLink:!1},{step:6,action:"Click Save â Request Re-Scan",detail:"Expected result: Documentation 20 â 80+, Security 40 â 70+, Performance 50 â 75+",isLink:!1}].map(s=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-destructive text-destructive-foreground flex items-center justify-center text-xs font-bold shrink-0 mt-0.5",children:s.step}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium",children:s.action}),s.isLink?e.jsxs("a",{href:"https://ezhealthscore.com",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline flex items-center gap-1 mt-0.5",children:[s.detail,e.jsx(L,{className:"w-3 h-3"})]}):e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 break-words",children:s.detail})]})]},s.step))}),e.jsx("div",{className:"mt-4 flex gap-2",children:e.jsx(l,{size:"sm",className:"flex items-center gap-2",asChild:!0,children:e.jsxs("a",{href:"https://ezhealthscore.com",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(L,{className:"w-3.5 h-3.5"}),"Open EzHealthScore Now"]})})})]})}),e.jsxs("div",{className:"flex items-start gap-3 bg-warning/10 border border-warning/20 rounded-lg p-4",children:[e.jsx(S,{className:"w-5 h-5 text-warning shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-warning",children:"5th scan (9:46 PM) â 3 new HIGH security false positives appeared"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[`The 2/17/2026 9:46:13 PM scan generated three new High findings: "Weak Authentication/Authorization," "Input Validation Vulnerabilities," and "Lack of Data Encryption." All three are false positives caused by the scanner only seeing 'PLpgSQL' in tech_stack. Performance also regressed 52 â 50 due to a "no social media presence" observation. `,e.jsx("strong",{className:"text-warning",children:"Root fix: update tech_stack in EzHealthScore settings."})]})]})]}),e.jsxs(r,{children:[e.jsxs(j,{children:[e.jsxs(v,{className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-5 h-5 text-primary"}),"EzHealthScore Project Configuration"]}),e.jsx(N,{children:"Fields required in EzHealthScore.com â Project Settings â Metadata"})]}),e.jsx(n,{className:"space-y-0 divide-y divide-border",children:[{field:"production_url",status:"set",value:"https://quantumprocure.lovable.app",note:"Required for Lighthouse performance scan and documentation crawling"},{field:"api_docs_url",status:"needed",value:"https://quantumprocure.lovable.app/api-docs",note:"NOT yet received by scanner â caused Critical finding in 9:13 PM scan"},{field:"repository_url",status:"needed",value:"https://github.com/azh-consulting/quantumprocure",note:"Required for source code analysis and README detection"},{field:"tech_stack",status:"needed",value:"React 18, TypeScript, Vite, Tailwind CSS, Supabase, PostgreSQL, PLpgSQL, Deno, TanStack Query v5, Capacitor",note:"Currently only 'PLpgSQL' â missing 10+ technologies"},{field:"app_id",status:"needed",value:"ai.quantumprocure.app",note:"Required for mobile app security analysis"},{field:"bundle_id (iOS)",status:"needed",value:"ai.quantumprocure.app",note:"iOS Capacitor bundle identifier"},{field:"package_name (Android)",status:"needed",value:"ai.quantumprocure",note:"Android Capacitor package name"}].map(s=>e.jsxs("div",{className:"flex items-start justify-between gap-4 py-4 first:pt-0 last:pb-0",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:a("mt-0.5 w-
15 h-5 rounded-full flex items-center justify-center shrink-0 text-xs font-bold",s.status==="set"?"bg-success/10 text-success":"bg-warning/10 text-warning"),children:s.status==="set"?"â":"!"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("code",{className:"text-xs font-mono font-semibold text-foreground",children:s.field}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",title:s.value,children:s.value}),e.jsx("p",{className:"text-xs text-muted-foreground/70 mt-0.5",children:s.note})]})]}),e.jsx(c,{className:a("shrink-0 text-xs",s.status==="set"?"bg-success/10 text-success border-success/20":"bg-warning/10 text-warning border-warning/20"),children:s.status==="set"?"â Set":"â Needed"})]},s.field))})]}),e.jsxs(r,{children:[e.jsxs(j,{children:[e.jsxs(v,{className:"flex items-center gap-2 text-base",children:[e.jsx(Q,{className:"w-4 h-4 text-primary"}),"Copy-Paste Reference Card"]}),e.jsx(N,{children:"Paste these values directly into EzHealthScore.com project settings"})]}),e.jsxs(n,{children:[e.jsxs("div",{className:"bg-muted/50 rounded-lg p-4 font-mono text-xs space-y-2 border",children:[e.jsx("p",{className:"text-muted-foreground",children:"// EzHealthScore Project Metadata"}),e.jsxs("p",{children:[e.jsx("span",{className:"text-info",children:"production_url"}),": ",e.jsx("span",{className:"text-success",children:"https://quantumprocure.lovable.app"})]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-info",children:"api_docs_url"}),": ",e.jsx("span",{className:"text-success",children:"https://quantumprocure.lovable.app/api-docs"})]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-info",children:"repository_url"}),": ",e.jsx("span",{className:"text-warning",children:"https://github.com/azh-consulting/quantumprocure"})]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-info",children:"app_id"}),": ",e.jsx("span",{className:"text-warning",children:"ai.quantumprocure.app"})]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-info",children:"bundle_id"}),": ",e.jsx("span",{className:"text-warning",children:"ai.quantumprocure.app"})," ",e.jsx("span",{className:"text-muted-foreground",children:"// iOS"})]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-info",children:"package_name"}),": ",e.jsx("span",{className:"text-warning",children:"ai.quantumprocure"})," ",e.jsx("span",{className:"text-muted-foreground",children:"// Android"})]}),e.jsx("p",{className:"pt-1 text-muted-foreground",children:"// tech_stack (full list):"}),e.jsx("p",{className:"text-warning break-all",children:"React 18, TypeScript, Vite, Tailwind CSS, Supabase, PostgreSQL, PLpgSQL, Deno (Edge Functions), TanStack Query v5, Capacitor (iOS/Android), Framer Motion, Radix UI"})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[e.jsxs(l,{variant:"outline",size:"sm",className:"flex items-center gap-2",onClick:()=>{navigator.clipboard.writeText(`production_url: https://quantumprocure.lovable.app 2api_docs_url: https://quantumprocure.lovable.app/api-docs 3app_id: ai.quantumprocure.app 4bundle_id: ai.quantumprocure.app 5package_name: ai.quantumprocure 6tech_stack: React 18, TypeScript, Vite, Tailwind CSS, Supabase, PostgreSQL, PLpgSQL, Deno (Edge Functions), TanStack Query v5, Capacitor (iOS/Android)`)},children:[e.jsx(ne,{className:"w-3.5 h-3.5"}),"Copy All Values"]}),e.jsx(l,{size:"sm",className:"flex items-center gap-2",asChild:!0,children:e.jsxs("a",{href:"https://ezhealthscore.com",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(L,{className:"w-3.5 h-3.5"}),"Open EzHealthScore Settings"]})})]})]})]}),e.jsx(r,{className:"border-success/20 bg-success/5",children:e.jsxs(n,{className:"p-5",children:[e.jsx("p",{className:"text-sm font-semibold text-success mb-3",children:"ð Expected Score Impact After Configuration Fix + Re-Scan"}),e.jsx("div",{className:"grid grid-cols-3 gap-4 text-center",children:[{label:"Documentation",current:20,projected:80},{label:"Security",current:40,projected:70},{label:"Performance",current:50,projected:75}].map(s=>e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:s.label}),e.jsxs("p",{className:"text-lg font-bold",children:[e.jsx("span",{className:"text-destructive",children:s.current}),e.jsx("span",{className:"text-muted-foreground mx-1",children:"â"}),e.jsxs("span",{className:"text-success",children:[s.projected,"+"]})]})]},s.label))}),e.jsx("p",{className:"text-xs text-muted-foreground mt-3 text-center",children:"README (322 lines), API docs, and CHANGELOG already exist â scanner just needs the metadata to find them."})]})})]}),e.jsxs(y,{value:"resolved",className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(C,{className:"w-5 h-5 text-success"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[x.length," issue",x.length!==1?"s":""," resolved â kept for audit trail"]})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:x.map(s=>e.jsx(M,{issue:s,onStatusChange:R},s.id))})]}),e.jsxs(y,{value:"notifications",className:"space-y-4",children:[e.jsxs(r,{children:[e.jsxs(j,{children:[e.jsxs(v,{className:"flex items-center gap-2",children:[e.jsx(H,{className:"w-5 h-5 text-primary"}),"Alert Configuration"]}),e.jsx(N,{children:"Configure when EzHealthScore sends alerts to the platform team"})]}),e.jsxs(n,{className:"space-y-4",children:[[{label:"Critical issue detected",description:"Alert immediately when a new Critical finding is added",active:!0},{label:"Score drops below threshold",description:"Alert when any dimension score drops below 50/100",active:!0},{label:"High severity issue unresolved > 7 days",description:"Escalation alert for aging high-severity findings",active:!0},{label:"New scan report available",description:"Notify when EzHealthScore publishes a new scan",active:!1},{label:"Score improvement milestone",description:"Celebrate when a dimension reaches 80+ or 90+",active:!1}].map((s,f)=>e.jsxs("div",{className:"flex items-start justify-between gap-4 p-4 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:s.label}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s.description})]}),e.jsx(c,{className:a("shrink-0",s.active?"bg-success/10 text-success border-success/20":"bg-muted text-muted-foreground"),children:s.active?"Active":"Inactive"})]},f)),e.jsxs("div",{className:"mt-4 p-4 bg-muted/30 rounded-lg",children:[e.jsx("p",{className:"text-sm font-medium mb-1",children:"Webhook Integration"}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Future: connect ezhealthscore.com webhook to receive live scan alerts automatically."}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"text-xs bg-muted px-2 py-1.5 rounded flex-1 text-muted-foreground",children:"POST https://quantumprocure.lovable.app/api/health-score/webhook"}),e.jsx(c,{variant:"outline",className:"text-xs",children:"Planned"})]})]})]})]}),e.jsxs(r,{children:[e.jsxs(j,{children:[e.jsxs(v,{className:"flex items-center gap-2",children:[e.jsx(K,{className:"w-5 h-5 text-success"}),"Expected Score Improvements"]}
6),e.jsx(N,{children:"Projected scores after all resolved items are recalibrated"})]}),e.jsx(n,{children:e.jsx("div",{className:"space-y-4",children:[{label:"Documentation",current:20,projected:85,dim:"documentation"},{label:"Security",current:40,projected:80,dim:"security"},{label:"Performance",current:50,projected:85,dim:"performance"}].map(s=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"font-medium",children:s.label}),e.jsxs("span",{className:"text-muted-foreground",children:[s.current," â ",e.jsx("span",{className:"text-success font-semibold",children:s.projected})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"flex-1 bg-muted rounded-full h-2",children:e.jsx("div",{className:"h-2 rounded-full bg-muted-foreground/30",style:{width:`${s.current}%`}})}),e.jsx("div",{className:"flex-1 bg-muted rounded-full h-2",children:e.jsx("div",{className:"h-2 rounded-full bg-success",style:{width:`${s.projected}%`}})})]}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{children:["Current: ",s.current,"/100"]}),e.jsxs("span",{children:["Projected: ",s.projected,"/100"]})]})]},s.dim))})})]})]})]})]})}export{Le 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.