@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.
- package/CLAUDE.md +109 -0
- package/CONTRIBUTING.md +113 -0
- package/LICENSE +21 -0
- package/README.md +203 -0
- package/api/analyze-feed.js +140 -0
- package/api/badge.js +185 -0
- package/api/benchmark.js +177 -0
- package/api/directory-stats.ts +29 -0
- package/api/directory.ts +73 -0
- package/api/generate-compliance.js +143 -0
- package/api/generate-schema.js +457 -0
- package/api/generate.js +132 -0
- package/api/security-scan.js +133 -0
- package/api/simulate.js +187 -0
- package/api/tsconfig.json +10 -0
- package/api/validate.js +1351 -0
- package/apify-actor/.actor/actor.json +68 -0
- package/apify-actor/.actor/input_schema.json +32 -0
- package/apify-actor/APIFY-STORE-LISTING.md +412 -0
- package/apify-actor/Dockerfile +8 -0
- package/apify-actor/README.md +166 -0
- package/apify-actor/main.ts +111 -0
- package/apify-actor/package.json +17 -0
- package/apify-actor/src/main.js +199 -0
- package/docs/BRAND-IDENTITY.md +238 -0
- package/docs/BRAND-STYLE-GUIDE.md +356 -0
- package/drizzle/0000_black_king_cobra.sql +39 -0
- package/drizzle/meta/0000_snapshot.json +309 -0
- package/drizzle/meta/_journal.json +13 -0
- package/drizzle.config.ts +10 -0
- package/examples/full-profile.json +70 -0
- package/examples/minimal-profile.json +23 -0
- package/package.json +69 -0
- package/public/.well-known/ucp +25 -0
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/brand.css +321 -0
- package/public/directory.html +701 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/guides/bigcommerce.html +743 -0
- package/public/guides/fastucp.html +838 -0
- package/public/guides/magento.html +779 -0
- package/public/guides/shopify.html +726 -0
- package/public/guides/squarespace.html +749 -0
- package/public/guides/wix.html +747 -0
- package/public/guides/woocommerce.html +733 -0
- package/public/index.html +3835 -0
- package/public/learn.html +396 -0
- package/public/logo.jpeg +0 -0
- package/public/og-image-icon.png +0 -0
- package/public/og-image.png +0 -0
- package/public/robots.txt +6 -0
- package/public/site.webmanifest +31 -0
- package/public/sitemap.xml +69 -0
- package/public/social/linkedin-banner-1128x191.png +0 -0
- package/public/social/temp.PNG +0 -0
- package/public/social/x-header-1500x500.png +0 -0
- package/public/verify.html +410 -0
- package/scripts/generate-favicons.js +44 -0
- package/scripts/generate-ico.js +23 -0
- package/scripts/generate-og-image.js +45 -0
- package/scripts/reset-db.ts +77 -0
- package/scripts/seed-db.ts +71 -0
- package/scripts/setup-benchmark-db.js +70 -0
- package/src/api/server.ts +266 -0
- package/src/cli/index.ts +302 -0
- package/src/compliance/compliance-generator.ts +452 -0
- package/src/compliance/index.ts +28 -0
- package/src/compliance/templates.ts +338 -0
- package/src/compliance/types.ts +170 -0
- package/src/db/index.ts +28 -0
- package/src/db/schema.ts +84 -0
- package/src/feed-analyzer/feed-analyzer.ts +726 -0
- package/src/feed-analyzer/index.ts +34 -0
- package/src/feed-analyzer/types.ts +354 -0
- package/src/generator/index.ts +7 -0
- package/src/generator/key-generator.ts +124 -0
- package/src/generator/profile-builder.ts +402 -0
- package/src/hosting/artifacts-generator.ts +679 -0
- package/src/hosting/index.ts +6 -0
- package/src/index.ts +105 -0
- package/src/security/index.ts +15 -0
- package/src/security/security-scanner.ts +604 -0
- package/src/security/types.ts +55 -0
- package/src/services/directory.ts +434 -0
- package/src/simulator/agent-simulator.ts +941 -0
- package/src/simulator/index.ts +7 -0
- package/src/simulator/types.ts +170 -0
- package/src/types/generator.ts +140 -0
- package/src/types/index.ts +7 -0
- package/src/types/ucp-profile.ts +140 -0
- package/src/types/validation.ts +89 -0
- package/src/validator/index.ts +194 -0
- package/src/validator/network-validator.ts +417 -0
- package/src/validator/rules-validator.ts +297 -0
- package/src/validator/sdk-validator.ts +330 -0
- package/src/validator/structural-validator.ts +476 -0
- package/tests/fixtures/non-compliant-profile.json +25 -0
- package/tests/fixtures/official-sample-profile.json +75 -0
- package/tests/integration/benchmark.test.ts +207 -0
- package/tests/integration/database.test.ts +163 -0
- package/tests/integration/directory-api.test.ts +268 -0
- package/tests/integration/simulate-api.test.ts +230 -0
- package/tests/integration/validate-api.test.ts +269 -0
- package/tests/setup.ts +15 -0
- package/tests/unit/agent-simulator.test.ts +575 -0
- package/tests/unit/compliance-generator.test.ts +374 -0
- package/tests/unit/directory-service.test.ts +272 -0
- package/tests/unit/feed-analyzer.test.ts +517 -0
- package/tests/unit/lint-suggestions.test.ts +423 -0
- package/tests/unit/official-samples.test.ts +211 -0
- package/tests/unit/pdf-report.test.ts +390 -0
- package/tests/unit/sdk-validator.test.ts +531 -0
- package/tests/unit/security-scanner.test.ts +410 -0
- package/tests/unit/validation.test.ts +390 -0
- package/tsconfig.json +20 -0
- package/vercel.json +34 -0
- package/vitest.config.ts +22 -0
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
# UCP.tools Brand Style Guide
|
|
2
|
+
|
|
3
|
+
Comprehensive brand guidelines based on the official logo.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. LOGO
|
|
8
|
+
|
|
9
|
+
### Primary Logo
|
|
10
|
+
- File: `public/logo.jpeg`
|
|
11
|
+
- Usage: App icons, favicons, social media avatars
|
|
12
|
+
- Concept: Shopping bag with checkmark = "validated commerce"
|
|
13
|
+
|
|
14
|
+
### Logo Variations
|
|
15
|
+
| Variant | Use Case |
|
|
16
|
+
|---------|----------|
|
|
17
|
+
| Full color | Primary use, light backgrounds |
|
|
18
|
+
| White | Dark backgrounds, overlays |
|
|
19
|
+
| Monochrome | Print, low-color contexts |
|
|
20
|
+
|
|
21
|
+
### Clear Space
|
|
22
|
+
Maintain padding equal to the height of the bag handle on all sides.
|
|
23
|
+
|
|
24
|
+
### Minimum Size
|
|
25
|
+
- Digital: 32x32px minimum
|
|
26
|
+
- Print: 0.5 inch minimum
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 2. COLOR PALETTE
|
|
31
|
+
|
|
32
|
+
### Primary Colors (from logo gradient)
|
|
33
|
+
|
|
34
|
+
| Name | Hex | RGB | Usage |
|
|
35
|
+
|------|-----|-----|-------|
|
|
36
|
+
| **Blue** | `#2E86AB` | rgb(46, 134, 171) | Primary actions, links |
|
|
37
|
+
| **Teal** | `#36B5A2` | rgb(54, 181, 162) | Gradient midpoint, accents |
|
|
38
|
+
| **Green** | `#47C97A` | rgb(71, 201, 122) | Success states, validation |
|
|
39
|
+
|
|
40
|
+
### Brand Gradient
|
|
41
|
+
```css
|
|
42
|
+
background: linear-gradient(135deg, #2E86AB 0%, #36B5A2 50%, #47C97A 100%);
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Secondary Colors
|
|
46
|
+
|
|
47
|
+
| Name | Hex | Usage |
|
|
48
|
+
|------|-----|-------|
|
|
49
|
+
| **Dark** | `#1A2B3C` | Text, headings |
|
|
50
|
+
| **Medium** | `#5A6978` | Secondary text |
|
|
51
|
+
| **Light** | `#94A3B8` | Muted text, placeholders |
|
|
52
|
+
| **Border** | `#E2E8F0` | Dividers, borders |
|
|
53
|
+
| **Background** | `#F8FAFC` | Page background |
|
|
54
|
+
| **Card** | `#FFFFFF` | Card backgrounds |
|
|
55
|
+
|
|
56
|
+
### Semantic Colors
|
|
57
|
+
|
|
58
|
+
| Name | Hex | Usage |
|
|
59
|
+
|------|-----|-------|
|
|
60
|
+
| **Success** | `#47C97A` | Valid, success states |
|
|
61
|
+
| **Warning** | `#F59E0B` | Warnings, caution |
|
|
62
|
+
| **Error** | `#EF4444` | Errors, invalid states |
|
|
63
|
+
| **Info** | `#2E86AB` | Information, tips |
|
|
64
|
+
|
|
65
|
+
### Grade Colors
|
|
66
|
+
|
|
67
|
+
| Grade | Background | Text |
|
|
68
|
+
|-------|------------|------|
|
|
69
|
+
| A | `#DCFCE7` | `#16A34A` |
|
|
70
|
+
| B | `#DBEAFE` | `#2563EB` |
|
|
71
|
+
| C | `#FEF9C3` | `#CA8A04` |
|
|
72
|
+
| D | `#FED7AA` | `#EA580C` |
|
|
73
|
+
| F | `#FEE2E2` | `#DC2626` |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 3. TYPOGRAPHY
|
|
78
|
+
|
|
79
|
+
### Font Stack
|
|
80
|
+
```css
|
|
81
|
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Type Scale
|
|
85
|
+
|
|
86
|
+
| Element | Size | Weight | Line Height |
|
|
87
|
+
|---------|------|--------|-------------|
|
|
88
|
+
| H1 | 48px / 3rem | 700 | 1.2 |
|
|
89
|
+
| H2 | 36px / 2.25rem | 700 | 1.25 |
|
|
90
|
+
| H3 | 24px / 1.5rem | 600 | 1.3 |
|
|
91
|
+
| H4 | 20px / 1.25rem | 600 | 1.4 |
|
|
92
|
+
| Body | 16px / 1rem | 400 | 1.6 |
|
|
93
|
+
| Small | 14px / 0.875rem | 400 | 1.5 |
|
|
94
|
+
| Caption | 12px / 0.75rem | 500 | 1.4 |
|
|
95
|
+
|
|
96
|
+
### Logo Typography
|
|
97
|
+
```css
|
|
98
|
+
.logo {
|
|
99
|
+
font-size: 24px;
|
|
100
|
+
font-weight: 700;
|
|
101
|
+
background: linear-gradient(135deg, #2E86AB, #47C97A);
|
|
102
|
+
-webkit-background-clip: text;
|
|
103
|
+
-webkit-text-fill-color: transparent;
|
|
104
|
+
}
|
|
105
|
+
.logo .suffix {
|
|
106
|
+
font-weight: 400;
|
|
107
|
+
color: #5A6978;
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 4. SPACING
|
|
114
|
+
|
|
115
|
+
### Base Unit
|
|
116
|
+
8px grid system
|
|
117
|
+
|
|
118
|
+
| Token | Value | Usage |
|
|
119
|
+
|-------|-------|-------|
|
|
120
|
+
| `--space-1` | 4px | Tight spacing |
|
|
121
|
+
| `--space-2` | 8px | Default gap |
|
|
122
|
+
| `--space-3` | 12px | Small padding |
|
|
123
|
+
| `--space-4` | 16px | Medium padding |
|
|
124
|
+
| `--space-5` | 20px | Form groups |
|
|
125
|
+
| `--space-6` | 24px | Section gaps |
|
|
126
|
+
| `--space-8` | 32px | Card padding |
|
|
127
|
+
| `--space-10` | 40px | Section padding |
|
|
128
|
+
| `--space-12` | 48px | Large sections |
|
|
129
|
+
| `--space-16` | 64px | Hero sections |
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## 5. BORDER RADIUS
|
|
134
|
+
|
|
135
|
+
| Token | Value | Usage |
|
|
136
|
+
|-------|-------|-------|
|
|
137
|
+
| `--radius-sm` | 4px | Small elements, badges |
|
|
138
|
+
| `--radius-md` | 8px | Buttons, inputs |
|
|
139
|
+
| `--radius-lg` | 12px | Cards |
|
|
140
|
+
| `--radius-xl` | 16px | Modals |
|
|
141
|
+
| `--radius-full` | 9999px | Pills, avatars |
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## 6. SHADOWS
|
|
146
|
+
|
|
147
|
+
```css
|
|
148
|
+
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
149
|
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
150
|
+
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
|
|
151
|
+
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 7. COMPONENTS
|
|
157
|
+
|
|
158
|
+
### Buttons
|
|
159
|
+
|
|
160
|
+
#### Primary Button
|
|
161
|
+
```css
|
|
162
|
+
.btn-primary {
|
|
163
|
+
background: linear-gradient(135deg, #2E86AB, #36B5A2);
|
|
164
|
+
color: white;
|
|
165
|
+
padding: 12px 24px;
|
|
166
|
+
border-radius: 8px;
|
|
167
|
+
font-weight: 600;
|
|
168
|
+
border: none;
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
transition: transform 0.2s, box-shadow 0.2s;
|
|
171
|
+
}
|
|
172
|
+
.btn-primary:hover {
|
|
173
|
+
transform: translateY(-1px);
|
|
174
|
+
box-shadow: 0 4px 12px rgba(46, 134, 171, 0.4);
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
#### Secondary Button
|
|
179
|
+
```css
|
|
180
|
+
.btn-secondary {
|
|
181
|
+
background: white;
|
|
182
|
+
color: #1A2B3C;
|
|
183
|
+
padding: 12px 24px;
|
|
184
|
+
border-radius: 8px;
|
|
185
|
+
font-weight: 600;
|
|
186
|
+
border: 2px solid #E2E8F0;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
}
|
|
189
|
+
.btn-secondary:hover {
|
|
190
|
+
border-color: #2E86AB;
|
|
191
|
+
color: #2E86AB;
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Cards
|
|
196
|
+
```css
|
|
197
|
+
.card {
|
|
198
|
+
background: white;
|
|
199
|
+
border-radius: 12px;
|
|
200
|
+
padding: 32px;
|
|
201
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
202
|
+
border: 1px solid #E2E8F0;
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Input Fields
|
|
207
|
+
```css
|
|
208
|
+
input, select, textarea {
|
|
209
|
+
width: 100%;
|
|
210
|
+
padding: 12px 16px;
|
|
211
|
+
border: 2px solid #E2E8F0;
|
|
212
|
+
border-radius: 8px;
|
|
213
|
+
font-size: 16px;
|
|
214
|
+
transition: border-color 0.2s, box-shadow 0.2s;
|
|
215
|
+
}
|
|
216
|
+
input:focus {
|
|
217
|
+
outline: none;
|
|
218
|
+
border-color: #2E86AB;
|
|
219
|
+
box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.1);
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Grade Badges
|
|
224
|
+
```css
|
|
225
|
+
.grade-badge {
|
|
226
|
+
display: inline-flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
gap: 8px;
|
|
229
|
+
padding: 8px 16px;
|
|
230
|
+
border-radius: 20px;
|
|
231
|
+
font-weight: 700;
|
|
232
|
+
font-size: 18px;
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## 8. ICONOGRAPHY
|
|
239
|
+
|
|
240
|
+
### Style Guidelines
|
|
241
|
+
- Line weight: 2px stroke
|
|
242
|
+
- Corner radius: Rounded caps and joins
|
|
243
|
+
- Size: 24x24px default, 20x20px small, 32x32px large
|
|
244
|
+
|
|
245
|
+
### Common Icons
|
|
246
|
+
| Icon | Usage |
|
|
247
|
+
|------|-------|
|
|
248
|
+
| Checkmark | Success, valid, complete |
|
|
249
|
+
| X/Cross | Error, invalid, close |
|
|
250
|
+
| Warning triangle | Warnings, caution |
|
|
251
|
+
| Info circle | Information, tips |
|
|
252
|
+
| Shopping bag | Commerce, UCP |
|
|
253
|
+
| Shield | Security, validation |
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## 9. MOTION
|
|
258
|
+
|
|
259
|
+
### Transitions
|
|
260
|
+
```css
|
|
261
|
+
--transition-fast: 150ms ease;
|
|
262
|
+
--transition-base: 200ms ease;
|
|
263
|
+
--transition-slow: 300ms ease;
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Hover Effects
|
|
267
|
+
- Buttons: `translateY(-1px)` + shadow increase
|
|
268
|
+
- Cards: `translateY(-2px)` + shadow increase
|
|
269
|
+
- Links: Color change only
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## 10. RESPONSIVE BREAKPOINTS
|
|
274
|
+
|
|
275
|
+
| Name | Width | Usage |
|
|
276
|
+
|------|-------|-------|
|
|
277
|
+
| Mobile | < 640px | Single column |
|
|
278
|
+
| Tablet | 640-1024px | Two columns |
|
|
279
|
+
| Desktop | > 1024px | Full layout |
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## 11. VOICE & TONE
|
|
284
|
+
|
|
285
|
+
### Brand Voice
|
|
286
|
+
- **Developer-first**: Technical but accessible
|
|
287
|
+
- **Direct**: Clear, no fluff
|
|
288
|
+
- **Helpful**: Solution-oriented
|
|
289
|
+
- **Independent**: Not affiliated with Google/Shopify
|
|
290
|
+
|
|
291
|
+
### Writing Guidelines
|
|
292
|
+
- Use active voice
|
|
293
|
+
- Lead with benefits
|
|
294
|
+
- Include code examples
|
|
295
|
+
- Avoid jargon unless necessary
|
|
296
|
+
|
|
297
|
+
### Example Copy
|
|
298
|
+
|
|
299
|
+
**Headlines:**
|
|
300
|
+
- "Get ready for AI commerce"
|
|
301
|
+
- "Validate your UCP profile"
|
|
302
|
+
- "Check your AI commerce readiness"
|
|
303
|
+
|
|
304
|
+
**CTAs:**
|
|
305
|
+
- "Validate Now"
|
|
306
|
+
- "Generate Profile"
|
|
307
|
+
- "Get Started"
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## 12. FILE ASSETS
|
|
312
|
+
|
|
313
|
+
### Required Files
|
|
314
|
+
```
|
|
315
|
+
public/
|
|
316
|
+
├── logo.jpeg # Primary logo (square)
|
|
317
|
+
├── logo-white.png # White version for dark bg
|
|
318
|
+
├── favicon.ico # Browser favicon
|
|
319
|
+
├── favicon-32x32.png # 32px favicon
|
|
320
|
+
├── favicon-16x16.png # 16px favicon
|
|
321
|
+
├── apple-touch-icon.png # 180x180 iOS icon
|
|
322
|
+
├── og-image.png # 1200x630 social share
|
|
323
|
+
└── brand.css # CSS design tokens
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## 13. CSS DESIGN TOKENS
|
|
329
|
+
|
|
330
|
+
See `public/brand.css` for the complete implementation of all design tokens as CSS custom properties.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## 14. USAGE EXAMPLES
|
|
335
|
+
|
|
336
|
+
### Hero Section
|
|
337
|
+
```html
|
|
338
|
+
<section class="hero">
|
|
339
|
+
<h1>UCP Profile <span class="gradient-text">Validator</span></h1>
|
|
340
|
+
<p>Check if your store is ready for AI shopping agents</p>
|
|
341
|
+
<button class="btn-primary">Validate Now</button>
|
|
342
|
+
</section>
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Gradient Text
|
|
346
|
+
```css
|
|
347
|
+
.gradient-text {
|
|
348
|
+
background: linear-gradient(135deg, #2E86AB, #47C97A);
|
|
349
|
+
-webkit-background-clip: text;
|
|
350
|
+
-webkit-text-fill-color: transparent;
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
*Last updated: January 2026*
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
CREATE TABLE "benchmark_stats" (
|
|
2
|
+
"id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "benchmark_stats_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
|
|
3
|
+
"score_bucket" integer NOT NULL,
|
|
4
|
+
"count" integer DEFAULT 0 NOT NULL,
|
|
5
|
+
CONSTRAINT "benchmark_stats_score_bucket_unique" UNIQUE("score_bucket")
|
|
6
|
+
);
|
|
7
|
+
--> statement-breakpoint
|
|
8
|
+
CREATE TABLE "benchmark_summary" (
|
|
9
|
+
"id" integer PRIMARY KEY DEFAULT 1 NOT NULL,
|
|
10
|
+
"total_validations" integer DEFAULT 0 NOT NULL,
|
|
11
|
+
"avg_score" numeric(5, 2) DEFAULT '0',
|
|
12
|
+
"updated_at" timestamp DEFAULT now() NOT NULL
|
|
13
|
+
);
|
|
14
|
+
--> statement-breakpoint
|
|
15
|
+
CREATE TABLE "merchants" (
|
|
16
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
17
|
+
"domain" varchar(255) NOT NULL,
|
|
18
|
+
"display_name" varchar(255) NOT NULL,
|
|
19
|
+
"description" text,
|
|
20
|
+
"logo_url" varchar(512),
|
|
21
|
+
"website_url" varchar(512),
|
|
22
|
+
"category" varchar(100),
|
|
23
|
+
"country_code" varchar(2),
|
|
24
|
+
"ucp_score" integer,
|
|
25
|
+
"ucp_grade" varchar(2),
|
|
26
|
+
"transports" varchar(255),
|
|
27
|
+
"is_public" boolean DEFAULT true NOT NULL,
|
|
28
|
+
"is_verified" boolean DEFAULT false NOT NULL,
|
|
29
|
+
"last_validated_at" timestamp,
|
|
30
|
+
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
31
|
+
"updated_at" timestamp DEFAULT now() NOT NULL,
|
|
32
|
+
CONSTRAINT "merchants_domain_unique" UNIQUE("domain")
|
|
33
|
+
);
|
|
34
|
+
--> statement-breakpoint
|
|
35
|
+
CREATE INDEX "idx_merchants_domain" ON "merchants" USING btree ("domain");--> statement-breakpoint
|
|
36
|
+
CREATE INDEX "idx_merchants_category" ON "merchants" USING btree ("category");--> statement-breakpoint
|
|
37
|
+
CREATE INDEX "idx_merchants_country" ON "merchants" USING btree ("country_code");--> statement-breakpoint
|
|
38
|
+
CREATE INDEX "idx_merchants_score" ON "merchants" USING btree ("ucp_score");--> statement-breakpoint
|
|
39
|
+
CREATE INDEX "idx_merchants_public" ON "merchants" USING btree ("is_public");
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "f7439a2c-cb5b-4649-b69f-738b854831e5",
|
|
3
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
4
|
+
"version": "7",
|
|
5
|
+
"dialect": "postgresql",
|
|
6
|
+
"tables": {
|
|
7
|
+
"public.benchmark_stats": {
|
|
8
|
+
"name": "benchmark_stats",
|
|
9
|
+
"schema": "",
|
|
10
|
+
"columns": {
|
|
11
|
+
"id": {
|
|
12
|
+
"name": "id",
|
|
13
|
+
"type": "integer",
|
|
14
|
+
"primaryKey": true,
|
|
15
|
+
"notNull": true,
|
|
16
|
+
"identity": {
|
|
17
|
+
"type": "always",
|
|
18
|
+
"name": "benchmark_stats_id_seq",
|
|
19
|
+
"schema": "public",
|
|
20
|
+
"increment": "1",
|
|
21
|
+
"startWith": "1",
|
|
22
|
+
"minValue": "1",
|
|
23
|
+
"maxValue": "2147483647",
|
|
24
|
+
"cache": "1",
|
|
25
|
+
"cycle": false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"score_bucket": {
|
|
29
|
+
"name": "score_bucket",
|
|
30
|
+
"type": "integer",
|
|
31
|
+
"primaryKey": false,
|
|
32
|
+
"notNull": true
|
|
33
|
+
},
|
|
34
|
+
"count": {
|
|
35
|
+
"name": "count",
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"primaryKey": false,
|
|
38
|
+
"notNull": true,
|
|
39
|
+
"default": 0
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"indexes": {},
|
|
43
|
+
"foreignKeys": {},
|
|
44
|
+
"compositePrimaryKeys": {},
|
|
45
|
+
"uniqueConstraints": {
|
|
46
|
+
"benchmark_stats_score_bucket_unique": {
|
|
47
|
+
"name": "benchmark_stats_score_bucket_unique",
|
|
48
|
+
"nullsNotDistinct": false,
|
|
49
|
+
"columns": [
|
|
50
|
+
"score_bucket"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"policies": {},
|
|
55
|
+
"checkConstraints": {},
|
|
56
|
+
"isRLSEnabled": false
|
|
57
|
+
},
|
|
58
|
+
"public.benchmark_summary": {
|
|
59
|
+
"name": "benchmark_summary",
|
|
60
|
+
"schema": "",
|
|
61
|
+
"columns": {
|
|
62
|
+
"id": {
|
|
63
|
+
"name": "id",
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"primaryKey": true,
|
|
66
|
+
"notNull": true,
|
|
67
|
+
"default": 1
|
|
68
|
+
},
|
|
69
|
+
"total_validations": {
|
|
70
|
+
"name": "total_validations",
|
|
71
|
+
"type": "integer",
|
|
72
|
+
"primaryKey": false,
|
|
73
|
+
"notNull": true,
|
|
74
|
+
"default": 0
|
|
75
|
+
},
|
|
76
|
+
"avg_score": {
|
|
77
|
+
"name": "avg_score",
|
|
78
|
+
"type": "numeric(5, 2)",
|
|
79
|
+
"primaryKey": false,
|
|
80
|
+
"notNull": false,
|
|
81
|
+
"default": "'0'"
|
|
82
|
+
},
|
|
83
|
+
"updated_at": {
|
|
84
|
+
"name": "updated_at",
|
|
85
|
+
"type": "timestamp",
|
|
86
|
+
"primaryKey": false,
|
|
87
|
+
"notNull": true,
|
|
88
|
+
"default": "now()"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"indexes": {},
|
|
92
|
+
"foreignKeys": {},
|
|
93
|
+
"compositePrimaryKeys": {},
|
|
94
|
+
"uniqueConstraints": {},
|
|
95
|
+
"policies": {},
|
|
96
|
+
"checkConstraints": {},
|
|
97
|
+
"isRLSEnabled": false
|
|
98
|
+
},
|
|
99
|
+
"public.merchants": {
|
|
100
|
+
"name": "merchants",
|
|
101
|
+
"schema": "",
|
|
102
|
+
"columns": {
|
|
103
|
+
"id": {
|
|
104
|
+
"name": "id",
|
|
105
|
+
"type": "uuid",
|
|
106
|
+
"primaryKey": true,
|
|
107
|
+
"notNull": true,
|
|
108
|
+
"default": "gen_random_uuid()"
|
|
109
|
+
},
|
|
110
|
+
"domain": {
|
|
111
|
+
"name": "domain",
|
|
112
|
+
"type": "varchar(255)",
|
|
113
|
+
"primaryKey": false,
|
|
114
|
+
"notNull": true
|
|
115
|
+
},
|
|
116
|
+
"display_name": {
|
|
117
|
+
"name": "display_name",
|
|
118
|
+
"type": "varchar(255)",
|
|
119
|
+
"primaryKey": false,
|
|
120
|
+
"notNull": true
|
|
121
|
+
},
|
|
122
|
+
"description": {
|
|
123
|
+
"name": "description",
|
|
124
|
+
"type": "text",
|
|
125
|
+
"primaryKey": false,
|
|
126
|
+
"notNull": false
|
|
127
|
+
},
|
|
128
|
+
"logo_url": {
|
|
129
|
+
"name": "logo_url",
|
|
130
|
+
"type": "varchar(512)",
|
|
131
|
+
"primaryKey": false,
|
|
132
|
+
"notNull": false
|
|
133
|
+
},
|
|
134
|
+
"website_url": {
|
|
135
|
+
"name": "website_url",
|
|
136
|
+
"type": "varchar(512)",
|
|
137
|
+
"primaryKey": false,
|
|
138
|
+
"notNull": false
|
|
139
|
+
},
|
|
140
|
+
"category": {
|
|
141
|
+
"name": "category",
|
|
142
|
+
"type": "varchar(100)",
|
|
143
|
+
"primaryKey": false,
|
|
144
|
+
"notNull": false
|
|
145
|
+
},
|
|
146
|
+
"country_code": {
|
|
147
|
+
"name": "country_code",
|
|
148
|
+
"type": "varchar(2)",
|
|
149
|
+
"primaryKey": false,
|
|
150
|
+
"notNull": false
|
|
151
|
+
},
|
|
152
|
+
"ucp_score": {
|
|
153
|
+
"name": "ucp_score",
|
|
154
|
+
"type": "integer",
|
|
155
|
+
"primaryKey": false,
|
|
156
|
+
"notNull": false
|
|
157
|
+
},
|
|
158
|
+
"ucp_grade": {
|
|
159
|
+
"name": "ucp_grade",
|
|
160
|
+
"type": "varchar(2)",
|
|
161
|
+
"primaryKey": false,
|
|
162
|
+
"notNull": false
|
|
163
|
+
},
|
|
164
|
+
"transports": {
|
|
165
|
+
"name": "transports",
|
|
166
|
+
"type": "varchar(255)",
|
|
167
|
+
"primaryKey": false,
|
|
168
|
+
"notNull": false
|
|
169
|
+
},
|
|
170
|
+
"is_public": {
|
|
171
|
+
"name": "is_public",
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"primaryKey": false,
|
|
174
|
+
"notNull": true,
|
|
175
|
+
"default": true
|
|
176
|
+
},
|
|
177
|
+
"is_verified": {
|
|
178
|
+
"name": "is_verified",
|
|
179
|
+
"type": "boolean",
|
|
180
|
+
"primaryKey": false,
|
|
181
|
+
"notNull": true,
|
|
182
|
+
"default": false
|
|
183
|
+
},
|
|
184
|
+
"last_validated_at": {
|
|
185
|
+
"name": "last_validated_at",
|
|
186
|
+
"type": "timestamp",
|
|
187
|
+
"primaryKey": false,
|
|
188
|
+
"notNull": false
|
|
189
|
+
},
|
|
190
|
+
"created_at": {
|
|
191
|
+
"name": "created_at",
|
|
192
|
+
"type": "timestamp",
|
|
193
|
+
"primaryKey": false,
|
|
194
|
+
"notNull": true,
|
|
195
|
+
"default": "now()"
|
|
196
|
+
},
|
|
197
|
+
"updated_at": {
|
|
198
|
+
"name": "updated_at",
|
|
199
|
+
"type": "timestamp",
|
|
200
|
+
"primaryKey": false,
|
|
201
|
+
"notNull": true,
|
|
202
|
+
"default": "now()"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"indexes": {
|
|
206
|
+
"idx_merchants_domain": {
|
|
207
|
+
"name": "idx_merchants_domain",
|
|
208
|
+
"columns": [
|
|
209
|
+
{
|
|
210
|
+
"expression": "domain",
|
|
211
|
+
"isExpression": false,
|
|
212
|
+
"asc": true,
|
|
213
|
+
"nulls": "last"
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"isUnique": false,
|
|
217
|
+
"concurrently": false,
|
|
218
|
+
"method": "btree",
|
|
219
|
+
"with": {}
|
|
220
|
+
},
|
|
221
|
+
"idx_merchants_category": {
|
|
222
|
+
"name": "idx_merchants_category",
|
|
223
|
+
"columns": [
|
|
224
|
+
{
|
|
225
|
+
"expression": "category",
|
|
226
|
+
"isExpression": false,
|
|
227
|
+
"asc": true,
|
|
228
|
+
"nulls": "last"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"isUnique": false,
|
|
232
|
+
"concurrently": false,
|
|
233
|
+
"method": "btree",
|
|
234
|
+
"with": {}
|
|
235
|
+
},
|
|
236
|
+
"idx_merchants_country": {
|
|
237
|
+
"name": "idx_merchants_country",
|
|
238
|
+
"columns": [
|
|
239
|
+
{
|
|
240
|
+
"expression": "country_code",
|
|
241
|
+
"isExpression": false,
|
|
242
|
+
"asc": true,
|
|
243
|
+
"nulls": "last"
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"isUnique": false,
|
|
247
|
+
"concurrently": false,
|
|
248
|
+
"method": "btree",
|
|
249
|
+
"with": {}
|
|
250
|
+
},
|
|
251
|
+
"idx_merchants_score": {
|
|
252
|
+
"name": "idx_merchants_score",
|
|
253
|
+
"columns": [
|
|
254
|
+
{
|
|
255
|
+
"expression": "ucp_score",
|
|
256
|
+
"isExpression": false,
|
|
257
|
+
"asc": true,
|
|
258
|
+
"nulls": "last"
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
"isUnique": false,
|
|
262
|
+
"concurrently": false,
|
|
263
|
+
"method": "btree",
|
|
264
|
+
"with": {}
|
|
265
|
+
},
|
|
266
|
+
"idx_merchants_public": {
|
|
267
|
+
"name": "idx_merchants_public",
|
|
268
|
+
"columns": [
|
|
269
|
+
{
|
|
270
|
+
"expression": "is_public",
|
|
271
|
+
"isExpression": false,
|
|
272
|
+
"asc": true,
|
|
273
|
+
"nulls": "last"
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"isUnique": false,
|
|
277
|
+
"concurrently": false,
|
|
278
|
+
"method": "btree",
|
|
279
|
+
"with": {}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"foreignKeys": {},
|
|
283
|
+
"compositePrimaryKeys": {},
|
|
284
|
+
"uniqueConstraints": {
|
|
285
|
+
"merchants_domain_unique": {
|
|
286
|
+
"name": "merchants_domain_unique",
|
|
287
|
+
"nullsNotDistinct": false,
|
|
288
|
+
"columns": [
|
|
289
|
+
"domain"
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"policies": {},
|
|
294
|
+
"checkConstraints": {},
|
|
295
|
+
"isRLSEnabled": false
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"enums": {},
|
|
299
|
+
"schemas": {},
|
|
300
|
+
"sequences": {},
|
|
301
|
+
"roles": {},
|
|
302
|
+
"policies": {},
|
|
303
|
+
"views": {},
|
|
304
|
+
"_meta": {
|
|
305
|
+
"columns": {},
|
|
306
|
+
"schemas": {},
|
|
307
|
+
"tables": {}
|
|
308
|
+
}
|
|
309
|
+
}
|