Colophon
Suraj Singh News is a daily news briefing built and maintained by Suraj Singh. It has a real frontend, a real backend, real environment variables and a real third-party dependency — so if it renders on your server, the pipeline that put it there genuinely works.
Owner
Suraj Singh
@surajsinghgore
Software engineer. Builds and maintains Suraj Singh News, along with the CI/CD pipeline that deploys it.
Data
Every headline is fetched server-side from the Guardian Open Platform, which accepts the literal API key test with no signup. That key lives in GUARDIAN_API_KEY, so swapping in a real one is a config change, not a code change.
Responses are cached with fetch(…, { next: { revalidate } }) and tagged per section. If the upstream call fails — rate limit, no egress from the box, outage — the app falls back to sample rows and says so on screen, rather than serving a blank page.
Article bodies are requested as bodyText, not HTML, so nothing is ever injected with dangerouslySetInnerHTML.
Frontend
/Static (ISR)Front page — one upstream call, sliced into lead, briefing, section rails and a day-by-day archive.
/indiaDynamicThe India desk — tag-driven rather than section-driven, so it spans world, business, sport and culture. Narrow it with ?section=.
/category/[slug]DynamicOne section, paginated through ?page=. Eight sections are defined in lib/categories.ts.
/article/[...id]DynamicFull story. The Guardian id is a path, so this is a catch-all segment.
/searchDynamicReads ?q= from searchParams and streams results inside Suspense.
/statusDynamic (forced)Runtime, environment and upstream diagnostics for the running box.
/aboutStaticThis page.
Backend
GET /api/healthLiveness probe. Reports env presence and whether the upstream API answered.
GET /api/newsLatest stories across all sections. Supports ?pageSize= and ?page=.
GET /api/news/[category]One section by slug. 404s on an unknown slug.
GET /api/india?section=The India desk, tag-driven. Optional ?section= narrows within it.
GET /api/search?q=Search passthrough. 400s when q is missing.
Every handler returns JSON with an explicit Cache-Control header, so a reverse proxy in front of the container behaves predictably.
Sections
Want to confirm what is actually deployed right now? See deployment status.