Skip to content

deeasspee/teesra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

150 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Teesra 🗞️

Ek khabar, teen nazariye — One news, three perspectives.

Live at teesra.in

A daily AI-powered morning brief for young Indians that cuts through media bias. Every story is presented as verified facts, a left lens, a right lens, and street pulse — so you can think for yourself.


What it does

Teesra runs a fully automated pipeline every morning at 6:45 AM IST:

  1. Fetches RSS from 16 Indian and international news sources
  2. Groups similar stories and scores them by national importance, youth relevance, and topic diversity
  3. Selects 15 stories across politics, economy, tech, sports, and international news
  4. Analyzes each story with Claude AI — extracting facts, left lens, right lens, impact, and street pulse
  5. Saves everything to Supabase
  6. Sends a formatted HTML newsletter to all subscribers from brief@teesra.in
  7. Serves the feed live at teesra.in/feed

Story format

Every story is broken into four sections:

Section What it is
⚖️ Facts Only what happened — verified across 3+ sources, no spin
🔵 Left Lens How progressive outlets frame the story
🔴 Right Lens How conservative outlets frame the same story
💬 Street Pulse What specific groups of people are actually saying

Story types get different treatments — sports skips left/right and gets expanded facts + fan sentiment. Sensitive stories get facts first with a caution note.


Tech stack

Layer Tool
Language Python 3.11
AI Claude API — Haiku for classification, Sonnet for analysis
Database Supabase (PostgreSQL)
Email Resend API — sends from brief@teesra.in
Frontend HTML / CSS / JS — no framework
Backend Flask
Hosting Vercel
Automation GitHub Actions — runs daily at 1:15 AM UTC
Domain teesra.in (GoDaddy)

News sources (16)

India: The Hindu, Indian Express, NDTV, Times of India, Mint, Scroll, Hindustan Times, BBC India, OpIndia, News18, The Caravan

International: BBC World, Reuters

Sports: ESPNcricinfo

Tech: TechCrunch, The Verge


Article selection logic

Stories are scored on:

  • National impact (+25) — Parliament, RBI, Supreme Court, elections, major policy
  • Youth relevance (+15) — startups, AI, climate, jobs, education, fintech
  • Source coverage (capped at +20) — more sources = more important, but not the only signal
  • India-connected international (+10) — global stories that affect India directly

Stories are penalised for:

  • Repetitive geopolitics (-20) — Gaza/Ukraine get max 1 story/day unless major development
  • Petty crime (-35) — one-off incidents with no systemic context
  • Celebrity/trivial (-25) — birthday parties, outfits, viral videos
  • Hyper-local (-20) — municipal, ward-level, panchayat stories

Topic caps prevent any single topic from dominating. Minimums ensure at least 1 international, 1 tech, and 1 sports story daily.


Project structure

teesra/
├── fetch_news.py          # Fetches RSS from all 16 sources
├── article_selector.py    # Smart story selection with scoring
├── analyze_article.py     # Claude AI analysis — builds prompts, parses output
├── database.py            # Supabase operations
├── market_data.py         # Fetches Sensex, Nifty, Bank Nifty from Yahoo Finance
├── newsletter.py          # Builds HTML email and sends via Resend
├── send_welcome.py        # Welcome email for new subscribers
├── run_daily.py           # Master pipeline script
├── app.py                 # Flask backend — serves pages and APIs
├── index.html             # Homepage
├── feed.html              # Daily feed — dark/light theme, NASA APOD background
├── about.html             # About page + builder CV / portfolio
├── vercel.json            # Vercel deployment config
├── requirements.txt       # Python dependencies
└── .github/workflows/
    └── daily_brief.yml    # GitHub Actions — runs run_daily.py daily

Feed features

  • NASA APOD (Astronomy Picture of the Day) as background — changes daily
  • Dark / light theme toggle with localStorage persistence
  • Live clock — HH:MM:SS IST
  • Market ticker — Sensex, Nifty, Bank Nifty with live % change
  • Story cards with type badges — IPL (gold), Sports (green), Tech (blue), International (purple)
  • Source count badge with tooltip showing which outlets covered the story
  • Mobile responsive with hamburger nav drawer
  • API secured with key-based auth

Email features

  • Sends from brief@teesra.in via Resend
  • Beautiful welcome email on signup with personal note
  • Daily brief with market data section, all 15 stories, share buttons
  • WhatsApp, Twitter, and Read Online share links in footer
  • Replies route to builder via Resend inbound forwarding

Running locally

# 1. Clone and install
git clone https://github.com/deeasspee/teesra
cd teesra
pip install -r requirements.txt

# 2. Add .env file
ANTHROPIC_API_KEY=...
SUPABASE_URL=...
SUPABASE_KEY=...
RESEND_API_KEY=...
FEED_API_KEY=...

# 3. Run full pipeline
python run_daily.py

# 4. Start backend
python app.py

# 5. Open browser
# Homepage:  http://localhost:5000
# Feed:      http://localhost:5000/feed
# About:     http://localhost:5000/about

Status

🟢 Live and running dailyteesra.in

  • Daily automated pipeline running via GitHub Actions
  • Newsletter delivered every morning to subscribers
  • Custom domain teesra.in with verified sending domain on Resend

Built by

Divyendu — Frontend developer turned MBA. IIM Amritsar grad with a focus on Analytics, Marketing and Product. Previously at TCS and Accenture. Built Teesra because I got tired of not knowing which version of the truth to believe.

Target role: Product Analytics at a product-focused company.

LinkedIn · teesra.in


We don't tell you what to think. We give you everything you need to think for yourself.

About

Three sides of every news story

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors