Repository navigation
Expand file tree
/
Copy pathvsc-cg-folder-generator.ps1
More file actions
343 lines (264 loc) · 7.2 KB
/
Copy pathvsc-cg-folder-generator.ps1
File metadata and controls
343 lines (264 loc) · 7.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# vsc-cg-folder-generator.ps1
# Simplified version - Generates folder structure for W3C Verifiable Supply Chain CG
Write-Host "Generating VSC CG Folder Structure..." -ForegroundColor Yellow
# Define all folders to create
$folders = @(
"profiles/pharmaceuticals",
"profiles/critical-minerals",
"profiles/food-beverage",
"profiles/luxury-goods",
"profiles/electronics",
"profiles/automotive",
"interoperability/epcis",
"interoperability/iso",
"interoperability/regulatory",
"interoperability/api-mapping",
"trust-framework/governance",
"trust-framework/accreditation",
"trust-framework/templates",
"trust-framework/liability",
"use-cases/case-studies",
"use-cases/calculators",
"use-cases/guides",
"use-cases/roi-models",
"tools/libraries",
"tools/python",
"tools/typescript",
"tools/test-suites",
"tools/examples",
"specs/profiles",
"specs/api",
"specs/json-schemas",
".github/workflows",
".github/ISSUE_TEMPLATE",
"docs",
"meetings",
"assets/images"
)
# Create folders
foreach ($folder in $folders) {
New-Item -ItemType Directory -Force -Path $folder | Out-Null
Write-Host " Created: $folder" -ForegroundColor Gray
}
# Create .gitkeep files
Get-ChildItem -Directory -Recurse | ForEach-Object {
$keepFile = Join-Path $_.FullName ".gitkeep"
if (-not (Test-Path $keepFile)) {
New-Item -ItemType File -Force -Path $keepFile | Out-Null
}
}
# Create meeting template
$meetingContent = "# VSC CG Meeting - [Date]
**Chair**:
**Scribe**:
**Attendees**:
## Agenda
1.
## Minutes
## Decisions
## Action Items
- [ ]
## Next Meeting"
$meetingContent | Out-File -FilePath "meetings/meeting-template.md" -Encoding utf8
# Create issue template - Profile Proposal
$profileProposal = "---
name: Profile Proposal
about: Propose a new industry profile
title: '[Profile] '
labels: profile-proposal
---
## Profile Name
## Industry Context
## Business Problem
## Proposed Data Model
## Regulatory Alignment"
$profileProposal | Out-File -FilePath ".github/ISSUE_TEMPLATE/profile-proposal.md" -Encoding utf8
# Create issue template - Use Case
$useCase = "---
name: Use Case
about: Document a supply chain use case
title: '[Use Case] '
labels: use-case
---
## Title
## Actors
## Flow
## Expected Benefits"
$useCase | Out-File -FilePath ".github/ISSUE_TEMPLATE/use-case.md" -Encoding utf8
# Create issue template - Interoperability Issue
$interopIssue = "---
name: Interoperability Issue
about: Report interoperability issues with standards
title: '[Interop] '
labels: interoperability
---
## Standards Involved
## Issue Description
## Expected Behavior
## Current Behavior
## Proposed Solution"
$interopIssue | Out-File -FilePath ".github/ISSUE_TEMPLATE/interoperability-issue.md" -Encoding utf8
# Create GitHub workflow - CI
$ciYml = "name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate JSON Schemas
run: echo 'Add validation logic here'
lint-markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Markdown Lint
run: echo 'Add markdown linting here'"
$ciYml | Out-File -FilePath ".github/workflows/ci.yml" -Encoding utf8
# Create GitHub workflow - Publish
$publishYml = "name: Publish
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Release
run: echo 'Add release logic here'"
$publishYml | Out-File -FilePath ".github/workflows/publish.yml" -Encoding utf8
# Create specs README
$specsReadme = "# Specifications Directory
## profiles/
Industry-specific VC/UORA profiles
## api/
API specifications for interoperability
## json-schemas/
JSON Schema definitions for credentials and presentations"
$specsReadme | Out-File -FilePath "specs/README.md" -Encoding utf8
# Create tools README
$toolsReadme = "# Tools Directory
## libraries/
Core libraries for VC/UORA implementation
## python/
Python implementation and utilities
## typescript/
TypeScript/JavaScript implementation
## test-suites/
Conformance test suites
## examples/
Example implementations and demos"
$toolsReadme | Out-File -FilePath "tools/README.md" -Encoding utf8
# Create profiles README
$profilesReadme = "# Industry Profiles
## pharmaceuticals/
DSCSA-aligned verifiable credentials for pharmaceutical supply chains
## critical-minerals/
Conflict minerals traceability and ethical sourcing
## food-beverage/
Farm-to-fork provenance and food safety
## luxury-goods/
Anti-counterfeiting attestations for luxury products
## electronics/
Electronics supply chain traceability and conflict minerals
## automotive/
Automotive parts provenance and certification"
$profilesReadme | Out-File -FilePath "profiles/README.md" -Encoding utf8
# Create interoperability README
$interopReadme = "# Interoperability Directory
## epcis/
GS1 EPCIS to VC/UORA mapping specifications
## iso/
Alignment with ISO supply chain standards
## regulatory/
Regulatory compliance mappings (DSCSA, EUDR, CBAM, etc.)
## api-mapping/
API specifications for interoperability"
$interopReadme | Out-File -FilePath "interoperability/README.md" -Encoding utf8
# Create trust-framework README
$trustReadme = "# Trust Framework Directory
## governance/
Governance models for supply chain consortia
## accreditation/
Trust anchor accreditation criteria
## templates/
Reusable trust framework templates
## liability/
Liability and legal entity frameworks"
$trustReadme | Out-File -FilePath "trust-framework/README.md" -Encoding utf8
# Create use-cases README
$useCasesReadme = "# Use Cases Directory
## case-studies/
Real-world implementation case studies with ROI data
## calculators/
ROI calculators and modeling tools
## guides/
Implementation playbooks and pilot templates
## roi-models/
Quantified ROI models for different use cases"
$useCasesReadme | Out-File -FilePath "use-cases/README.md" -Encoding utf8
# Create docs README
$docsReadme = "# Documentation
## For Implementers
- Getting started guides
- API reference
- Best practices
## For Standards Developers
- Profile creation guide
- Trust framework guide
## For Business Leaders
- Executive summary
- ROI calculator"
$docsReadme | Out-File -FilePath "docs/README.md" -Encoding utf8
# Create .gitignore
$gitignore = "# Dependencies
node_modules/
__pycache__/
*.pyc
*.pyo
# IDE
.vscode/
.idea/
*.swp
*.swo
# OS
.DS_Store
Thumbs.db
desktop.ini
# Build
dist/
build/
*.log
*.tmp
# Secrets
*.pem
*.key
*.env
.env.local
.env.*.local
# Test coverage
coverage/
.nyc_output/
# Temporary files
*.tmp
*.temp
temp/
tmp/"
$gitignore | Out-File -FilePath ".gitignore" -Encoding utf8
# Summary
Write-Host ""
Write-Host "✅ Folder structure created successfully!" -ForegroundColor Green
Write-Host ""
Write-Host "Created at: $(Get-Location)" -ForegroundColor Yellow
Write-Host ""
Write-Host "Next steps:" -ForegroundColor Yellow
Write-Host " 1. cd $(Get-Location)" -ForegroundColor Gray
Write-Host " 2. git init" -ForegroundColor Gray
Write-Host " 3. git add ." -ForegroundColor Gray
Write-Host " 4. git commit -m 'Initial repository structure'" -ForegroundColor Gray