Modernize project structure and configuration with Next.js 15, React Testing Library, and development tooling#79
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: vidaluca77-cloud <226796821+vidaluca77-cloud@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR implements a comprehensive modernization of the project structure and development workflow, upgrading Next.js from 14.0.4 to 15.4.7 and introducing professional development tooling and testing infrastructure.
Key changes include:
- Modernized dependencies with Next.js 15.4.7 and React Testing Library integration
- New component architecture with reusable Button, ActivityCard, Header, and MissionCard components
- Custom hooks for user profile management and activity matching logic
- Professional code quality tooling including Prettier, Husky, and lint-staged
Reviewed Changes
Copilot reviewed 37 out of 43 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/index.ts | New TypeScript type definitions for activities, user profiles, and form data |
| src/components/*.tsx | New reusable React components with proper TypeScript interfaces |
| src/hooks/*.ts | Custom React hooks for state management and business logic |
| src/monitoring/*.ts | Code style improvements and formatting consistency |
| src/app/*.tsx | Formatting improvements and proper Next.js Link usage |
| package.json | Major dependency updates and new development tooling scripts |
| Configuration files | New Prettier, Husky, ESLint, and CI/CD configurations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| const updateProfile = useCallback((key: keyof UserProfile, value: any) => { | ||
| setProfile(prev => ({ ...prev, [key]: value })); | ||
| }, []); |
There was a problem hiding this comment.
The updateProfile function uses 'any' type for the value parameter, which reduces type safety. Consider using a generic type or union type to ensure type safety: <K extends keyof UserProfile>(key: K, value: UserProfile[K]) => void.
| export const useActivityMatching = ( | ||
| activities: Activity[], | ||
| profile: UserProfile | null | ||
| ): Suggestion[] => { |
There was a problem hiding this comment.
The hook recalculates suggestions on every render when activities array changes. Consider memoizing the activities array or using a stable reference to prevent unnecessary recalculations.
| onComplete, | ||
| }: { | ||
| onComplete: (profile: UserProfile) => void; | ||
| }) => { |
There was a problem hiding this comment.
The OnboardingFlow component is very large (200+ lines) and handles multiple responsibilities. Consider breaking it down into smaller components like SkillsStep, AvailabilityStep, LocationStep, and PreferencesStep for better maintainability.
| }: { | ||
| suggestions: Suggestion[]; | ||
| profile: UserProfile; | ||
| }) => { |
There was a problem hiding this comment.
The SuggestionsPage component is extremely large (400+ lines) and contains multiple nested functions. Consider extracting components like ActivityDetailModal, SafetyGuideModal, and SuggestionCard to improve readability and maintainability.
This PR implements comprehensive improvements to the project structure and development workflow, modernizing the codebase to follow current best practices and industry standards.
🚀 Major Updates
Dependencies Modernization
Project Structure Reorganization
The project now follows a clean, scalable architecture:
New Reusable Components
Custom Hooks
Testing Infrastructure
Code Quality & Developer Experience
@/*aliasesDocumentation
🔧 Technical Improvements
Build System
<a>tags for proper client-side navigationTesting Strategy
Development Workflow
✅ Verification
🎯 Impact
This modernization provides:
The project is now aligned with industry best practices and ready for continued development with a solid foundation.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
o1.ingest.sentry.ionode /home/REDACTED/work/LaVidaLuca-App/LaVidaLuca-App/node_modules/.bin/next build(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.