Your AI-powered daily current affairs companion for competitive exam preparation
Try the live app: current-affairs-app.streamlit.app
No installation needed! Just click and start practicing.
- Dual AI System:
- Groq Llama-3.1 (Bulk Processing) - Lightning-fast article analysis
- Google Gemini (Premium Chat) - Intelligent Q&A responses
- Smart Relevance Scoring - AI rates each article 1-10 for exam relevance
- Automatic Filtering - Only shows high-quality, exam-focused content
- Interactive MCQs - Click-to-answer with instant feedback
- Retry & New Question - Practice multiple questions per article
- Exam-Focused Summaries - 3-4 line summaries highlighting key facts
- Subject Tags - Identifies syllabus areas (Polity, Economy, etc.)
- Date Range Selection - View articles from any date range
- Quick Filters - One-click access to Today, Yesterday, Last 7/30 days
- Date Statistics - Article count breakdown by date
- Multi-Source Support - Filter by The Hindu, PIB, Times of India, etc.
- Daily Auto-Fetch - GitHub Actions fetches news every day at 6 AM IST
- Auto-Processing - AI analyzes and generates MCQs automatically
- Auto-Save to Google Sheets - No manual work required
- Zero Maintenance - Wake up to fresh content daily
- Ask questions about current affairs
- Get exam-focused explanations
- Context-aware responses based on today's news
- UPSC Aspirants - Civil Services preparation
- SSC Candidates - Staff Selection Commission exams
- Banking Exams - Current affairs for IBPS, SBI, RBI
- State PSC - Regional competitive exams
- General Knowledge - Stay updated with relevant news
| Component | Technology | Purpose |
|---|---|---|
| Frontend | Streamlit | Interactive web interface |
| Bulk AI | Groq (Llama-3.1) | Fast article processing (unlimited free) |
| Premium AI | Google Gemini | High-quality chat responses |
| News API | NewsData.io | Multi-source news aggregation |
| Backup RSS | The Hindu, PIB | Fallback news sources |
| Database | Google Sheets | Cloud storage |
| Automation | GitHub Actions | Daily scheduled tasks |
| Deployment | Streamlit Cloud | Free hosting |
π Filter Articles
[π
Today] [π Yesterday] [π Last 7 Days] [π Last 30 Days]
π
From Date: [Select] π
To Date: [Select]
Filter by source: [The Hindu β] [PIB β] [Times of India β]
π Articles: 15 β Avg Score: 8.2/10 π
Days: 3
β Question: Which international organization recently announced...?
[A) United Nations ] [B) World Bank ]
[C) International Monetary Fund] [D) World Trade Organization]
β
Correct! Well done!
π‘ Explanation: The IMF announced new economic forecasts...
[π Retry This Question] [π² Generate New Question]
- Visit the app: current-affairs-app.streamlit.app
- Browse articles - Filtered and ready to study
- Practice MCQs - Interactive questions with instant feedback
- Use date filters - Revise any past date
- Ask questions - Get AI-powered explanations
- Python 3.11+
- Groq API Key (free at console.groq.com)
- Google Gemini API Key (free at aistudio.google.com)
- NewsData.io API Key (optional, free at newsdata.io)
- Google Sheets with public access
- Clone the repository
git clone https://github.com/Prateekray/current-affairs-app.git
cd current-affairs-app- Install dependencies
pip install -r requirements.txt- Set up secrets
Create .streamlit/secrets.toml:
GROQ_API_KEY = "your-groq-api-key"
GEMINI_API_KEY = "your-gemini-api-key"
NEWSDATA_API_KEY = "your-newsdata-api-key"
SHEET_ID = "your-google-sheet-id"- Run the app
streamlit run streamlit_app.py- Open browser
http://localhost:8501
The app automatically fetches news daily at 6 AM IST using GitHub Actions.
-
Set up Google Sheets API:
- Create a service account at console.cloud.google.com
- Download JSON credentials
- Share your Google Sheet with the service account email
-
Add GitHub Secrets:
- Go to your repo β Settings β Secrets and variables β Actions
- Add these secrets:
GROQ_API_KEYGEMINI_API_KEYNEWSDATA_API_KEYSHEET_IDGOOGLE_CREDENTIALS_JSON(entire JSON file content)
-
The workflow runs automatically!
- Every day at 6:00 AM IST
- Fetches news from multiple sources
- Processes with AI
- Saves to Google Sheets
- No manual intervention needed
You can also manually trigger the workflow:
- Go to Actions tab
- Click "Daily News Fetch"
- Click "Run workflow"
graph LR
A[NewsData.io API] --> B[Fetch Articles]
C[RSS Feeds] --> B
B --> D[Groq AI Analysis]
D --> E[Relevance Scoring]
E --> F[Filter Top Articles]
F --> G[Generate Summaries]
F --> H[Create MCQs]
G --> I[Google Sheets]
H --> I
I --> J[Streamlit App]
J --> K[User Practice]
L[GitHub Actions] -.->|Daily 6 AM| B
Daily Workflow:
- 6:00 AM IST - GitHub Actions triggers
- Fetch - Get latest news from NewsData.io + RSS feeds
- Analyze - Groq AI scores each article (1-10 relevance)
- Filter - Keep only relevant articles (score β₯ 4)
- Process - Generate summaries and MCQs
- Save - Auto-save to Google Sheets
- Done - Fresh content ready in ~2 minutes!
- Analyzes 10+ articles from multiple sources
- AI relevance scoring (1-10 scale)
- Automatic filtering of low-quality content
- Processing time: ~2-3 seconds per article
- JSON-based question format
- Four-option multiple choice
- Instant correct/wrong feedback
- Detailed explanations
- Retry same question or generate new ones
- Quick Filters:
- Today's news
- Yesterday's recap
- Last week's summary
- Last month's overview
- Custom Range: Pick any start and end date
- Statistics: Article count per date
- Grouping: Articles organized by date headers
- Powered by Google Gemini (latest model)
- Context-aware responses
- Exam-focused explanations
- Answers based on loaded articles
- Processing Speed: ~2-3 seconds per article (Groq)
- Daily Capacity: Unlimited (Groq has no practical limits)
- Uptime: 99.9% (GitHub Actions + Streamlit Cloud)
- Cost: $0 (All free tiers)
- No user data collection
- API keys stored securely in GitHub Secrets
- Google Sheets access via service account only
- Public read-only sheet access for users
- Basic news fetching
- AI-powered summaries
- Interactive MCQs
- Date filtering
- Automated daily updates
- Visual timeline/calendar view
- PDF export functionality
- User authentication
- Bookmark articles
- Study streak tracking
- Mobile app version
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add some AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Groq - For providing free, blazing-fast AI inference
- Google Gemini - For powerful language model capabilities
- NewsData.io - For comprehensive news API
- Streamlit - For the amazing app framework
- The Hindu & PIB - For RSS feeds
- Live App: current-affairs-app.streamlit.app
- GitHub: @Prateekray
- Repository: current-affairs-app
If you find this helpful for your exam preparation, please β star this repo!
Built with β€οΈ for UPSC/SSC Aspirants
π Try Live App β’ β Star on GitHub β’ π Documentation