-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
FrontendNextJSStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programgood first issueGood for newcomersGood for newcomers
Description
Description:
Implement a user profile and settings page with tabbed interface for managing personal information, security settings, notification preferences, payment methods, and account preferences.
Page Route: /profile or /settings
Requirements:
- Tabbed navigation interface
- Profile information editing
- Password change functionality
- Notification preferences
- Payment method management
- Account deletion option
- Responsive layout
Tabs to Implement:
1. Profile Tab
- Profile Photo Upload (with crop functionality)
- Personal Information: Full Name, Email (read-only with verified badge), Phone Number, Company Name, Role badge (display only)
- Address Information: Street, City, State, ZIP, Country
- Save Changes button
2. Security Tab
- Change Password form (current password, new password, confirm password with strength meter)
- Two-Factor Authentication (2FA): Enable/Disable toggle, QR code display, backup codes generation
- Active Sessions: List with device type, browser, location, last activity, revoke buttons
- Login History: Recent logins table with timestamp, location, device
- Logout all other sessions button
3. Notifications Tab
- Email Notifications (toggle all, individual notification types)
- SMS Notifications (toggle all, phone verification required)
- In-App Notifications (toggle all)
- Notification Types: Shipment Updates, Payment Notifications, New Messages, Document Uploads, System Announcements, Marketing
- Frequency Settings: Instant, Daily Digest, Weekly Summary
4. Payment Methods Tab
- List of saved payment methods (card brand logo, last 4 digits, expiration, default badge)
- Add New Payment Method button (opens modal)
- Payment History table (recent transactions)
- Download invoices functionality
5. Preferences Tab
- Language Selection
- Timezone
- Date Format (MM/DD/YYYY, DD/MM/YYYY, etc.)
- Currency (USD, EUR, GBP, etc.)
- Theme (Light, Dark, System)
- Measurement Units (Imperial, Metric)
- Privacy Settings: Profile visibility, show email/phone toggles
- Application Settings: Default dashboard view, items per page, email signature
6. Account Tab
- Account Information (read-only): User ID, Account created date, Last login, Account status
- Data Export: Request data export, download link when ready, GDPR compliance note
- Delete Account: Warning message, confirmation modal, re-enter password, final confirmation checkbox
Components to Create:
/components/profile/
├── ProfileLayout.tsx (main layout with tabs)
├── TabNavigation.tsx (tab switcher, reusable)
├── ProfileTab.tsx
├── SecurityTab.tsx
├── NotificationsTab.tsx
├── PaymentMethodsTab.tsx
├── PreferencesTab.tsx
├── AccountTab.tsx
├── AvatarUpload.tsx (reusable)
├── PasswordChangeForm.tsx
├── TwoFactorSetup.tsx
├── ActiveSessionsList.tsx
├── PaymentMethodCard.tsx (reusable)
├── AddPaymentMethodModal.tsx
├── NotificationToggle.tsx (reusable)
├── DeleteAccountModal.tsx
└── DataExportSection.tsx
/components/shared/
├── Tabs.tsx (reusable tabs component)
├── FormSection.tsx (reusable form wrapper)
├── ConfirmationModal.tsx (reusable)
└── CropImageModal.tsx (reusable image cropper)
Technical Requirements:
- react-dropzone for file upload
- react-image-crop for avatar cropping
- qrcode.react for 2FA QR codes
- react-credit-cards-2 for card display
- Form validation with react-hook-form + zod
- State management with Zustand or Context
Form Validation:
- Full name: minimum 2 characters
- Email: valid email format
- Phone: valid phone format (optional)
- Password: minimum 8 characters, uppercase, lowercase, number
- Payment card: valid card number, expiry date, CVV
Password Strength Indicator:
- Visual meter (5 levels: Very Weak, Weak, Fair, Good, Strong)
- Color-coded bars (red, orange, yellow, blue, green)
- Real-time feedback as user types
- Requirements checklist
2FA Setup Flow:
- User clicks Enable 2FA
- Display QR code for authenticator app
- User scans with app
- User enters verification code
- Generate backup codes
- Confirm enablement
Acceptance Criteria:
- All 6 tabs implemented and functional
- Tab navigation works smoothly
- Profile form validation working
- Avatar upload with crop functionality
- Password change with validation and strength meter
- 2FA setup flow (QR code + verification)
- Active sessions list with revoke functionality
- Notification toggles persist to database
- Payment methods CRUD operations
- Preferences save correctly
- Account deletion with confirmation flow
- Responsive design (tabs stack on mobile)
- Form dirty state detection (unsaved changes warning)
- Loading states on save operations
- Success/error toast notifications
- TypeScript: no type errors
- All forms use react-hook-form + zod
Design Guidelines:
- Clean, organized layout
- Consistent spacing and typography
- Clear visual hierarchy
- Destructive actions (delete) use red color
- Success actions use green
- Disabled states clearly visible
- Professional, trustworthy design
Testing Requirements:
- Test all form validations
- Test image upload and crop
- Test password strength meter
- Test notification toggles
- Test with different user roles
- Test responsive breakpoints
- Test unsaved changes warning
Metadata
Metadata
Assignees
Labels
FrontendNextJSStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programgood first issueGood for newcomersGood for newcomers