How rie03p/discord-weather-notification works
Components Identification
• AWS Infrastructure: Show AWS Lambda as the core compute component, and AWS EventBridge as the scheduler that triggers the Lambda function.
• Application Modules: Within the Lambda, illustrate separate internal packages:
– Weather Module (lambda/internal/weather/weather.go) to fetch/process weather forecast data.
– Discord Module (lambda/internal/discord/discord.go) to handle notification sending through the Discord Webhook.
• External Systems: Represent Discord as an external system receiving webhook notifications.
• Infrastructure Management: Include Terraform (with its main.tf and variables.tf files) as the provisioning and configuration tool that sets up the Lambda, EventBridge, and potentially other AWS resources.
• Build & Deployment: Optionally mention the make.sh script used for build, package, and deployment processes.
Interactions and Data Flow
• Within Lambda, show a flow where the entry point (lambda/main.go) calls the handler (lambda/handler/handler.go) which then selectively invokes:
• The Weather component (for data retrieval) and then,
• The Discord component (for sending notifications) if rain is forecast.