# User Profile Management Specification ## Purpose Manage user profiles including personal information and avatar. ## Requirements ### Requirement: Profile Retrieval The system SHALL allow users to view their profile. #### Scenario: View profile - GIVEN an authenticated user - WHEN they access the profile page - THEN their name, email, and avatar are displayed ### Requirement: Profile Updates The system SHALL allow users to update their profile. #### Scenario: Update name and email - GIVEN an authenticated user - WHEN they submit profile changes - THEN the system validates the input - AND updates the user record ### Requirement: Avatar Upload The system SHALL support local avatar storage. #### Scenario: Upload avatar - GIVEN an authenticated user - WHEN they upload an image file - THEN the system validates the file type and size - AND stores it locally - AND updates the user's avatar URL ## Dependencies - auth-oauth (authenticated users) - Database models: User ## Quality Gates - `pytest` must pass - `mypy .` must pass - `ruff check .` must pass - `npm run typecheck` must pass - `npm run lint` must pass