Skip to content

Landing Page Redesign + CI/CD Infrastructure#7

Merged
Isaiahriveraa merged 8 commits into
mainfrom
feature/landing-page-redesign
Dec 16, 2025
Merged

Landing Page Redesign + CI/CD Infrastructure#7
Isaiahriveraa merged 8 commits into
mainfrom
feature/landing-page-redesign

Conversation

@Isaiahriveraa

@Isaiahriveraa Isaiahriveraa commented Dec 16, 2025

Copy link
Copy Markdown
Owner

Summary

This PR introduces a comprehensive redesign of the HuskyBids landing page along with critical infrastructure improvements including CI/CD automation and pre-commit git hooks. The changes improve user experience, establish a maintainable design system, and ensure code quality through automated testing.

What does this PR do?

  • Redesigns the landing page with a modern, minimalist aesthetic featuring hero section, features showcase, and how-it-works guide
  • Adds CI/CD pipeline to automatically run tests and builds on every PR
  • Implements git hooks to enforce testing before commits
  • Establishes design system with semantic color tokens for maintainable styling
  • Restructures auth routes to follow Clerk best practices
  • Adds test coverage for authentication pages
  • Creates custom 404 page for better UX

What problem does it solve?

Before:

  • Landing page was basic and didn't effectively communicate the platform's value
  • No automated testing in CI/CD - bugs could slip through to production
  • No git hooks - developers could commit broken code
  • Hardcoded colors throughout the codebase made design changes difficult
  • Auth routes didn't follow Clerk's recommended catch-all pattern

After:

  • Professional landing page that showcases features and guides new users
  • Automated CI/CD catches issues before merge
  • Pre-commit hooks prevent broken commits
  • Semantic design tokens enable global design updates from single file
  • Auth routes follow industry best practices

Context / Background

This work addresses the need for:

  1. A compelling landing page to convert visitors into users
  2. Infrastructure to maintain code quality as the team grows
  3. A scalable design system for consistent UI updates

Related decisions:

  • Follows patterns from docs/decisions/002-minimalist-design-system.md
  • Follows patterns from docs/decisions/001-clerk-authentication.md
  • Implements recommendations from docs/decisions/003-git-hooks-and-ci.md

Changes

Landing Page Redesign

  • Redesigned hero section with improved typography and spacing
  • Added features section showcasing Live Game Tracking, Dynamic Odds, and Leaderboard
  • Added how-it-works section with 3-step onboarding guide
  • Auto-redirects signed-in users to dashboard for better UX
  • Improved responsive design for mobile and desktop

