Storage Example
Demonstrates storage integration using @venturekit/storage.
Source: examples/storage/
Key Concepts Demonstrated
Section titled “Key Concepts Demonstrated”- Storage intents — declarative S3 bucket provisioning
- Multiple purposes — uploads, assets, backups
- CDN integration — CloudFront for static assets
- Versioning — protect against accidental overwrites
- Intent outputs — accessing bucket names and CDN URLs from handlers
Infrastructure
Section titled “Infrastructure”infrastructure: { storage: [ { id: 'uploads', purpose: 'uploads', versioned: true }, { id: 'assets', purpose: 'assets', cdn: true, corsOrigins: ['*'] }, { id: 'backups', purpose: 'backups' }, ],}Accessing in Handlers
Section titled “Accessing in Handlers”const outputs = ctx.intentOutputs as IntentOutputs;const bucket = outputs.storage['uploads'].bucketName;const cdnUrl = outputs.storage['assets'].cdnUrl;Run It
Section titled “Run It”cd examples/storagenpm installvk dev