Skip to content

Issue 102 | Full user profile management (no pfp)#238

Open
Flapjacck wants to merge 1 commit intomainfrom
issue-97-2
Open

Issue 102 | Full user profile management (no pfp)#238
Flapjacck wants to merge 1 commit intomainfrom
issue-97-2

Conversation

@Flapjacck
Copy link
Member

@Flapjacck Flapjacck commented Mar 7, 2026

This pull request introduces several improvements to user profile, preferences, and password management, with a focus on input validation, controller simplification, and API consistency. The backend now uses Zod schemas for request validation, reducing manual checks and improving maintainability. New endpoints for changing passwords and fetching/updating user profiles and preferences have been added, and the frontend is updated to use these endpoints. Below are the most important changes grouped by theme:

Backend: User Controllers and Validation

  • Introduced Zod-based validation schemas in userValidators.ts for profile updates, preferences, and password changes, replacing manual validation logic in controllers.
  • Refactored updateProfile and updatePreferences controllers to use their respective schemas, simplifying the update logic and ensuring consistent input handling. [1] [2] [3]
  • Added new controllers: changePassword (for authenticated users to change their password) and getProfile (to fetch the current user's profile). [1] [2]

Backend: Routing and API Structure

  • Updated userRoutes.ts to add new endpoints for profile, preferences, and password actions, and reorganized route order for clarity and usability. [1] [2] [3]
  • Exported new controllers in the user/index.ts barrel file.

Frontend: API Integration

  • Updated frontend authApi.ts to use /users/profile for fetching the current user, and added helpers for updating profile, changing password, and managing preferences. [1] [2] [3]
  • Added comments in AuthProvider.tsx to clarify endpoint usage for fetching user data.

Miscellaneous

  • Adjusted logo size in DashboardHeader.tsx for better UI consistency. [1] [2]
  • Updated tsconfig.json to exclude test files from compilation.
  • Added a comment in user.ts regarding future profile image upload support.

Closes #102

@Flapjacck Flapjacck changed the title Issue 97 | Full user profile management (no pfp) Issue 102 | Full user profile management (no pfp) Mar 7, 2026
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.

👤 Implement user profile management

1 participant