CI/CD Infrastructure

  • Added GitHub Actions workflow (.github/workflows/ci.yml)
  • Automated pipeline runs on every push to main and feature/* branches
  • Pipeline steps: install deps → lint → test → build
  • Uses dummy env vars for build validation

Git Hooks

  • Added Husky pre-commit hook (.husky/pre-commit)
  • Enforces npm test before allowing commits
  • Lint checks temporarily disabled pending cleanup (tracked in TODO)

Design System

  • Added semantic color tokens to tailwind.config.js:
    • primary, secondary, background, border, text
  • Enables global design updates by changing token values
  • Maintains consistency across all components

Auth Route Restructure

  • Moved /login → /login/[[...sign-in]] (Clerk catch-all pattern)
  • Moved /sign-up → /sign-up/[[...sign-up]] (Clerk catch-all pattern)
  • Follows Clerk best practices for flexible routing

Tests

  • Added src/app/tests/auth-pages.test.jsx for auth page coverage
  • Updated existing landing page tests

Cleanup

  • Removed unused admin settle-bets page
  • Removed unused biscuit.png asset
  • Cleaned up imports across multiple pages

Implementation Details

Key Design Choices

Landing Page:

  • Used minimalist design principles (monospace font, dotted borders, generous whitespace)
  • Semantic color tokens ensure consistency with rest of app
  • Auto-redirect signed-in users to prevent confusion

CI/CD:

  • Runs on both PRs and pushes to feature branches for fast feedback
  • Uses npm ci instead of npm install for reproducible builds
  • Linting currently set to non-blocking (|| true) pending cleanup work

Design Tokens:

  • Centralized in tailwind.config.js for single source of truth
  • Hierarchical naming (primary, primary-hover, primary-text)
  • Dark-mode native with zinc palette

Important Tradeoffs

  1. Lint as non-blocking: Temporarily allows lint warnings to not fail builds while cleanup is in progress. Will be removed in future PR.
  2. Auth route changes: Breaking change for any bookmarked auth URLs (see Impact section).
  3. Pre-commit hooks: Adds ~5-10 seconds to commit time but prevents broken code.

New Patterns/Libraries

  • Husky: Git hooks framework for pre-commit testing
  • GitHub Actions: CI/CD automation
  • Semantic Design Tokens: Reusable color system in Tailwind

Tests

  • Added new tests (auth-pages.test.jsx)
  • Updated existing tests (LandingPage.test.jsx)
  • Manually tested

How to test:

Landing Page:

  1. Run npm run dev
  2. Navigate to http://localhost:3002
  3. Verify hero section, features, and how-it-works sections display correctly
  4. Sign in and verify auto-redirect to dashboard
  5. Sign out and verify landing page reappears

CI/CD:

  1. Push to a feature branch
  2. Check GitHub Actions tab
  3. Verify workflow runs: lint → test → build

Auth Routes:

  1. Navigate to /login - should load sign-in
  2. Navigate to /sign-up - should load sign-up
  3. Complete auth flow - should work identically to before

Expected result:

  • Landing page is visually appealing and responsive
  • CI/CD passes all checks
  • Auth still works despite route changes
  • Pre-commit hook blocks commits with failing tests

Impact / Risk

What could go wrong?

Auth Route Breaking Change:

  • Old bookmarked URLs (/login, /sign-up) will still work due to redirects, but URL structure changed
  • Impact: Minimal - catch-all routes are backwards compatible
  • Mitigation: Clerk handles routing gracefully

Design Token Changes:

  • Changing semantic tokens affects ALL components
  • Impact: Low - tokens match existing zinc colors, no visual change expected
  • Mitigation: Thoroughly tested across all pages

Pre-commit Hooks:

  • Developers might bypass with --no-verify if tests fail
  • Impact: Medium - could allow broken code if misused
  • Mitigation: Document proper usage, educate team

Migrations/Data Changes

  • None - This is purely frontend and infrastructure changes
  • No database migrations required
  • No env var changes required (dummy vars only in CI)

Rollout Concerns

  • Deploy during low-traffic period to monitor for auth issues
  • Monitor Sentry/logs for 404s on old auth URLs (shouldn't occur, but worth checking)

Checklist

  • Code builds and passes linters
  • Tests pass locally (npm test)
  • Documentation updated (CLAUDE.md references existing docs)
  • No breaking changes to core functionality (auth routes backwards compatible)

Stats: 22 files changed, 585 insertions, 367 deletions

Simplify authentication and add landing page showcase

Changed:
- Removed client-side redirect useEffect that was causing race conditions with middleware
- Removed useRouter import and router.replace() logic
- Changed unauthenticated state to show simple loader instead of redirect message
- Replaced basic landing page with full showcase (hero, features, how it works, CTAs)

Files:
- src/app/MinimalLayout.jsx
- src/app/page.jsx

Why:

The auth system had two layers of redirect logic (middleware + client-side useEffect) that could conflict and cause infinite loops. By removing the client-side redirect and letting middleware handle all auth redirects, the flow is simpler and more reliable. The new landing page showcases the app's features to visitors before they sign up.
Add CI/CD pipeline and pre-commit hooks for code quality

Changed:
- Added GitHub Actions workflow to run lint, tests, and build on push/PR
- Added Husky pre-commit hook to run tests before commits
- Installed Husky as dev dependency with auto-setup on npm install
- Added .netlify to .gitignore for local deployment artifacts

Files:
- .github/workflows/ci.yml (new)
- .husky/pre-commit (new)
- package.json
- package-lock.json
- .gitignore

Why:

Establish automated quality gates to prevent broken code from reaching production.
GitHub Actions validates every push with linting, testing, and build checks.
Husky catches failures locally before commits, giving developers immediate feedback.
This dual-layer approach ensures the main branch stays deployable at all times.
Migrate authentication to Clerk catch-all routes

Changed:
- Moved login page to [[...sign-in]] catch-all route for Clerk OAuth support
- Moved sign-up page to [[...sign-up]] catch-all route
- Added tests for Clerk authentication pages

Files:
- src/app/login/page.js → src/app/login/[[...sign-in]]/page.js (moved)
- src/app/sign-up/page.jsx → src/app/sign-up/[[...sign-up]]/page.jsx (moved)
- src/app/__tests__/auth-pages.test.jsx (new)

Why:

Clerk requires catch-all routes to handle OAuth callbacks, email verification,
and other auth flows. The [[...slug]] pattern allows Clerk to manage all
authentication URLs under /login/* and /sign-up/* paths, enabling proper
integration with third-party OAuth providers and Clerk's authentication flow.
Add minimalist design system with semantic color tokens

Changed:
- Added semantic color tokens to Tailwind config (primary, secondary, background, border, text)
- Removed Google Fonts, switched to system monospace fonts only
- Updated body typography from sans-serif to monospace

Files:
- tailwind.config.js
- src/app/globals.css

Why:

Establish a single source of truth for the UI design system. Semantic tokens
(e.g., 'bg-primary' instead of 'bg-zinc-100') allow design changes to propagate
across the entire app by updating one config file. Monospace fonts align with
the minimalist aesthetic: dotted borders, generous whitespace, and technical precision.
Redesign landing page and add authenticated user auto-redirect

Changed:
- Added auto-redirect to /dashboard for authenticated users using Clerk's useUser hook
- Redesigned header with minimalist uppercase branding (HUSKYBIDS)
- Applied semantic color tokens from design system (text-text-muted-light, text-text-subtle)
- Updated copy from "biscuits" to "pts" for currency terminology
- Simplified navigation and removed redundant auth buttons
- Updated tests to match new uppercase branding, "Get Started" CTA, and auto-redirect behavior

Files:
- src/app/page.jsx
- src/app/__tests__/LandingPage.test.jsx

Why:

Improve user experience by automatically routing authenticated users to their dashboard
instead of showing the landing page. The redesign embraces the minimalist design system
with monospace typography, semantic tokens, and uppercase branding. Tests updated to
verify auto-redirect functionality and match the new design (HUSKYBIDS, "Get Started" button).
Refine pages and components with design system improvements

Changed:
- Removed unused ActionBar components from dashboard and leaderboard pages
- Replaced emoji fire icon with FireIcon component in tasks page
- Added semantic colors to sport icons in MinimalGameCard (football: amber-800, basketball: orange-500)
- Standardized hover states for bet buttons (consistent zinc-600/white instead of mixed purple/zinc)
- Removed empty line whitespace in games page

Files:
- src/app/dashboard/page.jsx
- src/app/games/page.jsx
- src/app/leaderboard/page.jsx
- src/app/tasks/page.jsx
- src/components/experimental/ui/MinimalGameCard.jsx

Why:

Clean up unused UI elements and ensure consistent use of the design system across pages.
The FireIcon component provides scalable, consistent iconography. Sport icon colors provide
visual distinction while staying within the minimalist zinc palette. Standardized hover states
create a more cohesive user experience across betting interactions.
Add FireIcon component and custom 404 page with smart redirects

Changed:
- Added FireIcon component with configurable size and color variants (default, subtle, intense)
- Added custom 404 Not Found page with authentication-based smart redirects
- FireIcon uses React.memo for performance optimization and SVG gradients for visual polish
- 404 page redirects authenticated users to dashboard, unauthenticated users to login

Files:
- src/components/FireIcon.jsx (new)
- src/app/not-found.jsx (new)

Why:

Replace emoji fire icons with a scalable, professional SVG component that maintains
visual consistency across the app. The FireIcon supports multiple variants for different
contexts (streak indicators, notifications, etc.). The custom 404 page prevents users
from hitting dead ends by intelligently routing them to the appropriate destination based
on their authentication state, improving overall user experience.
Remove unused admin page and deprecated assets

Changed:
- Removed unused admin settle-bets page
- Removed deprecated biscuit.png asset

Files:
- src/app/admin/settle-bets/page.jsx (deleted)
- src/app/daily-tasks/biscuit.png (deleted)

Why:

Clean up unused code and assets to reduce repository size and eliminate dead code.
The settle-bets admin page is no longer used, and the biscuit.png asset has been
replaced with modern iconography (FireIcon component). Removing unused code improves
maintainability and prevents confusion for future developers.
Copilot AI review requested due to automatic review settings December 16, 2025 07:03
@netlify

netlify Bot commented Dec 16, 2025

Copy link
Copy Markdown

Deploy Preview for huskybids ready!

Name Link
🔨 Latest commit 513e50d
🔍 Latest deploy log https://app.netlify.com/projects/huskybids/deploys/6941044ea153fa000843f23f
😎 Deploy Preview https://deploy-preview-7--huskybids.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a comprehensive redesign of the HuskyBids landing page along with critical infrastructure improvements for CI/CD automation and code quality enforcement through git hooks. The changes modernize the user interface with a minimalist design system, implement automated testing pipelines, and restructure authentication routes to follow Clerk best practices.

Key Changes:

  • Complete landing page redesign with hero section, features showcase, and how-it-works guide, including auto-redirect for authenticated users
  • Implementation of semantic design tokens in Tailwind config for maintainable, centralized styling
  • CI/CD pipeline with GitHub Actions for automated linting, testing, and builds on every PR

Reviewed changes

Copilot reviewed 18 out of 22 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/app/page.jsx Complete landing page redesign with new sections, auto-redirect logic for authenticated users, and responsive layout
tailwind.config.js Added semantic color tokens (primary, secondary, background, border, text) for centralized design system
.github/workflows/ci.yml New CI/CD pipeline with lint, test, and build steps; includes temporary lint bypass and dummy env vars
.husky/pre-commit Pre-commit hook enforcing test execution before commits; lint checks temporarily disabled
src/app/not-found.jsx New custom 404 page with intelligent redirects based on auth state
src/components/FireIcon.jsx New custom fire icon component with multiple variants and animation support for streak indicators
src/app/sign-up/[[...sign-up]]/page.jsx Removed routing="hash" prop and added signInUrl for improved auth navigation
src/app/login/[[...sign-in]]/page.js Removed routing="hash" prop to fix middleware authentication issues
src/app/tests/auth-pages.test.jsx New tests verifying auth configuration and routing prop removal
src/app/tests/LandingPage.test.jsx Updated tests for redesigned landing page with auto-redirect behavior
src/app/MinimalLayout.jsx Removed client-side auth redirect logic (now handled by middleware)
src/app/globals.css Switched from external fonts to monospace-only styling
src/components/experimental/ui/MinimalGameCard.jsx Updated hover colors for consistency with design system
src/app/tasks/page.jsx Replaced emoji with new FireIcon component
package.json Added husky dependency and prepare script for git hook setup
.gitignore Added .netlify directory to ignored files
src/app/admin/settle-bets/page.jsx Removed unused admin page
src/app/daily-tasks/biscuit.png Removed unused asset

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment on lines +36 to +42
env:
# Skip env validation during CI build
SKIP_ENV_VALIDATION: true
# Provide dummy values for required env vars during build
MONGODB_URI: mongodb://localhost:27017/test
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: pk_test_dummy
CLERK_SECRET_KEY: sk_test_dummy

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI workflow uses dummy environment variables (MONGODB_URI, CLERK keys) to allow the build to pass, but this approach could mask configuration issues that would only surface in production. Consider using a build-time check to validate that required environment variables are properly structured (even if dummy), or use Next.js environment variable validation to catch configuration problems earlier in the development cycle.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +28 to +29
run: npm run lint || true
# TODO: Remove "|| true" after cleanup branch fixes all lint errors

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter is configured to always pass (|| true) with a TODO comment indicating this is temporary. However, this silently allows lint errors to accumulate, which could make the eventual cleanup more difficult. Consider running the linter in a non-blocking informational mode that reports issues as warnings rather than silently suppressing them, or create a GitHub issue to track the cleanup work with a specific deadline.

Suggested change
run: npm run lint || true
# TODO: Remove "|| true" after cleanup branch fixes all lint errors
run: npm run lint
continue-on-error: true
# TODO: Track lint cleanup in a GitHub issue and set a deadline for enforcing lint errors

Copilot uses AI. Check for mistakes.
Comment on lines +54 to +56
// CRITICAL: routing should NOT be "hash"
// Hash routing causes auth state to be invisible to middleware
expect(props.routing).not.toBe('hash');

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test expects props.routing to not equal 'hash', but it doesn't verify that the routing prop is actually undefined or set to an appropriate alternative value. This test would pass even if routing was set to an incorrect value like 'invalid'. Consider also asserting that props.routing is either undefined or explicitly set to the expected value to make the test more robust.

Copilot uses AI. Check for mistakes.
Comment thread src/app/globals.css
@@ -1,4 +1,4 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Montserrat:wght@400;500;600;700;800;900&display=swap');
/* Monospace fonts only - no need for external font imports */

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states 'Monospace fonts only - no need for external font imports', but the tailwind.config.js file still includes font families for 'Inter' and 'Montserrat' in the fontFamily section (lines 115-116 of tailwind.config.js). This inconsistency suggests that either the fonts should be completely removed from the Tailwind config or the comment is inaccurate. Consider aligning the configuration with the stated design direction.

