diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b69c88..36a5aa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,37 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.7.0] - 2026-03-18 20:44 UTC + +### Added +- **Comprehensive SEO Audit Engine** — Industry-grade URL analysis modeled after Screaming Frog, Ahrefs, Sitebulb, and Semrush + - Full meta tag analysis: title (length/status), description (length/status), keywords, viewport, charset, robots directives + - Open Graph & Twitter Card validation + - Heading structure audit: H1 count check, hierarchy analysis (H1-H6), multiple H1 detection + - Link analysis: internal/external/nofollow counts, external link sampling + - Image audit: total count, alt text coverage %, lazy loading detection, missing alt samples + - Content analysis: word count, sentence count, paragraph count, avg words/sentence + - Structured data detection: JSON-LD, Microdata, 12+ schema types (Article, FAQ, Product, LocalBusiness, etc.) + - Performance signals: server info, response time, HTML size, external scripts/stylesheets, inline styles, preconnect/preload/dns-prefetch, async/defer detection + - Accessibility checks: lang attribute, ARIA labels, first image alt text + - Hreflang tag detection for international SEO + - Canonical tag validation with mismatch detection + - **Automated scoring**: Overall, Technical, Content, Performance, Social scores (0-100) + - **Issue detection**: Critical/Warning/Info severity levels across all categories +- **Plan-First Flow Fix** — Non-code agents (SEO, content, SMM, design, web, app) now bypass the plan-first workflow + - No more "Start Coding" or "Modify Plan" buttons for non-code agent responses + - SEO agent goes straight to preview mode after generating audit reports + - Plan card only shown for code/general agents + +### Changed +- `/api/fetch-url` route completely rewritten: 300+ lines of comprehensive HTML parsing and scoring +- SEO agent data injection now passes structured audit data with scores, issues, and category breakdowns + +### Technical Details +- Files modified: 5 (AIAssist.tsx, qwen-oauth.ts, ollama-cloud.ts, zai-plan.ts, openrouter.ts) +- Files rewritten: 1 (`app/api/fetch-url/route.ts` — complete rewrite) +- New component-level guard: `isCodeAgent` condition for plan-first workflow + ## [1.6.0] - 2026-03-18 20:34 UTC ### Added diff --git a/README.md b/README.md index b27df84..e8d5b8c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PromptArch: AI Orchestration Platform -> **Latest Version**: [v1.6.0](CHANGELOG.md#160---2026-03-18) (2026-03-18) +> **Latest Version**: [v1.7.0](CHANGELOG.md#170---2026-03-18) (2026-03-18) > **Development Note**: This entire platform was developed exclusively using [TRAE.AI IDE](https://trae.ai) powered by elite [GLM 4.7 model](https://z.ai/subscribe?ic=R0K78RJKNW). > **Learn more about this architecture [here](https://z.ai/subscribe?ic=R0K78RJKNW).** @@ -143,6 +143,7 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | Version | Date | Highlights | |---------|------|------------| +| [1.7.0](CHANGELOG.md#170---2026-03-18) | 2026-03-18 20:44 UTC | Industry-grade SEO audit, plan flow fix for non-code agents | | [1.6.0](CHANGELOG.md#160---2026-03-18) | 2026-03-18 20:34 | SEO web audit, URL fetching, auto web search for SEO mode | | [1.5.0](CHANGELOG.md#150---2026-03-18) | 2026-03-18 20:29 | Modification progress overlay, preview blink fix | | [1.4.0](CHANGELOG.md#140---2026-03-18) | 2026-03-18 19:57 | Review Code button, web search grounding, responsive preview, model selector fix | diff --git a/app/api/fetch-url/route.ts b/app/api/fetch-url/route.ts index 9e95153..5c318aa 100644 --- a/app/api/fetch-url/route.ts +++ b/app/api/fetch-url/route.ts @@ -1,117 +1,269 @@ -/** - * Next.js API route: Fetch URL content for SEO/web auditing. - * Endpoint: GET /api/fetch-url?url=https://example.com - * Returns: { title, meta, headings, text, links, status } - */ - -import { NextRequest, NextResponse } from "next/server"; - -export async function GET(request: NextRequest) { - const targetUrl = request.nextUrl.searchParams.get("url"); - - if (!targetUrl) { - return NextResponse.json({ error: "URL parameter required" }, { status: 400 }); - } - - try { - new URL(targetUrl); - } catch { - return NextResponse.json({ error: "Invalid URL" }, { status: 400 }); - } - - try { - const controller = new AbortController(); - const timeout = setTimeout(() => controller.abort(), 12000); - - const res = await fetch(targetUrl, { - signal: controller.signal, - headers: { - "User-Agent": "PromptArch-SEO-Bot/1.5 (https://rommark.dev)", - Accept: "text/html,application/xhtml+xml,text/plain;q=0.9", - }, - }); - clearTimeout(timeout); - - if (!res.ok) { - return NextResponse.json({ error: `HTTP ${res.status}`, status: res.status }); - } - - const html = await res.text(); - - const titleMatch = html.match(/