US news platform
Leading frontend engineering for one of the world's largest news organizations, including moving the site from legacy templates to a modern Next.js application, one piece at a time.
browser → cloudflare ├─ legacy pages └─ next.js (cloud run)
@@ news platform · Media · Frontend Lead @@
Legacy: Handlebars templates · LESS styles · ~70 custom-element widgets · unmaintained carousel library · image resizing on CMS servers · third-party donate widget
Modern: Next.js Server Components · Tailwind design tokens · Storybook component library · Embla carousels · Cloudflare image resizing · self-hosted donate app
01 — Context
The news platform serves a very large audience. Every page competes on load speed, search ranking and ad performance.
The legacy site is still in production. The new app is rebuilt from the same CMS view contract, which now arrives as headless GraphQL instead of server-rendered templates.
It's a full redesign: the new design system sets the visuals, and the legacy site is the reference for content and behaviour.
02 — The problem
Image resizing ran on the CMS's own servers. A breaking story with a new lead photo caused a burst of image renders exactly when page traffic was spiking too.
Every carousel depended on a library with no release since 2022. It needed a local patch, and its licence is GPLv3 or commercial.
Donate, sign-in and registration lived in a third-party-hosted widget. Copy and prices were hardcoded, so every change needed a deploy, and donors had to sign in before they could give.
03 — What I did
- Wrote the architecture decision to standardise on one carousel engine. I then built the shared carousel and the full gallery on it: inline and full-screen views, captions with "read more", auto-advance with pause, video slides and mixed photo-and-video galleries. It's keyboard-accessible and honours reduced motion.
- Built the base image component, the share menu and the article byline. Each ships with tests, Storybook stories and visual-regression checks.
- Wrote the architecture decision to move image resizing off the CMS servers to Cloudflare. It starts with the new story page and leaves the legacy site unchanged until real traffic costs are known.
- Designed and built a self-hosted Next.js donate app driven by CMS configuration, with Stripe server-side payments and A/B variation IDs passed into payment metadata and analytics. I recommended edge path routing so the public URLs stay the same.
- Changed the donate flow to pay first and set up an account after. This included a password step for recurring donors, email verification with automatic sign-in, and Google sign-in. I also showed that PayPal was blocked by the payment-flow architecture, not by the library version, which led to recurring PayPal donations.
- On the legacy site: redesigned the gallery controls to match the new design system, built a shared sign-in bridge for the native apps' in-app web pages, and delivered a new CMS carousel module end to end.
04 — Architecture
- Legacy and modern run side by side behind the edge, so every step can be undone. The cost is running two systems for a while.
- Generated CMS types stay inside an adapter, so the app doesn't depend on one CMS.
- Pages render fresh on every request with no app-level cache. Cloudflare caches the result and clears it when an editor publishes.
05 — Stack
[Next.js, React, TypeScript, GraphQL, Tailwind 4, Storybook, Embla, Vitest, Playwright, Handlebars, Stripe, PayPal, Cloudflare, GCP Cloud Run, GitHub Actions]
06 — Honest limits
The redesign isn't live for readers yet. A plan to show the new article page to 1% of readers is still a proposal.
Production edge caching and the image-resizing move are still in review.
Galleries on article pages, video in galleries and gallery analytics are still in progress.