Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 107 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,113 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Email notification system
- Admin dashboard
- Product reviews and ratings
- Search and filtering capabilities
- Advanced search and filtering capabilities

## [0.4.0] - 2025-01-16

### Added
- **Email Verification System**: Complete email verification workflow
- Token-based email verification
- Resend verification email functionality
- Email verification status in user profile
- **Password Reset System**: Secure password reset functionality
- Forgot password with email token
- Reset password with token validation
- Token expiry handling
- **Profile Management**: Comprehensive user profile system
- Profile information editing (name, email, phone)
- Avatar upload and management
- Password change with current password validation
- Email verification status display
- URL-based tab navigation (profile, security, addresses)
- **Address Management**: Full address CRUD operations
- Multiple address types (Home, Work, Other)
- Default address selection
- Color-coded address type badges with emojis
- City autocomplete with Geoapify API integration
- Smart autocomplete (only shows suggestions when user types)
- Address validation and error handling
- **Newsletter System**: Newsletter subscription management
- Subscribe/unsubscribe functionality
- Email validation
- Subscription tracking
- **UI/UX Improvements**:
- Consistent button styling (removed icon clutter)
- Emoji icons for visual context (📍, ⭐, 📧, 🏠, 🏢, etc.)
- URL-based navigation with persistent tab states
- Lazy loading with React.lazy and Suspense
- Responsive design improvements
- Clean, professional appearance

### Fixed
- **Critical Bugs**:
- esbuild security vulnerability (forced resolution to ^0.25.0)
- Terser not found in production build (added as dev dependency)
- Mongoose duplicate schema index warnings (removed redundant indexes)
- **Medium Bugs**:
- Multiple default addresses bug (proper state synchronization)
- Autocomplete suggestions popup on edit (user typing detection)
- Navigation state loss on refresh (URL-based navigation)
- TypeScript warnings with unsafe `as any` usage (proper type definitions)
- UI consistency issues (standardized button styling)

### Changed
- **Type Safety Improvements**:
- Created `types/api.types.ts` with proper interfaces
- Replaced all `as any` with type-safe utilities
- Added `extractResponseData<T>()` utility function
- Changed generic defaults from `any` to `unknown`
- **Address Types**: Simplified to 3 essential types
- Home, Work, Other
- Color-coded badges for each type
- Visual type selector in forms
- **Production Optimization**:
- Code splitting with manual chunks (vendor, ui, utils)
- Terser minification for smaller bundle sizes
- Disabled sourcemaps in production
- Tree shaking with `__DEV__` flag
- Optimized dependencies

### Technical Improvements
- Zero TypeScript errors and ESLint warnings
- Zero security vulnerabilities in dependencies
- Complete type safety across all API calls
- Proper frontend-backend state synchronization
- Smart user interaction detection for autocomplete
- Optimized Vite build configuration
- Clean database indexes without duplicates

### Files Added
- `client/src/types/api.types.ts` - Type-safe API response interfaces
- `client/src/utils/addressUtils.ts` - Address type utilities
- `client/src/pages/profile/Profile.tsx` - Main profile page
- `client/src/pages/profile/components/ProfileInfo.tsx` - Profile info component
- `client/src/pages/profile/components/SecuritySettings.tsx` - Password change
- `client/src/pages/profile/components/AddressManagement.tsx` - Address CRUD
- `client/src/pages/profile/components/AddressForm.tsx` - Address form
- `client/src/pages/auth/EmailSent.tsx` - Email sent confirmation
- `client/src/pages/auth/EmailVerification.tsx` - Email verification
- `client/src/pages/auth/ResendVerification.tsx` - Resend verification
- `client/src/services/addressService.ts` - Address API service
- `client/src/services/geoapifyService.ts` - Geoapify autocomplete
- `client/src/schemas/profile.schemas.ts` - Profile validation schemas
- `client/src/components/forms/AvatarUpload.tsx` - Avatar upload
- `client/src/components/forms/PhoneInput.tsx` - Phone input
- `client/src/components/forms/AddressAutocomplete.tsx` - City autocomplete
- `server/routes/addressRoutes.js` - Address API routes
- `server/controllers/addressController.js` - Address business logic
- `server/validators/addressValidators.js` - Address validation
- `server/models/Newsletter.js` - Newsletter model
- `server/routes/newsletterRoutes.js` - Newsletter routes
- `server/controllers/newsletterController.js` - Newsletter logic

### Files Modified
- `client/vite.config.ts` - Production optimizations
- `client/package.json` - esbuild resolution
- `server/models/User.js` - Address types and indexes
- `server/models/Newsletter.js` - Removed duplicate indexes
- `client/src/routes/AppRoutes.tsx` - Added new routes
- Multiple profile components - Bug fixes and improvements

## [0.3.0] - 2025-01-01

Expand Down
Loading