Skip to content

Conversation

@shreyannandanwar
Copy link

πŸ”§ Feature: Edit Profile (front & back)

Closes #6


βœ… What was delivered

Requirement Status
"Edit Profile" button on /dashboard βœ…
Modal form EditProfileForm.jsx βœ…
Prefills current user data βœ…
Calls PUT /api/auth/profile βœ…
Updates global AuthContext instantly βœ…
Success / error alerts βœ…
Protected route (only authenticated) βœ…

πŸ—‚ Files changed

Path Purpose
src/context/AuthContext.jsx New context + refreshUser()
src/services/api.js Re-usable updateProfile() caller
src/components/Common/ProtectedRoute.jsx Route guard
src/components/Auth/EditProfileForm.jsx Full modal form (context + service)
src/pages/Dashboard.jsx Added "Edit Profile" trigger button
src/main.jsx Wrapped app with AuthProvider
src/App.jsx Dashboard now inside ProtectedRoute
backend/src/controllers/authController.js updateProfile controller
backend/src/routes/authRoutes.js New PUT /api/auth/profile (protected)

πŸ§ͺ How to test locally

  1. git checkout feature/edit-profile
  2. Backend:
    cd backend
    npm i
    npm run dev

@CPSquad1
Copy link
Owner

@shreyannandanwar Can you just provide the ss of the thing you just built, also one more thing - just check the dist folder, I think it should be in .gitignore .

@shreyannandanwar
Copy link
Author

I can show once the sign up and login page is built
if u approve it i would also like to do that

@shreyannandanwar
Copy link
Author

#12 #13

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.

Edit User Profile (Update User Details)

2 participants