@ucptools/validator 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CLAUDE.md +109 -0
  2. package/CONTRIBUTING.md +113 -0
  3. package/LICENSE +21 -0
  4. package/README.md +203 -0
  5. package/api/analyze-feed.js +140 -0
  6. package/api/badge.js +185 -0
  7. package/api/benchmark.js +177 -0
  8. package/api/directory-stats.ts +29 -0
  9. package/api/directory.ts +73 -0
  10. package/api/generate-compliance.js +143 -0
  11. package/api/generate-schema.js +457 -0
  12. package/api/generate.js +132 -0
  13. package/api/security-scan.js +133 -0
  14. package/api/simulate.js +187 -0
  15. package/api/tsconfig.json +10 -0
  16. package/api/validate.js +1351 -0
  17. package/apify-actor/.actor/actor.json +68 -0
  18. package/apify-actor/.actor/input_schema.json +32 -0
  19. package/apify-actor/APIFY-STORE-LISTING.md +412 -0
  20. package/apify-actor/Dockerfile +8 -0
  21. package/apify-actor/README.md +166 -0
  22. package/apify-actor/main.ts +111 -0
  23. package/apify-actor/package.json +17 -0
  24. package/apify-actor/src/main.js +199 -0
  25. package/docs/BRAND-IDENTITY.md +238 -0
  26. package/docs/BRAND-STYLE-GUIDE.md +356 -0
  27. package/drizzle/0000_black_king_cobra.sql +39 -0
  28. package/drizzle/meta/0000_snapshot.json +309 -0
  29. package/drizzle/meta/_journal.json +13 -0
  30. package/drizzle.config.ts +10 -0
  31. package/examples/full-profile.json +70 -0
  32. package/examples/minimal-profile.json +23 -0
  33. package/package.json +69 -0
  34. package/public/.well-known/ucp +25 -0
  35. package/public/android-chrome-192x192.png +0 -0
  36. package/public/android-chrome-512x512.png +0 -0
  37. package/public/apple-touch-icon.png +0 -0
  38. package/public/brand.css +321 -0
  39. package/public/directory.html +701 -0
  40. package/public/favicon-16x16.png +0 -0
  41. package/public/favicon-32x32.png +0 -0
  42. package/public/favicon.ico +0 -0
  43. package/public/guides/bigcommerce.html +743 -0
  44. package/public/guides/fastucp.html +838 -0
  45. package/public/guides/magento.html +779 -0
  46. package/public/guides/shopify.html +726 -0
  47. package/public/guides/squarespace.html +749 -0
  48. package/public/guides/wix.html +747 -0
  49. package/public/guides/woocommerce.html +733 -0
  50. package/public/index.html +3835 -0
  51. package/public/learn.html +396 -0
  52. package/public/logo.jpeg +0 -0
  53. package/public/og-image-icon.png +0 -0
  54. package/public/og-image.png +0 -0
  55. package/public/robots.txt +6 -0
  56. package/public/site.webmanifest +31 -0
  57. package/public/sitemap.xml +69 -0
  58. package/public/social/linkedin-banner-1128x191.png +0 -0
  59. package/public/social/temp.PNG +0 -0
  60. package/public/social/x-header-1500x500.png +0 -0
  61. package/public/verify.html +410 -0
  62. package/scripts/generate-favicons.js +44 -0
  63. package/scripts/generate-ico.js +23 -0
  64. package/scripts/generate-og-image.js +45 -0
  65. package/scripts/reset-db.ts +77 -0
  66. package/scripts/seed-db.ts +71 -0
  67. package/scripts/setup-benchmark-db.js +70 -0
  68. package/src/api/server.ts +266 -0
  69. package/src/cli/index.ts +302 -0
  70. package/src/compliance/compliance-generator.ts +452 -0
  71. package/src/compliance/index.ts +28 -0
  72. package/src/compliance/templates.ts +338 -0
  73. package/src/compliance/types.ts +170 -0
  74. package/src/db/index.ts +28 -0
  75. package/src/db/schema.ts +84 -0
  76. package/src/feed-analyzer/feed-analyzer.ts +726 -0
  77. package/src/feed-analyzer/index.ts +34 -0
  78. package/src/feed-analyzer/types.ts +354 -0
  79. package/src/generator/index.ts +7 -0
  80. package/src/generator/key-generator.ts +124 -0
  81. package/src/generator/profile-builder.ts +402 -0
  82. package/src/hosting/artifacts-generator.ts +679 -0
  83. package/src/hosting/index.ts +6 -0
  84. package/src/index.ts +105 -0
  85. package/src/security/index.ts +15 -0
  86. package/src/security/security-scanner.ts +604 -0
  87. package/src/security/types.ts +55 -0
  88. package/src/services/directory.ts +434 -0
  89. package/src/simulator/agent-simulator.ts +941 -0
  90. package/src/simulator/index.ts +7 -0
  91. package/src/simulator/types.ts +170 -0
  92. package/src/types/generator.ts +140 -0
  93. package/src/types/index.ts +7 -0
  94. package/src/types/ucp-profile.ts +140 -0
  95. package/src/types/validation.ts +89 -0
  96. package/src/validator/index.ts +194 -0
  97. package/src/validator/network-validator.ts +417 -0
  98. package/src/validator/rules-validator.ts +297 -0
  99. package/src/validator/sdk-validator.ts +330 -0
  100. package/src/validator/structural-validator.ts +476 -0
  101. package/tests/fixtures/non-compliant-profile.json +25 -0
  102. package/tests/fixtures/official-sample-profile.json +75 -0
  103. package/tests/integration/benchmark.test.ts +207 -0
  104. package/tests/integration/database.test.ts +163 -0
  105. package/tests/integration/directory-api.test.ts +268 -0
  106. package/tests/integration/simulate-api.test.ts +230 -0
  107. package/tests/integration/validate-api.test.ts +269 -0
  108. package/tests/setup.ts +15 -0
  109. package/tests/unit/agent-simulator.test.ts +575 -0
  110. package/tests/unit/compliance-generator.test.ts +374 -0
  111. package/tests/unit/directory-service.test.ts +272 -0
  112. package/tests/unit/feed-analyzer.test.ts +517 -0
  113. package/tests/unit/lint-suggestions.test.ts +423 -0
  114. package/tests/unit/official-samples.test.ts +211 -0
  115. package/tests/unit/pdf-report.test.ts +390 -0
  116. package/tests/unit/sdk-validator.test.ts +531 -0
  117. package/tests/unit/security-scanner.test.ts +410 -0
  118. package/tests/unit/validation.test.ts +390 -0
  119. package/tsconfig.json +20 -0
  120. package/vercel.json +34 -0
  121. package/vitest.config.ts +22 -0
