How turancannb02/revenuecat-telegram-notifier works
Project type and purpose
• This is an event-driven “integration template” (open-source tool) built on top of the BuildShip serverless/workflow platform.
• It receives webhooks from RevenueCat, transforms key subscription events into formatted messages, and pushes them to a Telegram bot.
• It supports both BuildShip Cloud deployment and local development via Node.js/tsx.
File structure
Top-level:
• package.json, tsconfig.json – Node.js + TypeScript build and dependency config
• scripts/*.cjs – user-customizable formatting scripts (extension points)
src/buildship:
• execute-tool.ts / execute-tool-proxy.ts – the BuildShip “executor” entry points that invoke your workflow code
• files/, http.ts, storage.ts, utils.ts – BuildShip SDK modules for file handling, HTTP calls, environment/key storage, and helpers
src/revenueCatTelegramNotifier:
• index.ts – main workflow logic (event parsing, orchestration)
• nodes.ts – reusable workflow “nodes” (map RevenueCat payload to message fields)
• test-runner.ts – local dev entry point simulating a RevenueCat event via tsx
src/mcp.ts – (if present) cross-cutting utilities or multi-cloud proxy entry (minor role here)
README for additional insights
• Confirms the purpose: forward events like TRIAL_STARTED, RENEWAL, CANCELLATION.
• Shows environment setup (BuildShip Auth Keys or .env), local testing with tsx.
• Mentions that scripts/<script-id>.cjs can be edited to customize the Telegram message format.
• Workflow triggered by an HTTP POST from RevenueCat Webhooks.
• Clear, consistent labels for each component (e.g., “RevenueCat Webhook,” “BuildShip Executor,” “Event Parser Node,” “Telegram API”)
– Platform/SDK modules in another (BuildShip)
– Custom business logic in a third (revenueCatTelegramNotifier, scripts)
• Configuration sources: .env or BuildShip Auth Keys for the Telegram Bot Token
Final recommendations
• Critical interactions (HTTP POST, function invocation, script override).