Skip to content

feat(profile): add user profile page and api integration#199

Open
Nekolandd wants to merge 1 commit into
MD-Creative-Production:mainfrom
Nekolandd:feat/106-user-profile-page
Open

feat(profile): add user profile page and api integration#199
Nekolandd wants to merge 1 commit into
MD-Creative-Production:mainfrom
Nekolandd:feat/106-user-profile-page

Conversation

@Nekolandd

@Nekolandd Nekolandd commented Jun 28, 2026

Copy link
Copy Markdown

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 ProfileModule with GET and PATCH endpoints at /api/profile to 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-Id header until login/JWT land (#78, #80).

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Related Issues

Fixes #106

Related to #78, #80

Changes Made

  • Backend — new ProfileModule (apps/backend/src/modules/profile/):

    • GET /api/profile — returns user profile + metadata
    • PATCH /api/profile — updates user email
    • Auth via temporary X-User-Id header
    • Registered in apps/backend/src/app.module.ts
    • Unit tests in profile.service.spec.ts (8 tests)
  • Frontend — user profile page (apps/web/app/profile/):

    • page.tsx — profile display, email update form, account metadata
    • profile.css — dark theme consistent with analytics/
    • page.spec.tsx — component tests (4 tests)
  • API clientapps/web/lib/api/profile.ts + apps/web/lib/types/profile.ts:

    • getProfile() and updateProfile() wired to backend endpoints
  • Configapps/web/tsconfig.json includes lib/**/* for the new API client

Testing

  • I have tested these changes locally
  • Tests pass locally (npm run test) — 229/229 (188 backend + 41 dashboard/web)
  • Linting passes on profile files (eslint + prettier --check)
  • Code is formatted (npm run format / prettier on profile files)
  • TypeScript builds successfully (npm run build)

How to verify:

npm run prisma:generate
npm run test
npm run build

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests passed with my changes

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

@Nekolandd Nekolandd force-pushed the feat/106-user-profile-page branch from 67a6eb2 to b91d5b0 Compare June 28, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create User Profile Page

1 participant