hritikswho.xyz/projects/affairsai
All projectsIndependent · Live · 50+ daily readers

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.

50+ readers a day
51 live sourcesAI brief + quizOffline Expo app
affsai.comSource
01

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
02

How it works

  1. 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.

  2. 02

    Clean

    A hand-written RSS and Atom parser handles both formats, strips HTML and entities, maps categories and normalises titles for de-duplication.

  3. 03

    Store

    A 500-item rolling feed lives in Upstash Redis, falling back to JSON files and then memory.

  4. 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.

  5. 05

    Publish

    Pages revalidate, and structured data tells search engines what each page is.

03

Architecture

Web

Next.js App Router with static chapters, dynamic feeds and generated Open Graph images.

Pipelines

Scheduled ingestion, brief, quiz and Monday digest stages that each fail independently.

AI & research

Mistral through one provider-compatible client; Tavily for domain-restricted weekly research and grounded bilingual answers.

Mobile

Expo and React Native with React Query caching, Zod validation and local-only study state.

SEO

Canonicals, sitemaps, robots rules for search and AI crawlers, and NewsArticle, FAQ, Quiz and Breadcrumb schemas.

04

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.

05

Testing & evaluation

  • Quiz output is shape-checked (four options, valid answer index) before it is stored
06

Stack

Next.jsRSS / AtomMistralTavilyUpstash RedisExpoReact NativeJSON-LD
07

Honest limits

Links are not bound to individual claims yet, and the generation routes need durable rate limits.

Next projectCoders Cookies