How sokyran/tweets-notion-saver works
Main Components to Include:
Client Layer
• Telegram Bot (User Interface)
• User's Twitter Links (Input Source)
Infrastructure Layer
• Cloudflare Worker (Main Application Runtime)
• Ngrok (Development Environment Only)
External Services
• Telegram Bot API
• Twitter API
• Notion API
Data Flow Representation
a. User → Telegram Bot → Cloudflare Worker
b. Cloudflare Worker → Twitter API (fetching tweet data)
c. Cloudflare Worker → Notion API (saving tweet data)
d. Cloudflare Worker → Telegram Bot API (sending confirmations)
Component Details
For each service component, include:
• Service name
• Primary function
• API endpoints or webhooks
• Authentication methods (indicate secret key requirements)
[User] → [Telegram Bot] ↔ [Webhook] → [Cloudflare Worker] → [Notion DB]
• ↑
• [Twitter API]
Stateless Operation: Show that no persistent storage is needed in the Worker itself
Technical Details to Include:
• TypeScript implementation (based on tsconfig.json)
• Service modularity (shown in the services directory)
• Configuration management (wrangler.toml and environment secrets)
Development vs Production Flow:
• Development: Local → Ngrok → Telegram
• Production: User → Telegram → Cloudflare Worker