Skip to content

feat: fix frontend build, redesign landing page, and green the test suite#1081

Merged
hman38705 merged 1 commit into
mainfrom
feat/frontend-build-redesign-tests
Jul 13, 2026
Merged

feat: fix frontend build, redesign landing page, and green the test suite#1081
hman38705 merged 1 commit into
mainfrom
feat/frontend-build-redesign-tests

Conversation

@victorisiguzoruzoma874

Copy link
Copy Markdown
Contributor

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)

  • Dependency conflicts resolved: typescript ^5.9.3 (was ^6 — broke openapi-typescript), bundlewatch ^0.4.2 (was non-existent 2.3.3), @next/bundle-analyzer aligned to Next 16.2.9
  • Zod v4 breakage fixed (ZodError.errors.issues) in next.config.js and src/lib/env.ts
  • Migrated config to Next 16 / Turbopack — dropped removed swcMinify and the custom webpack splitChunks (Turbopack handles chunking/minification)
  • Renamed middleware.tsproxy.ts (Next 16 convention)

🎨 Redesign (UI/UX: Modern Dark — gold + purple on deep navy)

  • New design-token system (tokens.css): dark-primary brand palette with a disciplined light variant
  • Full visual layer (landing.css): glass sticky nav, hero with ambient glow + gradient display type (Orbitron / Exo 2, self-hosted via next/font to satisfy the strict CSP), glass email capture, bento feature cards, numbered step cards, three-column footer
  • Token-driven Statistics band
  • Created previously-404 brand assets: mark.svg, three feature icons, favicon
  • Trimmed accessibility.css to pure a11y utilities

🐛 Functional fix

  • The CSP connect-src blocked the statistics API call, so stats could never load. proxy.ts now allowlists the configured API origin from NEXT_PUBLIC_API_URL (specific origin, not blanket http:)

✅ Tests / CI

  • Fixed jest env loading (default NEXT_PUBLIC_API_URL in jest.config.js)
  • Excluded Playwright e2e/ specs from Jest; fixed broken relative imports (LoadingSpinner/Skeleton)
  • Stubbed api.getStatistics so the Statistics mount stops consuming the form's fetch mocks; fixed mock shapes, tab-order assumptions, and stale copy expectations
  • Converted nav menubar/menuitem roles → semantic links (a11y improvement); added required on the email input
  • Added API endpoint-wrapper + env-validation tests; excluded framework entry files from coverage collection

Test plan

  • npm run build — compiles clean (Turbopack, TypeScript, self-hosted fonts)
  • npm run test:ci207 passed / 16 suites, coverage gate met (branches 80.09%, functions 88.5%, statements 89.94%, lines 90.88%)
  • Visual QA via Playwright screenshots at 1440px + 375px, dark & light modes
  • Runtime: /, /mark.svg, /icons/*.svg all serve 200; fonts served from /_next/static/media
  • Reviewer: verify statistics load against a running backend on the configured NEXT_PUBLIC_API_URL

🤖 Generated with Claude Code

…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
@hman38705
hman38705 merged commit c64b0f0 into main Jul 13, 2026
7 of 23 checks passed
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.

2 participants