Copilot uses AI. Check for mistakes.
Comment thread src/app/page.jsx
</h1>
<p className="text-lg md:text-xl text-text-subtle max-w-xl mx-auto">
The premier virtual betting platform for UW Huskies sports.
Bet with pts, not money.

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The abbreviation 'pts' appears to be unclear and could be confusing for users. It should likely be 'points' for better clarity, or if space is a constraint, consider spelling it out in full as 'Bet with points, not money' to improve readability and user understanding.

Suggested change
Bet with pts, not money.
Bet with biscuits, not money.

Copilot uses AI. Check for mistakes.
Comment thread .husky/pre-commit
@@ -0,0 +1,11 @@
echo "Running pre-commit checks..."

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pre-commit hook lacks a shebang line (#!/bin/sh or #!/usr/bin/env sh), which is required for proper execution. While Husky may work around this, it's a best practice to include a shebang to ensure the script runs in the correct shell environment across different systems.

Copilot uses AI. Check for mistakes.
Comment thread src/app/page.jsx
key={feature.title}
className="border border-dotted border-zinc-800 p-6 space-y-4 hover:border-zinc-700 transition-colors"
>
<span className="text-2xl text-zinc-500">{feature.icon}</span>

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The decorative icons (○, ◇, △) are used as feature icons but are not properly hidden from screen readers. These Unicode characters will be announced by screen readers, which may be confusing for visually impaired users. Consider adding aria-hidden="true" to the span containing the icon, or use proper SVG icons with appropriate aria-label attributes for better accessibility.

Suggested change
<span className="text-2xl text-zinc-500">{feature.icon}</span>
<span className="text-2xl text-zinc-500" aria-hidden="true">{feature.icon}</span>

Copilot uses AI. Check for mistakes.
Comment thread src/app/page.jsx
{/* Features Section */}
<section className="py-20 px-6">
<div className="max-w-5xl mx-auto">
<p className="text-[10px] uppercase tracking-[0.2em] text-zinc-600 mb-8">

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sections use extremely small text (text-[10px]) for headings like "Features" and "How It Works", which may not meet WCAG accessibility standards for minimum font size. Text smaller than 12px can be difficult to read for users with visual impairments. Consider using at least 12px (0.75rem / text-xs) for these section labels to improve readability.

Suggested change
<p className="text-[10px] uppercase tracking-[0.2em] text-zinc-600 mb-8">
<p className="text-xs uppercase tracking-[0.2em] text-zinc-600 mb-8">

Copilot uses AI. Check for mistakes.
Comment thread src/app/page.jsx
Comment on lines +64 to +77
<h1 className="text-xs tracking-[0.3em] uppercase text-text-muted-light hover:text-text">
HUSKYBIDS
</h1>
<p className="text-lg md:text-xl text-zinc-400">
The premier betting platform for University of Washington sports.
</p>
</div>
</header>

<div className="flex flex-col sm:flex-row gap-4 w-full max-w-sm">
{isLoaded && (
isSignedIn ? (
<Link
href="/dashboard"
className="flex-1 bg-zinc-100 hover:bg-white text-zinc-950 px-8 py-3 font-semibold transition-colors"
{/* Hero Section */}
<section className="pt-32 pb-20 px-6">
<div className="max-w-3xl mx-auto text-center space-y-6">
<p className="text-[16px] uppercase tracking-[0.2em] text-zinc-600">
University of Washington
</p>
<h1 className="text-5xl md:text-7xl font-bold tracking-tight text-white">
HUSKYBIDS

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The page has two h1 elements (line 64 and line 76), which violates HTML semantic best practices and can negatively impact SEO and accessibility. A page should have only one h1 element representing the main heading. Consider changing the header h1 to a div or span, or using a different heading level for the hero section title.

Copilot uses AI. Check for mistakes.
Comment thread src/app/page.jsx
if (isSignedIn) {
router.replace("/dashboard");
}
}, [isSignedIn, isLoaded]);

Copilot AI Dec 16, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The useEffect hook is missing 'router' from its dependency array. According to React Hooks rules, all values from the component scope that change over time and are used by the effect must be included in the dependency array. While Next.js router is typically stable, the exhaustive-deps rule requires it to be listed for consistency and to prevent potential issues.

Suggested change
}, [isSignedIn, isLoaded]);
}, [isSignedIn, isLoaded, router]);

Copilot uses AI. Check for mistakes.
@Isaiahriveraa Isaiahriveraa merged commit f574561 into main Dec 16, 2025
10 of 12 checks passed
@Isaiahriveraa Isaiahriveraa deleted the feature/landing-page-redesign branch December 24, 2025 20:24
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