Skip to content

Implement Scalable Challenge Grid UI#4

Open
spark33 wants to merge 3 commits into
mainfrom
feature/scalable-challenge-grid
Open

Implement Scalable Challenge Grid UI#4
spark33 wants to merge 3 commits into
mainfrom
feature/scalable-challenge-grid

Conversation

@spark33

@spark33 spark33 commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Transform the frontend interview platform from a static 2-task list into a scalable card grid that can handle 10-50+ challenges with comprehensive filtering and categorization capabilities.

Changes

New Features

  • ✅ Card grid layout with responsive columns (1/2/3 based on screen size)
  • ✅ Filtering by category, difficulty, and search text
  • ✅ Dynamic routing via /challenges/[slug]
  • ✅ Backward compatibility with old URLs (/task1, /task2)
  • ✅ Reusable component architecture

Files Added

  • src/data/challenges.ts - Central challenge registry with TypeScript types
  • src/components/ChallengeBadge/ChallengeBadge.tsx - Badge component for difficulty/category/time
  • src/components/ChallengeCard/ChallengeCard.tsx - Interactive card component
  • src/components/ChallengeFilters/ChallengeFilters.tsx - Filter UI component
  • src/app/challenges/[slug]/page.tsx - Dynamic route handler
  • src/app/task2/Task2Content.tsx - Extracted task 2 content for reusability
  • IMPLEMENTATION_NOTES.md - Complete implementation documentation

Files Modified

  • src/app/page.tsx - Refactored to card grid with filters
  • src/app/task1/page.tsx - Added redirect to new URL structure
  • src/app/task2/page.tsx - Updated to use Task2Content component
  • src/app/task1/debug/page.tsx - Updated navigation links

Architecture Benefits

  • Scalable: Easy to add 10, 50, 100+ challenges
  • Maintainable: Single source of truth in challenges.ts
  • Type-safe: Full TypeScript support with interfaces
  • Mobile-friendly: Responsive by default with Chakra UI
  • Extensible: Easy to add progress tracking, sorting, favorites, etc.

Routes

  • / - Homepage with challenge grid and filters
  • /challenges/debug-dashboard - Task 1 (debugging challenge)
  • /challenges/emptystate-component - Task 2 (component design)
  • /task1 - Redirects to /challenges/debug-dashboard (backward compatibility)
  • /task2 - Shows task 2 content (backward compatibility)
  • /task1/debug - Direct access still works

Adding New Challenges

Adding new challenges is now simple (3 steps):

  1. Add to registry in src/data/challenges.ts
  2. Create task component
  3. Register in dynamic route handler

See IMPLEMENTATION_NOTES.md for detailed instructions.

Testing

  • ✅ Homepage loads with 2 challenge cards
  • ✅ Filters work (category, difficulty, search)
  • ✅ Cards are clickable and navigate correctly
  • ✅ Backward compatibility maintained
  • ✅ Responsive design works on mobile/tablet/desktop

🤖 Generated with Claude Code

spark33 and others added 3 commits February 5, 2026 16:51
Transform the frontend interview platform from a static 2-task list into a
scalable card grid that can handle 10-50+ challenges with comprehensive
filtering and categorization capabilities.

## Changes

### New Features
- Card grid layout with responsive columns (1/2/3 based on screen size)
- Filtering by category, difficulty, and search text
- Dynamic routing via /challenges/[slug]
- Backward compatibility with old URLs (/task1, /task2)
- Reusable component architecture

### Files Added
- src/data/challenges.ts - Central challenge registry with TypeScript types
- src/components/ChallengeBadge/ChallengeBadge.tsx - Badge component
- src/components/ChallengeCard/ChallengeCard.tsx - Card component
- src/components/ChallengeFilters/ChallengeFilters.tsx - Filter UI
- src/app/challenges/[slug]/page.tsx - Dynamic route handler
- src/app/task2/Task2Content.tsx - Extracted task 2 content
- IMPLEMENTATION_NOTES.md - Complete implementation documentation

### Files Modified
- src/app/page.tsx - Refactored to card grid with filters
- src/app/task1/page.tsx - Added redirect to new URL structure
- src/app/task2/page.tsx - Updated to use Task2Content component
- src/app/task1/debug/page.tsx - Updated navigation links

## Benefits
- Scalable: Easy to add 10, 50, 100+ challenges
- Maintainable: Single source of truth in challenges.ts
- Type-safe: Full TypeScript support
- Mobile-friendly: Responsive by default
- Extensible: Easy to add progress tracking, sorting, etc.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace useBreakpointValue with responsive props to avoid SSR issues.
The hook returns undefined during server-side rendering, causing errors.
Using responsive props directly is more SSR-friendly.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Wrap the app with ChakraProvider to enable Chakra UI styles across all pages.
This fixes the issue where Chakra components weren't rendering with proper styles.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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