Skip to content

feat: add layered module structure and implement GET /profiles/me#93

Merged
mehmetcangurbuz08 merged 2 commits into
developmentfrom
backend/getProfile-implementation
Mar 21, 2026
Merged

feat: add layered module structure and implement GET /profiles/me#93
mehmetcangurbuz08 merged 2 commits into
developmentfrom
backend/getProfile-implementation

Conversation

@mehmetcangurbuz08

@mehmetcangurbuz08 mehmetcangurbuz08 commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Implemented the initial profiles backend foundation with a layered module structure (routes, controller, service, repository, validators) and added working GET /api/profiles/me endpoint.
This establishes the base for upcoming PATCH profile endpoints while keeping response/error handling aligned with shared API conventions.

Closes #94

@AlperKartkaya AlperKartkaya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great structure and solid database logic, but please fix these two security issues before we merge:

  1. x-user-id Spoofing: In validators.js, the temporary headers['x-user-id'] fallback allows anyone to bypass auth. Please wrap it in if (process.env.NODE_ENV === 'development').
  2. Soft-Deleted Users: In repository.js, findProfileBundleByUserId forgets to check if a user is deleted. Please JOIN users u and add u.is_deleted = FALSE so deleted accounts can't fetch their profiles.

Looks good otherwise!

@AlperKartkaya AlperKartkaya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No dragons spotted. Good to go.

@mehmetcangurbuz08
mehmetcangurbuz08 merged commit 5d5c53e into development Mar 21, 2026
@mehmetcangurbuz08
mehmetcangurbuz08 deleted the backend/getProfile-implementation branch March 29, 2026 15:50
@mehmetcangurbuz08 mehmetcangurbuz08 self-assigned this Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend][MVP] Implement get profile endpoint and decide layered module structure

2 participants