puffin-app/public/Puffin Offset.svg

1 line
14 KiB
XML
Raw Normal View History

Migrate from Vite to Next.js 16 with Turbopack This is a major migration from Vite to Next.js 16.0.1 for improved performance, better SEO, and modern React features. ## Next.js Migration Changes - Upgraded to Next.js 16.0.1 with Turbopack (from Vite 6) - Migrated from client-side routing to App Router architecture - Created app/ directory with Next.js page structure - Added server components and client components pattern - Configured standalone Docker builds for production ## Bug Fixes - React Hooks - Fixed infinite loop in Header.tsx scroll behavior (removed lastScrollY state dependency) - Fixed infinite loop in useCalculatorState.ts (wrapped saveState/clearState in useCallback) - Fixed infinite loop in OffsetOrder.tsx (removed savedState from useEffect dependencies) - Removed unused React imports from all client components ## Environment Variable Migration - Migrated all VITE_ variables to NEXT_PUBLIC_ prefix - Updated src/utils/config.ts to use direct static references (required for Next.js) - Updated src/api/checkoutClient.ts, emailClient.ts, aisClient.ts for Next.js env vars - Updated src/vite-env.d.ts types for Next.js environment - Maintained backward compatibility with Docker window.env ## Layout & UX Improvements - Fixed footer to always stay at bottom of viewport using flexbox - Updated app/layout.tsx with flex-1 main content area - Preserved glass morphism effects and luxury styling ## TypeScript & Build - Fixed TypeScript strict mode compilation errors - Removed unused imports and variables - Fixed Axios interceptor types in project/src/api/wrenClient.ts - Production build verified and passing ## Testing & Verification - Tested calculator end-to-end in Playwright - Verified Wren API integration working (11 portfolios fetched) - Confirmed calculation: 5000L → 13.47 tons CO₂ → $3,206 total - All navigation routes working correctly - Footer positioning verified across all pages ## Files Added - app/ directory with Next.js routes - components/ directory with client components - next.config.mjs, next-env.d.ts - ENV_MIGRATION.md, NEXTJS_MIGRATION_COMPLETE.md documentation ## Files Modified - Docker configuration for Next.js standalone builds - package.json dependencies (Next.js, React 19) - ts config.json for Next.js - All API clients for new env var pattern 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-31 22:23:45 +01:00
<?xml version="1.0"?><svg version="1.2" baseProfile="tiny-ps" viewBox="0 0 300 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>Puffin Offset</title><g><g fill="#f6fbfa" transform="matrix(.1 0 0 -.1 0 300)"><path d="M1455 2836c-88-35-109-41-235-75l-115-32-112-54-112-55-100-75-101-76-81-90-81-91-63-97c-110-170-163-294-196-464l-19-98v-197l-32-33c-49-52-132-151-151-179l-17-26 120-28 120-29 7-26c11-49 114-245 176-336l62-90 100-101 100-101 85-58c47-32 129-80 183-107l98-49 117-39 117-39 115-17 115-16 115 6 115 6 90 20c189 42 339 105 485 203l75 51 130 130 131 131 58 89c32 49 74 123 94 165l35 75 34 136 35 135-5 190-5 190-27 95-27 95-47 100c-26 55-74 140-106 190l-58 90-76 81c-42 44-98 106-124 137-85 100-227 194-380 252-37 14-98 40-135 59s-97 44-132 55l-63 21-126-1h-126l-60-23z"/></g><g fill="#a9c9cd" transform="matrix(.1 0 0 -.1 0 300)"><path d="M1308 2783c7-3 16-2 19 1 4 3-2 6-13 5l-19-1 13-5zm217-37c-22-7-60-23-84-35l-44-23-51-52-51-51-29-58-29-58 9-9 9-8 182-8 181-7 24-36 23-36 37-3 37-3 20 11c12 6 28 24 36 41l16 30-7 22c-3 12-16 32-27 45l-20 22h-76l-33-28-33-29-97 5c-54 2-98 6-98 9 0 2 6 16 14 31 20 37 63 75 116 103l45 23h170l40-21 40-21 46-49 46-49 14-40 13-39 1-70v-70l-18-47-19-48-40-35-41-35-56-21-56-22-60 1h-60l-58 22-59 22-54 54-54 54-17 58-17 58h-145l-5-21c-3-11-6-57-6-102v-82l64-31 64-30 27-31c14-18 35-50 47-72l20-40 5-76 5-76-11-58-12-57-34-68-34-67-55-66-55-66-76-52c-92-64-227-128-357-170l-97-31-88-10c-48-5-119-10-158-10h-70l15-10c8-6 65-26 125-46l110-36 143-11 143-11 67 12c37 6 98 21 136 34l68 22 94 55 93 56 159 133c170 140 209 182 273 287 73 120 92 184 109 354l10 104 27 39c16 21 38 52 51 70 12 17 29 54 37 81l15 51v135l-22 58-21 57-50 53c-27 29-70 66-96 82l-46 30-60 16-59 15-71-1h-70l-40-13zm495-105c0-6 4-12 9-15s22-30 39-59l29-52 12-53c6-29 11-77 11-106v-54l-20-64-20-65-30-44-29-44 35-3c19-2 59 2 88 8l53 11 26 27c14 15 32 44 41 66l16 38v47c0 26-6 71-14 101s-13 56-11 58 15-17 30-41l26-46 6-68 5-68-16-39c-9-22-14-41-11-44s50 7 106 23l101 28-6 31c-4 17-20 59-36 94l-29 63-59 58-58 59-69 44c-85 54-202 118-215 118-6 0-10-4-10-9zm-880-20c-30-10-96-38-145-64l-90-47-82-65c-135-108-256-252-343-411l-39-70-35-105-34-104-16-94c-18-106-19-131-8-131 4 0 74 74 155 164s198 213 260 273l112 108 62 33 63 33 42 7 43 7 6 100 6 100 18 70c9 39 32 101 51 139s33 71 31 72c-1 1-27-6-57-15zm1250-65c0-2 8-10 18-17l17-14-14 18c-13 16-21 21-21 13zM650 2433l-55-58 58 55c53 50 62 60 54 60-1 0-27-26-57-57zm1820 43c0-2 8-10 18-17l17-14-14 18c-13 16-21 21-21 13zm60-79c0-2 15-16 33-33l32-29-29 33c-28 30-36 37-36 29zm80-80c0-2 15-16 33-33l32-29-29 33c-28 30-36 37-36 29zm-2-189-3-43-55-6c-31-3-78-13-105-22-28-9-103-30-168-47l-118-30h-129v-43c0-24-9-79-20-123l-21-79-40-84c-22-46-38-86-35-88 2-3 26 3 53 12 26 9 85 21 130 26l82 9 72-10c40-6 102-17 137-25l64-15 97-50 96-50 60-49 60-49 25-41 25-40 10 3 10 3 7 49c3 27 7 90 7 140l1 91-15 85c-28 160-96 335-182 464-20 30-37 54-39 54-1 0-4-19-6-42zM995 2012l-60-29-68-58-68-58-136-156c-75-86-201-221-280-300l-144-144 11-11 11-11 145-3 144-4 83 12 82 11 90 31c105 36 188 76 266 129l56 38 59 64 59 65 33 65 32 66 10 53 10 53-6 41c-3 22-16 58-27 79l-22 39-54 28-53 28h-113l-60-28zm-744-318 1-19 5 13c3 7 2 16-1 19-3 4-6-2-5-13zm-9-69v-30l5 18c2 9 2 23 0 30l-5 12v-30zm1802-149c-183-35-271-86-549-321-108-92-204-153-313-200l-80-35-78-16-79-16-100 4-100 5-128 33-128 32-6-6-7-6 17-34c8-19 42-72 75-117l60-84 86-83 87-84 63-29 62-29 80-12 79-11 101 20 101 21 94 45 94 46 90 79c50 43 125 118 168 165l77 86 79 59 78 59 78 32c42 18 109 39 149 48l71 15 70-6c137-11 276-65 359-137l46-41 5 14c3 7 14 41 25 76l20 63-29 58-30 58-48 47c-91 90-207 156-338 192l-50 14-90 5-90 5-71-14zM291 1094l1-19 5 13c3 7 2 16-1 19-3 4-6-2-5-13zm1919-74c-64-12-124-35-200-77l-65-36-180-177-180-177-78-51-78-51-77-29c-42-17-103-35-134-42l-58-11v-9c0-14 9-17 136-49l119-31 90-8 90-9 125 8 125 8 105 31 105 31 110 54 110 53 105 85 105 86 53 63c29 35 73 89 98 121l46 59-23 24c-37 39-114 84-186 109l-68 23-75 5-75 6-45-9zM340 981c0-6 4-13 10-16l10-6-6 15c-7 18-14 21-14 7zm26-44c3-10 9-15 12-12s0 11-7 18l-12 12 7-18zm29-57c9-16 18