How sothunly-alt/inbound_news_bot works
Inbound Reports has two deliberately separate news pipelines: a curated RSS-to-Telegram digest bot and an API/RSS ingestion pipeline that populates the website’s Supabase story feed. Telegram readers receive scheduled, urgent, or requested posts; website readers browse and use story discovery and analysis features. The site also exposes accounts and paid membership flows. The graph preserves those documented product branches, but source excerpts do not establish most web-client/API call paths, so those links are omitted. Several web capabilities are represented from the repository tree rather than inspected implementation.
Main entry points: bot.py Bot handlers · news_bot.py Bot scheduler · ingest_apis.py API and RSS collectors · index.ts PayWay transactions
Components 28
Telegram publishing
- Bot scheduler
news_bot.py - Bot handlers
newsbot/bot.py - Bot configuration
newsbot/config.py - Curated RSS fetch
newsbot/feeds.py - Story rewriting
newsbot/ai.py - Subscriber and post state
newsbot/state.py - Cross-language mirror
newsbot/mirror.py
Shared AI services
- Provider fallback router
shared/ai_router.py - AI providers
Website ingestion
- API and RSS collectors
workers/ingest_apis.py - Staged articles
- Deduplication and matching
workers/dedup.py - Worker database client
workers/db.py
News website
- Next.js news site
inbound-news-web/src/app/page.tsx - Story and topic pages
inbound-news-web/src/app/story/[slug]/page.tsx - Search and comparison
inbound-news-web/src/app/api/search/route.ts - Editorial analysis tools
inbound-news-web/src/app/api/local-lens/route.ts - Account and authentication
inbound-news-web/src/app/account/page.tsx
Membership and payments
- Membership experience
inbound-news-web/src/components/membership/PaymentModal.tsx - Membership endpoints
inbound-news-web/src/app/api/membership/checkout/route.ts - PayWay transactions
supabase/functions/create-payway-transaction/index.ts - PayWay helpers
supabase/functions/_shared/payway.ts - Supabase function client
supabase/functions/_shared/supabase.ts
Other components
- News readers
- Telegram subscribers
- Website stories
- ABA PayWay
- Supabase
Connections 29
- Telegram subscribers → Bot scheduler: command input
README.md - Bot scheduler → Bot handlers: registers handlers
news_bot.py - Bot scheduler → Bot configuration: loads settings
news_bot.py - Bot scheduler → Curated RSS fetch: schedules fetches
README.md - Bot scheduler → Bot handlers: schedules digests
README.md - Bot handlers → Curated RSS fetch: fetches stories
newsbot/bot.py - Curated RSS fetch → Story rewriting: clusters for rewrite
README.md - Story rewriting → Provider fallback router: routes prompts
newsbot/ai.py - Provider fallback router → AI providers: calls providers
shared/ai_router.py - Bot handlers → Subscriber and post state: tracks posts
newsbot/bot.py - Bot handlers → Cross-language mirror: publishes mirror items
newsbot/bot.py - Bot handlers → Telegram subscribers: broadcasts posts
README.md - API and RSS collectors → Staged articles: upserts articles
workers/ingest_apis.py - API and RSS collectors → Worker database client: gets database client
workers/ingest_apis.py - API and RSS collectors → Deduplication and matching: passes articles
README.md - Deduplication and matching → Website stories: writes stories
README.md - Next.js news site → Website stories: reads story feed
README.md - News readers → Next.js news site: browses news
README.md - News readers → Story and topic pages: opens stories
- News readers → Search and comparison: searches and compares
- News readers → Editorial analysis tools: uses analysis
- News readers → Account and authentication: manages account
- News readers → Membership experience: purchases membership
- Membership experience → Membership endpoints: starts checkout
- Membership endpoints → PayWay transactions: initiates payment
- PayWay transactions → PayWay helpers: uses payment helpers
supabase/functions/create-payway-transaction/index.ts - PayWay transactions → Supabase function client: uses admin client
supabase/functions/create-payway-transaction/index.ts - PayWay helpers → ABA PayWay: requests transactions
- Supabase function client → Supabase: connects client
supabase/functions/_shared/supabase.ts