UCP Guardian is a Vite + React app that audits ecommerce storefronts for Universal Commerce Protocol (UCP) readiness. It runs a Gemini-powered scan, scores key compliance areas, highlights issues, and generates artifacts like ucp.json and a migration guide. It also offers one-click, AI-generated patch snippets per issue.
Live Demo : https://ucp-guard.web.app/
Ecommerce sites are hard for AI agents to reliably understand, search, and transact with. Missing manifests, inconsistent metadata, unclear pricing, and brittle checkout flows make AI-driven commerce unreliable.
UCP Guardian solves this by:
- Analyzing storefronts for AI-readability and protocol compliance signals.
- Generating a UCP manifest (
ucp.json) and a migration guide. - Highlighting issues with severity and suggested fixes.
- Providing auto-generated patch snippets to speed up remediation.
The audit focuses on AI-agent readiness across three areas:
- Discovery: manifest presence, metadata, and discoverability.
- Offer Clarity: pricing, availability, and product structure clarity.
- Transaction: checkout flow clarity and policy/transport signals.
Every scan generates:
- Scores (0–100) for Overall, Discovery, Offer Clarity, and Transaction.
- A list of issues with severity, description, and remediation context.
ucp.jsonmanifest content.migration_guide.md(step-by-step guidance).- Optional patch snippets (per issue) using Gemini.
The app simulates how an AI shopping agent experiences a store step-by-step. It turns audit findings into a narrative of what succeeds, what fails, and why, with a clear status per step. Demo mode uses a deterministic mock journey; real scans use Gemini to generate the journey.
- User enters a storefront URL in the scanner.
- User selects a Gemini model and optionally provides an API key.
- The app runs a Gemini-backed audit (or mock audit in demo mode).
- The app shows a dashboard with scores, issues, and generated artifacts.
- The user downloads
ucp.jsonandmigration_guide.md. - The user can generate patch snippets for each issue.
- The app automatically saves
migration_guide.mdto Firebase Storage for future reference.
- Use any URL containing
demo(example:https://demo-store.example.com). - No API key required.
- Uses built-in mock data for a fast, deterministic demo.
- Use a real storefront URL.
- Provide a valid Gemini API key.
- The app queries Gemini and generates real audit results.
- React 19 + TypeScript
- Vite
- Tailwind CSS
- Google Gemini API via
@google/genai - Firebase Storage
- Node.js (LTS recommended)
npm installnpm run devnpm run build- Enter a storefront URL.
- Provide a Gemini API key.
- Choose a model (default:
gemini-3-flash-preview). - Start the scan.
Use any URL containing the substring demo (for example: https://demo-store.example.com). This triggers a local mock audit and skips API calls.
The UI includes a “List Available Models” button that calls the Gemini models endpoint using your API key.
- Download
ucp.jsonandmigration_guide.mdfrom the dashboard sidebar. - Export an audit report JSON file from the dashboard header.
Click APPLY_AUTO_FIX on an issue to generate a code snippet. If no API key is provided, the app returns a safe mock patch.
This project uploads migration_guide.md for every completed scan to Firebase Storage at:
audits/<sanitized-url>/<scanId>/migration_guide.md.
- Enable Firebase Storage in your Firebase project.
- Add your Firebase web app config in
lib/firebase.ts(already wired in this repo). - Install dependencies:
npm installIf you want public, unauthenticated uploads for a demo, configure Storage rules accordingly. For production, require auth.
app/
App.tsx
globals.css
components/
ui/
features/
scanner/
dashboard/
lib/
gemini-client.ts
mock-client.ts
utils.ts
firebase.ts
audit-storage.ts
types/
index.ts
index.tsx
npm run devStart the dev servernpm run buildBuild for productionnpm run previewPreview the production build
Typical deploy flow:
npm install
npm run build
firebase deployThis project is licensed under the GNU General Public License v3.0.


