Test data injection scripts for the Interfacer platform.
This project generates test data by directly interacting with the backend services:
| Service | Purpose | Interface |
|---|---|---|
| Zenflows | Users, projects, resources | GraphQL |
| interfacer-dpp | Digital Product Passports | REST |
| interfacer-feedback | Reviews and comments | REST |
| Entity | Count | Details |
|---|---|---|
| Users | 3 | Alice (designer), Bob (maker), Clara (reviewer) |
| Designs | 5 | With 3D model files (.stl) |
| Services | 3 | Remote/digital services |
| Products | 5 | Each linked to a design |
| DPPs | 15 | 3 per product |
| Feedback | 7 | Reviews + comments |
keypairoomServermutation → get HMAC- Zenroom
keypairoomClient→ generate EdDSA, Ethereum, Reflow, Bitcoin, ECDH keys createPersonmutation → create agent in zenflowspersonCheckquery → verify user exists
createProcessmutation → create process- Upload images to zenflows file endpoint (sha512 hash)
- Upload 3D models to DPP upload endpoint (sha256 + eddsa sign)
createEconomicEvent(action: "produce") → create resource- For products:
createEconomicEvent(action: "cite") → link design - Add contributors, relations as needed
- POST
/dppto DPP REST API (signed with eddsa) createEconomicEvent(action: "produce", conformsTo: specDpp) → DPP resourcecreateEconomicEvent(action: "cite") → link DPP to product
- POST
/api/v1/projects/:id/reviews→ create review (1-5 stars) - POST
/api/v1/projects/:id/comments→ create comment - All feedback endpoints require eddsa-signed requests
- Node.js 18+
- Running services:
- Zenflows (GraphQL at
NEXT_PUBLIC_ZENFLOWS_URL) - interfacer-dpp (REST at
NEXT_PUBLIC_DPP_URL) - interfacer-feedback (REST at
NEXT_PUBLIC_FEEDBACK_URL)
- Zenflows (GraphQL at
- Environment: copy
.env.localfrom../interfacer-gui/ - 3D model:
/Users/alcibiade/Desktop/incastro_mobile.stl
node --experimental-vm-modules main.mjsnpm install -g ijavascript
ijsinstall
jupyter notebook interfacer_init_data.ipynbAll mutations are cryptographically signed using EdDSA keys generated via Zenroom.
- Sign the entire request body (base64-encoded)
- Headers:
zenflows-sign,zenflows-user,zenflows-hash - Admin header:
zenflows-admin(for privileged operations likecreatePerson)
- Sign the request body (or empty string for GET/DELETE)
- Headers:
did-sign,did-pk,x-user-id
After successful execution, a results.json file is created containing all created entity IDs, which can be used for cleanup or reference.