@@ -0,0 +1,68 @@
1
+ {
2
+ "actorSpecification": 1,
3
+ "name": "ucp-profile-validator",
4
+ "title": "UCP Profile Validator",
5
+ "description": "Validate any merchant's Universal Commerce Protocol (UCP) business profile at /.well-known/ucp. Check AI commerce readiness with instant A-F grading, detailed issue reports, and fix recommendations. Essential for e-commerce stores preparing for AI shopping agents.",
6
+ "version": "1.0",
7
+ "buildTag": "latest",
8
+ "environmentVariables": {},
9
+ "dockerfile": "./Dockerfile",
10
+ "input": "./input_schema.json",
11
+ "readme": "./README.md",
12
+ "storages": {
13
+ "dataset": {
14
+ "actorSpecification": 1,
15
+ "title": "UCP Validation Results",
16
+ "description": "Validation results for UCP business profiles including compliance scores, issues found, and fix recommendations.",
17
+ "views": {
18
+ "overview": {
19
+ "title": "Validation Overview",
20
+ "description": "Summary of validation results with grades and issue counts.",
21
+ "transformation": {
22
+ "fields": ["domain", "valid", "grade", "score", "errors", "warnings", "ucpVersion", "checkedAt"]
23
+ },
24
+ "display": {
25
+ "component": "table",
26
+ "properties": {
27
+ "domain": { "label": "Domain", "format": "text" },
28
+ "valid": { "label": "Valid", "format": "boolean" },
29
+ "grade": { "label": "Grade", "format": "text" },
30
+ "score": { "label": "Score", "format": "number" },
31
+ "errors": { "label": "Errors", "format": "number" },
32
+ "warnings": { "label": "Warnings", "format": "number" },
33
+ "ucpVersion": { "label": "UCP Version", "format": "text" },
34
+ "checkedAt": { "label": "Checked At", "format": "date" }
35
+ }
36
+ }
37
+ },
38
+ "issues": {
39
+ "title": "Issues Detail",
40
+ "description": "Detailed list of all validation issues found.",
41
+ "transformation": {
42
+ "fields": ["domain", "grade", "issues"]
43
+ },
44
+ "display": {
45
+ "component": "table",
46
+ "properties": {
47
+ "domain": { "label": "Domain", "format": "text" },
48
+ "grade": { "label": "Grade", "format": "text" },
49
+ "issues": { "label": "Issues", "format": "array" }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ },
56
+ "useCases": [
57
+ "Validate your store's UCP profile before AI agent integration",
58
+ "Audit competitor UCP readiness",
59
+ "Monitor multiple merchant profiles for compliance",
60
+ "Pre-launch check for headless commerce deployments",
61
+ "Agency bulk validation of client stores"
62
+ ],
63
+ "exampleRunInput": {
64
+ "domain": "google.com",
65
+ "mode": "full",
66
+ "includeRecommendations": true
67
+ }
68
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "title": "UCP Profile Validator",
3
+ "description": "Enter a domain to validate its UCP (Universal Commerce Protocol) business profile. The validator fetches the profile from <code>/.well-known/ucp</code> and checks compliance with the <a href=\"https://ucp.dev/specification/overview/\" target=\"_blank\">official UCP specification</a>.<br><br><b>Quick start:</b> Just enter a domain and click Run. For help generating a valid profile, visit <a href=\"https://ucptools.dev\" target=\"_blank\">ucptools.dev</a>.",
4
+ "type": "object",
5
+ "schemaVersion": 1,
6
+ "properties": {
7
+ "domain": {
8
+ "title": "Domain",
9
+ "type": "string",
10
+ "description": "Enter the merchant domain to validate (without https://). We'll fetch and validate the profile at <code>https://{domain}/.well-known/ucp</code>",
11
+ "editor": "textfield",
12
+ "prefill": "google.com",
13
+ "example": "shopify.com"
14
+ },
15
+ "mode": {
16
+ "title": "Validation Mode",
17
+ "type": "string",
18
+ "description": "Choose validation depth:<br>• <b>Full</b> - Complete validation including network checks (recommended)<br>• <b>Quick</b> - Structural validation only, faster but less thorough",
19
+ "editor": "select",
20
+ "default": "full",
21
+ "enum": ["full", "quick"],
22
+ "enumTitles": ["Full (recommended)", "Quick (structural only)"]
23
+ },
24
+ "includeRecommendations": {
25
+ "title": "Include Fix Recommendations",
26
+ "type": "boolean",
27
+ "description": "When enabled, the output includes actionable recommendations for fixing each issue found. Useful for developers implementing UCP for the first time.",
28
+ "default": true
29
+ }
30
+ },
31
+ "required": ["domain"]
32
+ }
@@ -0,0 +1,412 @@
1
+ # Apify Store Listing - UCP Profile Validator
2
+
3
+ Complete copy-paste content for Apify Store publication. Updated January 2026.
4
+
5
+ ---
6
+
7
+ ## 1. DISPLAY INFORMATION
8
+
9
+ ### Actor Name
10
+ ```
11
+ ucp-profile-validator
12
+ ```
13
+
14
+ ### Title
15
+ ```
16
+ UCP Profile Validator
17
+ ```
18
+
19
+ ### Description (exactly 300 characters)
20
+ ```
21
+ Validate any merchant's Universal Commerce Protocol (UCP) business profile at /.well-known/ucp. Check AI commerce readiness with instant A-F grading, detailed issue reports, and fix recommendations. Essential for e-commerce stores preparing for AI shopping agents.
22
+ ```
23
+ *Character count: 299*
24
+
25
+ ### SEO Title (40-50 characters)
26
+ ```
27
+ UCP Profile Validator - AI Commerce Readiness Check
28
+ ```
29
+ *Character count: 50*
30
+
31
+ ### SEO Description (140-156 characters)
32
+ ```
33
+ Free UCP profile validator. Check if your store's /.well-known/ucp endpoint is ready for AI shopping agents. Get instant A-F grade with fix recommendations.
34
+ ```
35
+ *Character count: 156*
36
+
37
+ ---
38
+
39
+ ## 2. CATEGORIES & TAGS
40
+
41
+ ### Primary Category
42
+ ```
43
+ Developer Tools
44
+ ```
45
+
46
+ ### Additional Categories
47
+ ```
48
+ E-commerce
49
+ SEO Tools
50
+ ```
51
+
52
+ ### Tags/Keywords (comma-separated)
53
+ ```
54
+ ucp, universal commerce protocol, ai commerce, ecommerce validation, api validation, schema validation, well-known, ai shopping, agent commerce, google ucp, shopify ucp, ai agents, commerce api, merchant profile
55
+ ```
56
+
57
+ ---
58
+
59
+ ## 3. PRICING CONFIGURATION
60
+
61
+ ### Pricing Model
62
+ ```
63
+ Pay per event (PAY_PER_EVENT) with Synthetic Events
64
+ ```
65
+
66
+ ### Why Pay Per Event?
67
+
68
+ | Model | Status | AI/MCP Compatible | Notes |
69
+ |-------|--------|-------------------|-------|
70
+ | Free | Available | Yes | No revenue |
71
+ | Rental | Available | **No** | Incompatible with AI agents |
72
+ | Pay Per Result | **DEPRECATED** | Yes | Being removed in 2026 |
73
+ | **Pay Per Event** | **RECOMMENDED** | Yes | Most flexible, future-proof |
74
+
75
+ ### Why Use Synthetic Events (No Code Needed!)
76
+
77
+ Apify provides **synthetic events** that auto-charge without any `Actor.charge()` code:
78
+
79
+ 1. **`apify-actor-start`** - Auto-charged when actor starts
80
+ - **Apify covers first 5 seconds of compute FREE**
81
+ - Default price: $0.00005 per start
82
+
83
+ 2. **`apify-default-dataset-item`** - Auto-charged on each `Actor.pushData()`
84
+ - You set the price per result
85
+ - No code changes needed - just configure in Console
86
+
87
+ ### Recommended Event Configuration
88
+
89
+ | Event | Type | Price | Description |
90
+ |-------|------|-------|-------------|
91
+ | `apify-actor-start` | Synthetic (auto) | $0.00005 | Charged per run start (Apify subsidizes first 5 sec) |
92
+ | `apify-default-dataset-item` | Synthetic (auto) | $0.001 | Charged per validation result |
93
+
94
+ ### Tiered Pricing for `apify-default-dataset-item`
95
+
96
+ | Tier | Price per Result | Price per 1,000 |
97
+ |------|-----------------|-----------------|
98
+ | FREE | $0.002 | $2.00 |
99
+ | BRONZE | $0.0018 | $1.80 |
100
+ | SILVER | $0.0015 | $1.50 |
101
+ | GOLD | $0.001 | $1.00 |
102
+ | PLATINUM | $0.001 | $1.00 |
103
+ | DIAMOND | $0.001 | $1.00 |
104
+
105
+ ### Example Cost Calculation
106
+
107
+ For 100 validations on FREE tier:
108
+ - Actor starts: 100 × $0.00005 = $0.005
109
+ - Results: 100 × $0.002 = $0.20
110
+ - **Total: $0.205** (~$2.05 per 1,000 validations)
111
+
112
+ For 100 validations on GOLD tier:
113
+ - Actor starts: 100 × $0.00005 = $0.005
114
+ - Results: 100 × $0.001 = $0.10
115
+ - **Total: $0.105** (~$1.05 per 1,000 validations)
116
+
117
+ ### Revenue Calculation
118
+
119
+ You receive 80% of revenue minus platform costs:
120
+ - Revenue from 1,000 validations (GOLD): $1.05
121
+ - Platform cost estimate: ~$0.10
122
+ - **Your profit: (0.8 × $1.05) - $0.10 = $0.74**
123
+
124
+ ### Why This Pricing Works
125
+
126
+ 1. **No code needed** - Synthetic events handle charging automatically
127
+ 2. **Apify subsidizes startup** - First 5 sec compute is free
128
+ 3. **Competitive** - Similar to email validators ($0.001-0.002)
129
+ 4. **AI/MCP compatible** - Essential for future AI agent integrations
130
+ 5. **Future-proof** - PPR is deprecated, PPE is the standard
131
+
132
+ ---
133
+
134
+ ## 4. INPUT SCHEMA
135
+
136
+ Already configured in `.actor/input_schema.json`:
137
+
138
+ ```json
139
+ {
140
+ "title": "UCP Profile Validator",
141
+ "description": "Enter a domain to validate its UCP (Universal Commerce Protocol) business profile...",
142
+ "type": "object",
143
+ "schemaVersion": 1,
144
+ "properties": {
145
+ "domain": {
146
+ "title": "Domain",
147
+ "type": "string",
148
+ "description": "Enter the merchant domain to validate (without https://)...",
149
+ "editor": "textfield",
150
+ "prefill": "google.com",
151
+ "example": "shopify.com"
152
+ },
153
+ "mode": {
154
+ "title": "Validation Mode",
155
+ "type": "string",
156
+ "default": "full",
157
+ "enum": ["full", "quick"],
158
+ "enumTitles": ["Full (recommended)", "Quick (structural only)"]
159
+ },
160
+ "includeRecommendations": {
161
+ "title": "Include Fix Recommendations",
162
+ "type": "boolean",
163
+ "default": true
164
+ }
165
+ },
166
+ "required": ["domain"]
167
+ }
168
+ ```
169
+
170
+ ---
171
+
172
+ ## 5. OUTPUT SCHEMA
173
+
174
+ ### Output Fields
175
+
176
+ | Field | Type | Description |
177
+ |-------|------|-------------|
178
+ | `domain` | string | The validated domain |
179
+ | `profileUrl` | string | Full URL of the UCP profile |
180
+ | `valid` | boolean | Whether profile passes validation |
181
+ | `score` | number | Compliance score 0-100 |
182
+ | `grade` | string | Letter grade A-F |
183
+ | `ucpVersion` | string | Detected UCP spec version |
184
+ | `errors` | number | Count of error-level issues |
185
+ | `warnings` | number | Count of warning-level issues |
186
+ | `issues` | array | Detailed list of all issues found |
187
+ | `recommendations` | array | Actionable fix suggestions |
188
+ | `checkedAt` | string | ISO timestamp of validation |
189
+ | `generatorUrl` | string | Link to profile generator tool |
190
+
191
+ ### Sample Output
192
+ ```json
193
+ {
194
+ "domain": "example.com",
195
+ "profileUrl": "https://example.com/.well-known/ucp",
196
+ "valid": false,
197
+ "score": 60,
198
+ "grade": "D",
199
+ "ucpVersion": "2026-01-11",
200
+ "errors": 2,
201
+ "warnings": 1,
202
+ "issues": [
203
+ {
204
+ "severity": "error",
205
+ "code": "UCP_NS_MISMATCH",
206
+ "message": "dev.ucp.* spec must be on ucp.dev"
207
+ }
208
+ ],
209
+ "recommendations": [
210
+ "Fix all errors before deploying",
211
+ "Add signing_keys for Order capability"
212
+ ],
213
+ "checkedAt": "2026-01-14T12:00:00.000Z",
214
+ "generatorUrl": "https://ucptools.dev/generate"
215
+ }
216
+ ```
217
+
218
+ ---
219
+
220
+ ## 6. EXAMPLE INPUTS
221
+
222
+ ### Basic Input
223
+ ```json
224
+ {
225
+ "domain": "google.com"
226
+ }
227
+ ```
228
+
229
+ ### Full Options
230
+ ```json
231
+ {
232
+ "domain": "mystore.com",
233
+ "mode": "full",
234
+ "includeRecommendations": true
235
+ }
236
+ ```
237
+
238
+ ### Quick Validation
239
+ ```json
240
+ {
241
+ "domain": "mystore.com",
242
+ "mode": "quick"
243
+ }
244
+ ```
245
+
246
+ ---
247
+
248
+ ## 7. USE CASES (for Store listing)
249
+
250
+ Copy these directly:
251
+
252
+ ```
253
+ - Validate your store's UCP profile before AI agent integration
254
+ - Audit competitor UCP readiness
255
+ - Monitor multiple merchant profiles for compliance
256
+ - Pre-launch check for headless commerce deployments
257
+ - Agency bulk validation of client stores
258
+ ```
259
+
260
+ ---
261
+
262
+ ## 8. FAQ CONTENT
263
+
264
+ ### Q: What is UCP?
265
+ ```
266
+ The Universal Commerce Protocol is an open standard by Google, Shopify, and others that enables AI agents to discover and shop at online stores. Merchants publish a profile at /.well-known/ucp describing their capabilities.
267
+ ```
268
+
269
+ ### Q: Why do I need this validator?
270
+ ```
271
+ If your UCP profile has errors, AI shopping agents won't be able to find or transact with your store. This validator catches issues before they become problems, ensuring you're ready when AI commerce goes mainstream.
272
+ ```
273
+
274
+ ### Q: What does the grade mean?
275
+ ```
276
+ A = Fully compliant (90-100 score)
277
+ B = Minor issues (80-89)
278
+ C = Several issues (70-79)
279
+ D = Significant problems (60-69)
280
+ F = Broken or missing (0-59)
281
+ ```
282
+
283
+ ### Q: How do I fix issues?
284
+ ```
285
+ Each issue includes an error code and recommendation. Visit https://ucptools.dev/generate to create a new profile from scratch, or manually fix the issues based on the recommendations provided.
286
+ ```
287
+
288
+ ### Q: Can I validate multiple domains?
289
+ ```
290
+ Yes! Use the Apify API or schedules to validate multiple domains in bulk. Perfect for agencies managing many stores or monitoring competitors.
291
+ ```
292
+
293
+ ### Q: Is this affiliated with Google or Shopify?
294
+ ```
295
+ No. UCP.tools is an independent project that validates against the official UCP specification. We are not affiliated with Google, Shopify, or any other UCP consortium member.
296
+ ```
297
+
298
+ ---
299
+
300
+ ## 9. ICON/LOGO
301
+
302
+ Recommended: Create a simple icon featuring:
303
+ - Checkmark or shield symbol (validation/security)
304
+ - Commerce/shopping cart element
305
+ - Colors: Blue (#2563eb) and green (#16a34a)
306
+ - Do NOT use Google, Shopify, or UCP consortium logos
307
+
308
+ ---
309
+
310
+ ## 10. AUTHOR INFORMATION
311
+
312
+ ### Developer Name
313
+ ```
314
+ UCP.tools
315
+ ```
316
+
317
+ ### Website
318
+ ```
319
+ https://ucptools.dev
320
+ ```
321
+
322
+ ### Support Email
323
+ ```
324
+ hello@ucptools.dev
325
+ ```
326
+
327
+ ---
328
+
329
+ ## 11. PUBLICATION CHECKLIST
330
+
331
+ ### Before Publishing
332
+ - [x] Actor code tested and working
333
+ - [x] README.md complete with all sections
334
+ - [x] Input schema with descriptions and prefills
335
+ - [x] Output schema with dataset views
336
+ - [x] actor.json with metadata and use cases
337
+ - [x] Description exactly 300 characters
338
+ - [x] SEO title and description set
339
+ - [ ] Icon/logo uploaded
340
+ - [ ] Categories selected
341
+ - [ ] Tags added
342
+ - [ ] Pricing configured
343
+
344
+ ### After Publishing
345
+ - [ ] Test run from Store page
346
+ - [ ] Verify output displays correctly
347
+ - [ ] Check SEO by searching "UCP validator Apify"
348
+ - [ ] Share on social media
349
+ - [ ] Add Actor badge to ucptools.dev website
350
+
351
+ ---
352
+
353
+ ## 12. DEPLOYMENT COMMANDS
354
+
355
+ ### Push to Apify
356
+ ```bash
357
+ cd ucp-profile-manager/apify-actor
358
+ apify push
359
+ ```
360
+
361
+ ### Test Run via CLI
362
+ ```bash
363
+ apify call ucp-profile-validator -i '{"domain": "google.com"}'
364
+ ```
365
+
366
+ ### View Actor (Console)
367
+ ```
368
+ https://console.apify.com/actors/zNlcAOgvdpdzblpIA
369
+ ```
370
+
371
+ ### Store Listing (Public)
372
+ ```
373
+ https://apify.com/minute_contest/ucp-profile-validator
374
+ ```
375
+
376
+ ---
377
+
378
+ ## 13. PROMOTION CHECKLIST
379
+
380
+ After publishing:
381
+
382
+ 1. **Apify Community**
383
+ - Post in Apify Discord
384
+ - Share on Apify community forum
385
+
386
+ 2. **Social Media**
387
+ - Twitter: Announce with #AICommerce #UCP hashtags
388
+ - LinkedIn: Post about AI commerce readiness
389
+
390
+ 3. **SEO**
391
+ - Add Actor to ucptools.dev website
392
+ - Create blog post about UCP validation
393
+
394
+ 4. **Integrations**
395
+ - Add to n8n community nodes list
396
+ - Create Make.com integration template
397
+ - Build Zapier integration
398
+
399
+ ---
400
+
401
+ ## 14. VERSION HISTORY
402
+
403
+ ### v1.0 (2026-01-14)
404
+ - Initial release
405
+ - Full UCP spec validation
406
+ - A-F grading system
407
+ - Fix recommendations
408
+ - Quick and full validation modes
409
+
410
+ ---
411
+
412
+ *Last updated: January 14, 2026*
@@ -0,0 +1,8 @@
1
+ FROM apify/actor-node:20
2
+
3
+ COPY --chown=myuser package*.json ./
4
+ RUN npm install --omit=dev
5
+
6
+ COPY --chown=myuser . ./
7
+
8
+ CMD ["node", "src/main.js"]
@@ -0,0 +1,166 @@
1
+ # UCP Profile Validator
2
+
3
+ Validate any merchant's **Universal Commerce Protocol (UCP)** business profile and check if their store is ready for AI-powered commerce agents.
4
+
5
+ ## What does UCP Profile Validator do?
6
+
7
+ This Actor fetches and validates UCP business profiles published at `/.well-known/ucp`. It checks compliance with the [official UCP specification](https://ucp.dev/specification/overview/) and provides:
8
+
9
+ - **Instant A-F grading** based on compliance score (0-100)
10
+ - **Detailed issue reports** with error codes and severity levels
11
+ - **Actionable fix recommendations** for each problem found
12
+ - **UCP version detection** to ensure you're using the latest spec
13
+
14
+ ## What is UCP?
15
+
16
+ The [Universal Commerce Protocol](https://ucp.dev) is an open standard developed by Google, Shopify, and other industry leaders. It enables AI shopping agents to:
17
+
18
+ - Discover online stores programmatically
19
+ - Understand store capabilities (checkout, orders, fulfillment)
20
+ - Transact securely with proper authentication
21
+
22
+ Merchants publish their UCP profile at `https://yourdomain.com/.well-known/ucp` to participate in AI-powered commerce.
23
+
24
+ ## Why validate your UCP profile?
25
+
26
+ - **AI agents can't find you**: Invalid profiles mean AI shopping assistants skip your store
27
+ - **Lost sales**: Customers using AI tools won't be able to purchase from you
28
+ - **Compliance issues**: Incorrect schemas break integrations with payment and fulfillment systems
29
+ - **Competitive disadvantage**: Early UCP adopters capture AI-driven traffic first
30
+
31
+ ## How to use UCP Profile Validator
32
+
33
+ 1. Enter the domain you want to validate (e.g., `mystore.com`)
34
+ 2. Select validation mode (Full recommended for comprehensive checks)
35
+ 3. Click **Run**
36
+ 4. Review the grade, issues, and recommendations in the output
37
+
38
+ ### Input options
39
+
40
+ | Field | Description | Default |
41
+ |-------|-------------|---------|
42
+ | `domain` | Merchant domain to validate | Required |
43
+ | `mode` | `full` (comprehensive) or `quick` (structural only) | `full` |
44
+ | `includeRecommendations` | Add fix suggestions to output | `true` |
45
+
46
+ ## Validation checks performed
47
+
48
+ | Check | Severity | Description |
49
+ |-------|----------|-------------|
50
+ | Profile accessibility | Error | Can we reach `/.well-known/ucp`? |
51
+ | JSON structure | Error | Valid JSON with required `ucp` object |
52
+ | Version format | Error | Must be `YYYY-MM-DD` format |
53
+ | Services defined | Error | At least one service with transport binding |
54
+ | Capabilities array | Error | Required capabilities with name/version/spec/schema |
55
+ | HTTPS endpoints | Error | All endpoints must use HTTPS |
56
+ | Namespace validation | Error | `dev.ucp.*` must use `ucp.dev` URLs |
57
+ | Extension chains | Error | Parent capabilities must exist |
58
+ | Signing keys | Error | Required if Order capability is present |
59
+ | Trailing slashes | Warning | Endpoints should not have trailing `/` |
60
+
61
+ ## Output example
62
+
63
+ ```json
64
+ {
65
+ "domain": "example.com",
66
+ "profileUrl": "https://example.com/.well-known/ucp",
67
+ "valid": false,
68
+ "score": 60,
69
+ "grade": "D",
70
+ "ucpVersion": "2026-01-11",
71
+ "errors": 2,
72
+ "warnings": 1,
73
+ "issues": [
74
+ {
75
+ "severity": "error",
76
+ "code": "UCP_NS_MISMATCH",
77
+ "message": "dev.ucp.* spec must be on ucp.dev"
78
+ },
79
+ {
80
+ "severity": "error",
81
+ "code": "UCP_MISSING_KEYS",
82
+ "message": "Order requires signing_keys"
83
+ },
84
+ {
85
+ "severity": "warn",
86
+ "code": "UCP_TRAILING_SLASH",
87
+ "message": "Remove trailing slash"
88
+ }
89
+ ],
90
+ "recommendations": [
91
+ "Fix all errors before deploying",
92
+ "Add signing_keys for Order capability"
93
+ ],
94
+ "checkedAt": "2026-01-14T12:00:00.000Z",
95
+ "generatorUrl": "https://ucptools.dev/generate"
96
+ }
97
+ ```
98
+
99
+ ## Grading system
100
+
101
+ | Grade | Score | Meaning |
102
+ |-------|-------|---------|
103
+ | **A** | 90-100 | Fully compliant, ready for AI agents |
104
+ | **B** | 80-89 | Minor issues, mostly ready |
105
+ | **C** | 70-79 | Several issues to fix |
106
+ | **D** | 60-69 | Significant problems |
107
+ | **F** | 0-59 | Profile broken or missing |
108
+
109
+ ## How much does it cost?
110
+
111
+ This Actor uses **pay-per-event pricing**:
112
+
113
+ - **$0.001 - $0.002 per validation** (tiered pricing for higher volumes)
114
+ - Platform compute costs are included
115
+ - No monthly fees or subscriptions
116
+
117
+ | Tier | Price per 1,000 validations |
118
+ |------|----------------------------|
119
+ | Free | $2.00 |
120
+ | Gold+ | $1.00 |
121
+
122
+ Example: Validating 100 domains costs approximately $0.10 - $0.20.
123
+
124
+ ## Use cases
125
+
126
+ - **Pre-launch validation**: Check your profile before going live with AI commerce
127
+ - **Competitor analysis**: See which stores in your industry are UCP-ready
128
+ - **Bulk monitoring**: Validate hundreds of domains programmatically via API
129
+ - **Agency audits**: Check all client stores at once with scheduled runs
130
+ - **CI/CD integration**: Add validation to your deployment pipeline
131
+
132
+ ## API integration
133
+
134
+ ```bash
135
+ curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~ucp-profile-validator/runs" \
136
+ -H "Content-Type: application/json" \
137
+ -H "Authorization: Bearer YOUR_API_TOKEN" \
138
+ -d '{"domain": "example.com"}'
139
+ ```
140
+
141
+ ## Tips for fixing UCP issues
142
+
143
+ 1. **Start with errors first** - Warnings won't block AI agents, but errors will
144
+ 2. **Use the generator** - Visit [ucptools.dev/generate](https://ucptools.dev/generate) to create a valid profile from scratch
145
+ 3. **Test locally** - Use Quick mode during development for faster iteration
146
+ 4. **Check namespace rules** - Official `dev.ucp.*` capabilities must reference `ucp.dev` URLs
147
+
148
+ ## Need to generate a profile?
149
+
150
+ If your store doesn't have a UCP profile yet, use our free generator:
151
+ **[https://ucptools.dev/generate](https://ucptools.dev/generate)**
152
+
153
+ ## Resources
154
+
155
+ - [UCP Specification](https://ucp.dev/specification/overview/)
156
+ - [UCP GitHub Repository](https://github.com/Universal-Commerce-Protocol/ucp)
157
+ - [Google UCP Business Profile Guide](https://developers.google.com/merchant/ucp/guides/business-profile)
158
+
159
+ ## Support
160
+
161
+ - **Website**: [ucptools.dev](https://ucptools.dev)
162
+ - **Email**: hello@ucptools.dev
163
+
164
+ ---
165
+
166
+ **UCP.tools** - Get ready for AI commerce.