feat: fix frontend build, redesign landing page, and green the test suite#1081
Merged
Conversation
…uite Get the Next.js 16 frontend building and running, give it a real design system, and bring the full test/CI gate to green. Build fixes - Resolve dependency conflicts (typescript ^5.9.3, bundlewatch ^0.4.2, @next/bundle-analyzer aligned to Next 16.2.9) - Fix Zod v4 breakage (ZodError.errors -> .issues) in next.config.js and src/lib/env.ts - Migrate config to Next 16 / Turbopack (drop swcMinify + custom webpack splitChunks; Turbopack handles chunking/minification) - Rename middleware.ts -> proxy.ts (function middleware -> proxy) - Add .env.local (NEXT_PUBLIC_API_URL) Redesign (UI/UX: Modern Dark, gold + purple on deep navy) - New design token system (tokens.css) with dark-primary + light variant - Full visual layer (landing.css): glass sticky nav, hero with ambient glow and gradient display type (Orbitron/Exo 2, self-hosted via next/font), glass email capture, bento feature cards, numbered step cards, footer - Token-driven Statistics band - Create previously-404 brand assets (mark.svg, feature icons, favicon) - Trim accessibility.css to pure a11y utilities Functional fix - CSP connect-src blocked the statistics API; proxy.ts now allowlists the configured API origin from NEXT_PUBLIC_API_URL Tests / CI (0 failing, coverage gate met) - Fix jest env loading (default NEXT_PUBLIC_API_URL in jest.config.js) - Exclude Playwright e2e specs from Jest - Fix broken relative imports (LoadingSpinner/Skeleton suites) - Stub api.getStatistics so Statistics mount doesn't consume form fetch mocks; fix mock shapes, tab-order assumptions, and stale copy expectations - Convert nav menubar/menuitem roles to semantic links; add required attr - Add API endpoint-wrapper + env validation tests; exclude framework entry files from coverage collection
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the Next.js 16 frontend from not building to a polished, functional landing page with a full test/CI gate passing. Three phases: get it building, redesign the UI, and green the tests.
🔧 Build fixes (it wouldn't build/start)
typescript ^5.9.3(was^6— brokeopenapi-typescript),bundlewatch ^0.4.2(was non-existent2.3.3),@next/bundle-analyzeraligned to Next16.2.9ZodError.errors→.issues) innext.config.jsandsrc/lib/env.tsswcMinifyand the custom webpacksplitChunks(Turbopack handles chunking/minification)middleware.ts→proxy.ts(Next 16 convention)🎨 Redesign (UI/UX: Modern Dark — gold + purple on deep navy)
tokens.css): dark-primary brand palette with a disciplined light variantlanding.css): glass sticky nav, hero with ambient glow + gradient display type (Orbitron / Exo 2, self-hosted vianext/fontto satisfy the strict CSP), glass email capture, bento feature cards, numbered step cards, three-column footermark.svg, three feature icons, faviconaccessibility.cssto pure a11y utilities🐛 Functional fix
connect-srcblocked the statistics API call, so stats could never load.proxy.tsnow allowlists the configured API origin fromNEXT_PUBLIC_API_URL(specific origin, not blankethttp:)✅ Tests / CI
NEXT_PUBLIC_API_URLinjest.config.js)e2e/specs from Jest; fixed broken relative imports (LoadingSpinner/Skeleton)api.getStatisticsso the Statistics mount stops consuming the form's fetch mocks; fixed mock shapes, tab-order assumptions, and stale copy expectationsmenubar/menuitemroles → semantic links (a11y improvement); addedrequiredon the email inputTest plan
npm run build— compiles clean (Turbopack, TypeScript, self-hosted fonts)npm run test:ci— 207 passed / 16 suites, coverage gate met (branches 80.09%, functions 88.5%, statements 89.94%, lines 90.88%)/,/mark.svg,/icons/*.svgall serve 200; fonts served from/_next/static/mediaNEXT_PUBLIC_API_URL🤖 Generated with Claude Code