How devt9793-lgtm/website-qa-platform works
SiteAudit is a website QA platform: a user submits a site, the platform crawls it, checks pages across nine audit categories, enriches findings with Claude, persists a scored report, and presents progress and results. The README describes this pipeline through runAudit; the tree also exposes separate crawl and analysis API routes, so both are shown without assuming how the UI dispatches between them. Dashboard history, authentication, sharing, and exports are supporting product branches. Some UI-to-API wiring and unsampled route behavior are not evidenced in the excerpts.
Main entry points: prisma.ts PostgreSQL data · audit-runner.ts Audit runner · ReportView.tsx Report viewer · route.ts Create audit
Components 24
Audit execution
- Create audit
src/app/api/audit/route.ts - Audit runner
src/lib/audit-runner.ts - Crawl batches
src/app/api/audit/[id]/crawl/route.ts - Website crawler
src/lib/crawler.ts
Analysis
- Analyse audit
src/app/api/audit/[id]/analyse/route.ts - Static checks
src/lib/checks.ts - AI enrichment
src/lib/ai-analyzer.ts
Persistence
- PostgreSQL data
src/lib/prisma.ts - Audit status
src/app/api/audit/[id]/route.ts - History API
src/app/api/audits/route.ts
User experience
- Audit entry
src/app/page.tsx - Live progress
src/app/audit/[id]/page.tsx - Audit dashboard
src/app/dashboard/page.tsx - Finding display
src/components/audit/FindingCard.tsx - Report viewer
src/components/reports/ReportView.tsx
Reports and access
- Audit report page
src/app/report/result/[id]/page.tsx - Create share link
src/app/api/share/route.ts - Resolve share link
src/app/api/share/[slug]/route.ts - Shared report page
src/app/report/[slug]/page.tsx - Findings export
src/app/api/export/[id]/route.ts - Google sign-in
src/lib/auth.ts - Auth handler
src/app/api/auth/[...nextauth]/route.ts
Other components
- Site owner
- Anthropic Claude
Connections 32
- Site owner → Audit entry: opens
README.md - Site owner → Create audit: starts audit
README.md - Create audit → PostgreSQL data: creates audit
src/app/api/audit/route.ts - Create audit → Audit runner: starts run
src/app/api/audit/route.ts - Audit runner → Website crawler: crawls site
src/lib/audit-runner.ts - Audit runner → Static checks: runs checks
src/lib/audit-runner.ts - Audit runner → AI enrichment: enriches findings
src/lib/audit-runner.ts - Audit runner → PostgreSQL data: persists results
src/lib/audit-runner.ts - Crawl batches → PostgreSQL data: loads and saves
src/app/api/audit/[id]/crawl/route.ts - Crawl batches → Website crawler: fetches pages
src/app/api/audit/[id]/crawl/route.ts - Analyse audit → PostgreSQL data: loads and saves
src/app/api/audit/[id]/analyse/route.ts - Analyse audit → Static checks: runs checks
src/app/api/audit/[id]/analyse/route.ts - Analyse audit → AI enrichment: enriches findings
src/app/api/audit/[id]/analyse/route.ts - AI enrichment → Anthropic Claude: requests analysis
README.md - Live progress → Audit status: polls progress
README.md - Audit status → PostgreSQL data: reads audit
src/app/api/audit/[id]/route.ts - Audit dashboard → History API: loads history
src/app/dashboard/page.tsx - History API → PostgreSQL data: queries audits
src/app/api/audits/route.ts - Audit report page → PostgreSQL data: loads report
src/app/report/result/[id]/page.tsx - Audit report page → Report viewer: renders report
src/app/report/result/[id]/page.tsx - Shared report page → Resolve share link: resolves share
- Shared report page → Report viewer: renders report
src/app/report/[slug]/page.tsx - Create share link → PostgreSQL data: stores link
src/app/api/share/route.ts - Resolve share link → PostgreSQL data: looks up link
src/app/api/share/[slug]/route.ts - Report viewer → Create share link: requests sharing
README.md - Report viewer → Findings export: requests export
README.md - Findings export → PostgreSQL data: loads findings
src/app/api/export/[id]/route.ts - Auth handler → Google sign-in: delegates auth
src/app/api/auth/[...nextauth]/route.ts - Google sign-in → PostgreSQL data: uses adapter
src/lib/auth.ts - Create audit → Google sign-in: checks session
src/app/api/audit/route.ts - History API → Google sign-in: checks session
src/app/api/audits/route.ts - Finding display → Report viewer: displays findings