Build a Verified Supplier Onboarding Attestation and Analyst Review Hub — implementation
Linked challenge: Build a Verified Supplier Onboarding Attestation and Analyst Review Hub
Prompt source
implementation110 lines11 sectionsNo variables1 code block
## Build
Evaluate vendor compliance documents submitted via FormSG webhooks and verify digital signatures against OpenAttestation v2 schema standards. Generate analyst adjudication queues with verified tamper-proof evidence packages before activating supplier accounts.
## User
Enterprise procurement compliance analyst
## Workflow
1. Ingest supplier registration payload and attached OpenAttestation wrapped trade documents from FormSG webhook submissions.
2. Validate document schema conformance and Secp256k1 digital signatures using the open-attestation library utilities.
3. Cross-reference corporate registration numbers and trade status against mock Singapore corporate entity reference tables.
4. Synthesize structured supplier onboarding dossiers and route exception cases to an analyst review workbench.
## Interface
Web dashboard showing pending supplier queues, signature verification badges, highlighted document discrepancies, and an approval action bar.
## Data
FormSG webhook JSON fixture mock for vendor intake; OpenAttestation v2 document templates with simulated DNS-TXT identity proofs.
Starter examples below are synthetic. They are not downloaded records.
## Source
[OpenAttestation](https://raw.githubusercontent.com/Open-Attestation/open-attestation/master/README.md)
Uses OpenAttestation v2 schema wrapping, validateSchema, and verifySignature functions described in source documentation to verify document authenticity.
## Tools
pydantic-ai, fastapi, open-attestation.
Pydantic AI enforces type-safe validation of incoming FormSG webhook payloads and structured extraction of supplier compliance attributes.
Fast instruction-following model with JSON mode accessed via standard hosted API.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Successfully parses FormSG webhook payloads and verifies OpenAttestation v2 document hashes.
- Flags expired trade licenses or mismatching corporate UEN identifiers in the intake queue.
- Generates an immutable audit dossier with targetHash and signature status for procurement analyst sign-off.
- Persists simulated onboarding approvals to the supplier staging database without direct external financial writes.
## Starter Examples
```json
[
{
"input": {
"form_submission_id": "SUB-8812",
"applicant_uen": "201912345K",
"applicant_name": "Apex Logistics Pte Ltd",
"oa_document": {
"version": "https://schema.openattestation.com/2.0/schema.json",
"data": {
"id": "CERT-8812",
"issuers": [
{
"name": "Singapore Registry",
"identityProof": {
"type": "DNS-TXT",
"location": "registry.gov.sg"
}
}
],
"recipient": {
"name": "Apex Logistics Pte Ltd",
"uen": "201912345K"
}
},
"signature": {
"type": "SHA3MerkleProof",
"targetHash": "a1b2c3d4e5f67890"
}
}
},
"expected_output": {
"verification_status": "PASSED",
"uen_match": true,
"signature_valid": true,
"analyst_queue": "STANDARD_ACTIVATION",
"review_summary": "All credentials verified against OpenAttestation schema. Ready for analyst activation."
}
},
{
"input": {
"form_submission_id": "SUB-9941",
"applicant_uen": "202054321M",
"applicant_name": "Pacific Freight Hub",
"oa_document": {
"version": "https://schema.openattestation.com/2.0/schema.json",
"data": {
"id": "CERT-9941",
"issuers": [
{
"name": "Singapore Registry",
"identityProof": {
"type": "DNS-TXT",
"location": "registry.gov.sg"
}
}
],
"recipient": {
"name": "Pacific Transit Ltd",
"uen": "199901234A"
}
},
"signature": {
"type": "SHA3MerkleProof",
"targetHash": "f6e5d4c3b2a10987"
}
}
},
"expected_output": {
"verification_status": "FLAGGED",
"uen_match": false,
"signature_valid": true,
"analyst_queue": "MANUAL_INVESTIGATION",
"review_summary": "Discrepancy detected: document recipient UEN 199901234A does not match applicant UEN 202054321M."
}
}
]
```
## Safety
Simulates all corporate registry checks and supplier activations. Restricts analyst actions to internal staging workflows.
Use mock external writes. Require human review before any real deployment.