feat(profile): add user profile page and api integration#199
Open
Nekolandd wants to merge 1 commit into
Open
Conversation
67a6eb2 to
b91d5b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the user profile page at
apps/web/app/profile/so users can view account information, update their email, and see account metadata (member since, watchlist count, open alerts, notification preferences summary).Includes a backend
ProfileModulewithGETandPATCHendpoints at/api/profileto satisfy the issue acceptance criterion "API integration complete". There is no dedicated Profile API issue in the repo, and the frontend cannot persist updates without these endpoints.Temporary authentication uses the
X-User-Idheader until login/JWT land (#78, #80).Type of Change
Related Issues
Fixes #106
Related to #78, #80
Changes Made
Backend — new
ProfileModule(apps/backend/src/modules/profile/):GET /api/profile— returns user profile + metadataPATCH /api/profile— updates user emailX-User-Idheaderapps/backend/src/app.module.tsprofile.service.spec.ts(8 tests)Frontend — user profile page (
apps/web/app/profile/):page.tsx— profile display, email update form, account metadataprofile.css— dark theme consistent withanalytics/page.spec.tsx— component tests (4 tests)API client —
apps/web/lib/api/profile.ts+apps/web/lib/types/profile.ts:getProfile()andupdateProfile()wired to backend endpointsConfig —
apps/web/tsconfig.jsonincludeslib/**/*for the new API clientTesting
npm run test) — 229/229 (188 backend + 41 dashboard/web)eslint+prettier --check)npm run format/ prettier on profile files)npm run build)How to verify:
npm run prisma:generate npm run test npm run buildChecklist
Additional Context
-Scope note: Issue #106 specifies apps/web/app/profile/ only. Backend API was added because the acceptance criteria require persisted updates and complete API integration, and no separate Profile API issue exists.
-No Prisma schema changes — uses existing User model (id, email, createdAt).
-Account Connection section: temporary UX for X-User-Id auth until #80 (login) is implemented; not a production auth flow.
-UI / browser preview: apps/web does not include a runnable Next.js dev server in this repo (same pattern as analytics/ and threat-hunting/). The profile page is implemented as a tested React component with dark-theme styling consistent with other apps/web pages. UI behavior is validated via unit tests in page.spec.tsx rather than browser screenshots.
Acceptance criteria met:
Profile displayed
Updates persisted
API integration complete