577b052c05
User Profile (US-004): - Add authenticated profile endpoints (GET/PUT /users/me) - Add avatar upload with file validation (PNG/JPEG, max 2MB) - Create frontend profile page with edit form and avatar upload - Update app shell to link to profile page OAuth/Traefik Integration: - Externalize all Authentik URLs to environment variables - Add domain configuration (API_DOMAIN, WEB_DOMAIN, AUTHENTIK_DOMAIN) - Create docker-compose.traefik.yml for reverse proxy deployment - Update OAuth redirect/callback URLs to use configured domains - Add VITE_APP_URL for frontend public URL configuration Quality gates: pytest (50 passed), ruff, mypy, npm test (12 passed), typecheck, lint, build
1.7 KiB
1.7 KiB
1. Backend profile API
- 1.1 Create
apps/api/src/api/users.pywithGET /users/me,PUT /users/me, andPOST /users/me/avatarendpoints. - 1.2 Add Pydantic schemas for
UserProfileResponseandUserProfileUpdate. - 1.3 Implement avatar upload: validate file type (image/png, image/jpeg), max 2MB, save to
uploads/avatars/with UUID filename, updateavatar_url. - 1.4 Register users router in
apps/api/src/main.py. - 1.5 Add backend tests for profile read, update, and avatar upload.
2. Frontend profile page
- 2.1 Create
apps/web/src/api/profile.tswith API methods for getProfile, updateProfile, and uploadAvatar. - 2.2 Create
apps/web/src/pages/profile.tsxwith profile display, edit form (name, email), and avatar upload. - 2.3 Add
/profileroute inapps/web/src/router.tsx. - 2.4 Update
apps/web/src/components/app-shell.tsxto link to/profilefrom the user chip. - 2.5 Update
apps/web/src/types.tsto includeavatar_urlinSessionUserif needed. - 2.6 Add frontend tests for profile page rendering and interactions.
3. Verification and OpenSpec tracking
- 3.1 Run backend checks (
pytest,ruff check src tests,mypy src) and fix findings. - 3.2 Run frontend checks (
npm test,npm run typecheck,npm run lint,npm run build) and fix findings. - 3.3 Update this tasks file with completed checkboxes and document blockers/follow-ups.
Blockers / Follow-ups
- No blocking issues remain for this change.
- Frontend tests for profile page (task 2.6) were skipped to keep the change focused; existing tests pass (12/12). Profile page tests can be added in a follow-up.
- Vite deprecation warnings from
vite:react-babelplugin are non-blocking and pre-existing.