How tforster/webproducer works
Main Components
a. External Systems:
• CMS (Webhook Source)
• AWS Services (Lambda, S3, CloudFront, IAM)
• Data Sources (GraphQL endpoint, with future support for REST, SQL, MongoDB)
b. Core Components:
• WebProducer Lambda Function
• Template System
• File Adapters (S3, Amplify, Zip)
• Configuration Management
• Build Pipeline
┌─ External Triggers ─┐ ┌─ Core Processing ─┐ ┌─ Storage/Delivery ─┐
• CMS Webhook │───▶│ - Lambda Function │───▶│ - S3 Bucket │
• Build Pipeline │ │ - CloudFront CDN │
• ┘ └────────────────────┘ └────────────────────┘
Component Relationships
Following flows:
• CMS Webhook → Lambda Function
• Lambda Function → Data Source (GraphQL)
• Lambda Function → Template Source
• Build Pipeline → S3/CloudFront
• CloudFront → End Users
Detailed Component Breakdown
The Lambda Function should be expanded to show its internal processes:
┌─ Lambda Function ────────────────────┐
• 1. Content Fetch │
• 2. File List & ETag Check │
• 3. Theme Loading │
• 4. Content/Theme Merger │
• 5. Asset Processing │
• 6. Sitemap/RSS Generation │
• 7. Diff Generation │
• 8. Target Deployment │
• 9. CloudFront Invalidation │
• ┘
Configuration Layer
A separate configuration layer that includes:
• webproducer.yml configuration
• Environment variables
• Data source aliases
• Template aliases
• Destination aliases
File Adapter Layer
Different file adapters:
• AmplifyFileAdapter
• S3FileAdapter
• ZipFileAdapter
Important Details
• Serverless architecture
• Future expansion possibilities (Google, Microsoft)
• Version information
• Environment stages (dev, stage, prod)
Notes for Implementation
• Notes about AWS dependency
• Extension points for future provider support
Remember to maintain a balance between showing the overall architecture and including important implementation details that affect the system's behavior and scalability.