Description
Allow users to edit their profile, including uploading a profile picture and updating their description (bio). The updated information should be reflected in both the chat UI (e.g., avatar, tooltip) and stored in the backend.
User Story
As a user, I want to edit my profile so that others can see my updated picture and description in chats.
Acceptance Criteria
- Users can upload a profile picture.
- Profile picture should be stored in the backend and linked to the user record.
- Users can update their description/bio.
- Changes are persisted and reflected in the frontend immediately.
- Display updated avatar in chat list, message bubbles, and presence indicators.
- Validate image formats (jpg, png, webp) and enforce a size limit.
- Show placeholder/default avatar if no profile picture is set.
Technical Notes
- Extend user schema to include profileImageUrl and bio.
- Implement an API endpoint for updating profile data.
- Store uploaded images in cloud storage (e.g., S3, Firebase) or locally for development.
- Frontend:
- Add a profile settings page or modal.
- Implement image upload with preview before saving.
- Add a description text area with character limit (e.g., 200 chars).
- Update WebSocket presence events to include new profile metadata.
Additional Considerations
- Add validation and error handling (invalid image, too large).
- Ensure backward compatibility with existing users without profile data.
- Update integration tests to cover profile update scenarios.
Description
Allow users to edit their profile, including uploading a profile picture and updating their description (bio). The updated information should be reflected in both the chat UI (e.g., avatar, tooltip) and stored in the backend.
User Story
As a user, I want to edit my profile so that others can see my updated picture and description in chats.
Acceptance Criteria
Technical Notes
Additional Considerations