Skip to content

Migrate website to vinext and Cloudflare Workers - #54

Merged
PChild merged 19 commits into
mainfrom
feat/cloudflare-vinext
Nov 29, 2026
Merged

PChild merged 19 commits into
mainfrom
feat/cloudflare-vinext

Conversation

@PChild

@PChild PChild commented Nov 28, 2026

Copy link
Copy Markdown
Member

Summary

  • migrate the site runtime and build from Next.js to vinext/Vite
  • add typed Cloudflare Worker configuration and branch-preview workflows
  • preserve MDX authoring and the existing visual design
  • keep source images in the repository while serving responsive Cloudflare URL transformations
  • fix responsive image, robot, resources, calendar, and global background regressions found during local testing

Validation

  • npm run typecheck
  • npm run lint
  • npm run build (11 routes prerendered)
  • local route and responsive-layout testing at http://127.0.0.1:3001

Follow-up in this PR

A separate optimization commit will audit and simplify the frontend dependencies and bundles without changing appearance or functionality.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-cloudflare-vinext-team401-website.team-401-resources.workers.dev (commit edd75be)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://50398420-team401-website.team-401-resources.workers.dev edd75be 2026-11-29T02:04:34.821Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9994a4b0-team401-website.team-401-resources.workers.dev cae26cf 2026-11-29T01:46:48.365Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://d328d790-team401-website.team-401-resources.workers.dev 59a14cb 2026-11-29T01:37:04.074Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://1a874b2d-team401-website.team-401-resources.workers.dev fa0459c 2026-11-29T01:33:54.200Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2744fb85-team401-website.team-401-resources.workers.dev 3c0b8ef 2026-11-29T00:31:39.598Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://689e824c-team401-website.team-401-resources.workers.dev 2a9b81a 2026-11-28T23:52:49.721Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://d82ce765-team401-website.team-401-resources.workers.dev 8f41819 2026-11-28T21:33:54.031Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://ddccf980-team401-website.team-401-resources.workers.dev d5a5fff 2026-11-28T21:20:21.683Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://3c77ca70-team401-website.team-401-resources.workers.dev adea04b 2026-11-28T21:17:48.673Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://1ca886e6-team401-website.team-401-resources.workers.dev 5dfb515 2026-11-28T19:39:47.326Z Visit the dashboard ↗

Migrate FirstData, first page, and outreach page away from MUI Grid,
Card, and Typography to use CSS classes from globals.css. FirstData
now uses string image paths instead of StaticImageData imports.
Remove @mui/material, @mui/icons-material, @emotion/react,
@emotion/cache, and @emotion/styled dependencies.

Replace all MUI components (AppBar, Box, Card, Container, Grid,
Paper, Typography, etc.) with plain HTML elements and CSS classes
from a new globals.css design system. The design system uses CSS
custom properties for the existing color palette (#861f41 primary,
#d35401 secondary, #eeeeee background) and provides responsive
grid, typography, card, and button utilities.

Keep FullCalendar on /calendar and react-medium-image-zoom for
robot image zoom. The mobile navigation menu remains a client
component with its own state.
Replace MUI Dialog, Box, Button, and DialogActions in calendar page
with plain HTML modal. Update ContentCards component to use plain
HTML. Fix lazy loading on involved, projects, resources, robots,
and sponsors pages.

Move images from src/app/img to public/img so they participate in
the build-time optimization pipeline. Add npm scripts for image
building and update .gitignore to exclude generated assets.
- Bundle size budget: fails if total client JavaScript exceeds 1000 KiB
- Image manifest coverage check: warns if source and manifest counts differ
- Eager image loading check: warns if more than 5 images use eager loading
- Optimized image verification: fails if any manifest entry is missing
  generated WebP/AVIF variants
Images smaller than 640px natively dont get a 640px variant; the check
now verifies that at least one variant exists for each manifest entry.
@PChild
PChild force-pushed the feat/cloudflare-vinext branch from adea04b to d5a5fff Compare November 28, 2026 21:19
Revert the MUI-to-HTML rewrite that broke the desktop navigation,
header color, homepage section layout, and multi-column content
grids. Components, pages, theme, and the Emotion cache return to
their pre-migration implementations.

Retained from the image work: build-time AVIF/WebP variants with a
dimension manifest, the new RespImage, lazy loading corrections,
moved image sources under public/img, and CI image checks. Bump the
CI JS budget to 1400 KiB to account for the restored MUI runtime.
@PChild
PChild force-pushed the feat/cloudflare-vinext branch from c35a030 to 8f41819 Compare November 28, 2026 21:31
The pages were already fully styled, so the MUI runtime only added client
JavaScript. Rebuild the same markup and measured styles with plain elements
and one stylesheet, keeping the DOM, spacing, typography, images, calendar,
zoom behaviour and responsive layouts pixel-identical. The mobile drawer and
event dialog are reimplemented without MUI while keeping their behaviour.
The calendar route already had its own chunk, but the Calendar nav link's
viewport prefetch pulled that 293 KiB chunk into every page. Disable prefetch
for that route so only the calendar loads FullCalendar.

The base stylesheet was a render-blocking request, which pushed first paint
back roughly 80 ms on home and robots. Inline the same compiled CSS into the
document head instead; HTML grows but compressed page weight stays level with
the original build while FCP returns to parity.
The root layout wrapped every page in Suspense, so static output placed the
real content in a hidden segment that only became visible after client
hydration. On the Cloudflare preview a slow or failed hydration left the
sponsor section blank even though the page and images were present.
The calendar was the only consumer of the FullCalendar packages, its Google
Calendar API key, and the calendar/modal styles. Removing it also drops the
route-only JavaScript chunk and the unused environment variable from CI.
The zoom overlay inherited the thumbnail's srcset, so the browser kept
choosing the small candidate even after the full image was assigned. Give
the overlay its own srcset so it renders the full-resolution version.
EasyList contains a generic `##.sponsor-link` rule, so content blockers
hide every sponsor anchor on the page. Rename the class so the logos are
not mistaken for sponsored ad links.
@PChild
PChild merged commit 5ccc6bf into main Nov 29, 2026
4 checks passed
@PChild
PChild deleted the feat/cloudflare-vinext branch November 29, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant