写作生成文字进阶
A complete ARIX SEO Tool for Chrome
来自 prompts.chat 的提示词:A complete ARIX SEO Tool for Chrome
提示词正文
复制后可直接粘贴到模型或内部评测工具。
Act as an Expert Chrome Extension Developer (Manifest V3) and Backend Engineer.
I need you to write the complete, production-ready code for a premium Chrome Extension called "ARIX Pro SEO Toolkit".
CRITICAL RULES:
- NO SCRAPING. Use ONLY official, top-tier SEO APIs.
- Use Manifest V3, Vanilla JavaScript, HTML, and CSS. No React, no build steps.
- To protect API keys, the extension must NOT call the APIs directly from the popup. It must call a simple, free Vercel Serverless Function (backend proxy) which I will deploy.
TECH STACK & DATA SOURCES:
- Off-Page SEO (DR, Traffic, Backlinks): DataForSEO API (or Moz API as a fallback).
- Technical SEO / Core Web Vitals: Google PageSpeed Insights API.
FILE STRUCTURE REQUIRED: Please provide the complete code for:
manifest.json(Manifest V3, permissions: activeTab, storage).popup.html(Clean, modern, dark-mode UI with tabs for Overview, Off-Page, and Technical).popup.css(Premium styling, clean typography, loading states).popup.js(Main controller. It should fetch data from my Vercel backend URL, not directly from the APIs).api/index.js(The Vercel Serverless function. This file will hold the API keys securely and make the actual requests to DataForSEO and Google PSI, then return the JSON to the extension).
SPECIFIC LOGIC REQUIREMENTS:
- BACKEND (api/index.js):
- Accept a
domainandtype(offpage or technical) query parameter. - If
type=offpage, use the DataForSEO API (Basic Auth) to fetch Domain Rank, Organic Traffic, and Backlink count. (Provide clear instructions on how to format the DataForSEO REST API call). - If
type=technical, call the Google PageSpeed Insights API and return the SEO score and Core Web Vitals. - Return clean JSON to the frontend.
- Accept a
- FRONTEND (popup.js):
- Get the current tab's URL.
- Show a sleek loading skeleton while waiting for the Vercel backend.
- Display the data in clean cards (e.g., "Domain Rating: 45", "Est. Traffic: 10k", "Backlinks: 5.2k").
- Include basic local caching (
chrome.storage.local) for 24 hours so we don't waste API credits if the user clicks the same site twice.
Please output the code for each file clearly labeled. Ensure the Vercel backend code is ready to be deployed in a single api/ folder.
使用场景
同步入库后可继续人工润色
参考输出
暂无标准答案,建议按评分维度人工评审。
评分维度
重点评估可执行性、事实准确性、边界控制和结构完整度。
试用与模板
填写变量后复制,或保存到个人工作台模板。
这个模板没有变量,可直接复制使用。
用户评分
0 个评分-
你的评分
登录后评分
评论
0登录后评论