
Product engineer · 2026
AffairsAI
Bilingual current affairs for UPSC and government-exam aspirants.
A current-affairs product used every day by exam aspirants. It collects public news and government feeds, turns them into a daily brief, quiz and weekly digest in English and Hindi, and ships an offline-first mobile app for revision.
What it does
- Newspaper-style home and a live feed from 51 news and government sources
- AI daily brief grouped into seven exam categories
- Daily five-question quiz with validated options
- Weekly digest researched across eight themes
- English and native Hindi explainer generator
- Eight ready study chapters with about 245 topics, Mermaid diagrams and print layouts
- Officials, policies, exam notices, calendar, state pages and India maps
- Expo mobile app with offline chapters, notes, bookmarks, quiz history, streaks, Pomodoro and reminders
How it works
- 01
Collect
A cron runs twice a day and fetches all sources in settled batches with a per-source timeout, so one broken feed never blocks the rest.
- 02
Clean
A hand-written RSS and Atom parser handles both formats, strips HTML and entities, maps categories and normalises titles for de-duplication.
- 03
Store
A 500-item rolling feed lives in Upstash Redis, falling back to JSON files and then memory.
- 04
Generate
An OpenAI-compatible client calls Mistral with timeouts and a retry. If the model fails, the brief is clearly labelled as extractive instead of pretending.
- 05
Publish
Pages revalidate, and structured data tells search engines what each page is.
Architecture
Next.js App Router with static chapters, dynamic feeds and generated Open Graph images.
Scheduled ingestion, brief, quiz and Monday digest stages that each fail independently.
Mistral through one provider-compatible client; Tavily for domain-restricted weekly research and grounded bilingual answers.
Expo and React Native with React Query caching, Zod validation and local-only study state.
Canonicals, sitemaps, robots rules for search and AI crawlers, and NewsArticle, FAQ, Quiz and Breadcrumb schemas.
Engineering decisions
Partial success is success
Healthy sources still update when others time out, return malformed XML or disappear.
Honest fallback
Fallback output is labelled. Readers always know whether a model wrote what they are reading.
Testing & evaluation
- Quiz output is shape-checked (four options, valid answer index) before it is stored
Stack
Honest limits
Links are not bound to individual claims yet, and the generation routes need durable rate limits.