How bharatkhandelwal0/profilex works
MERN Profile App supports a user journey from landing page through registration or login to a protected profile, plus OTP-based password recovery. The React UI calls an Express API that routes requests to authentication, registration, profile, and recovery handlers; user records are modeled in MongoDB, and registration uploads profile images to Cloudinary. README documents several backend capabilities whose controller implementations were not excerpted, so those relationships are shown only where documented.
Main entry points: user.route.js User routes · App.jsx Route app · model.js User model · userRegister.js User registration
Components 22
React experience
- Route app
Frontend/src/App.jsx - Landing page
Frontend/src/components/home/Home.jsx - Registration form
Frontend/src/components/register - Login form
Frontend/src/components/login/LoginPage.jsx - OTP recovery screens
Frontend/src/components/login - Protected route
Frontend/src/components/verification/ProtectedRoute.jsx - Profile dashboard
Frontend/src/components/profile/Main.jsx
Express API
- Express app
Backend/src/app.js - User routes
Backend/src/routes/user.route.js - Server bootstrap
Backend/src/index.js
Identity and profiles
- Login and tokens
Backend/src/controllers/controller.js - User registration
Backend/src/controllers/userRegister.js - Profile handlers
Backend/src/controllers/dashboard.js - Password recovery
Backend/src/controllers/forgetPassword.js - Password update
Backend/src/controllers/updatePassword.js - Session check
Backend/src/controllers/user.check.js - JWT middleware
Backend/src/middleware/auth.Middleware.js
Persistence and media
- User model
Backend/src/model/model.js - MongoDB
- Upload handling
Backend/src/middleware/multer.Middleware.js - Cloudinary upload
Backend/src/utils/cloudinary.js
Other components
- Visitor
Connections 32
- Visitor → Route app: opens
README.md - Route app → Landing page: routes to
Frontend/src/App.jsx - Route app → Registration form: routes to
Frontend/src/App.jsx - Route app → Login form: routes to
Frontend/src/App.jsx - Route app → OTP recovery screens: routes to
Frontend/src/App.jsx - Route app → Protected route: protects
Frontend/src/App.jsx - Route app → Profile dashboard: routes to
Frontend/src/App.jsx - Login form → User routes: POST login
Frontend/src/components/login/LoginPage.jsx - Registration form → User routes: POST register
README.md - OTP recovery screens → User routes: requests OTP flow
README.md - Protected route → User routes: checks session
README.md - Profile dashboard → User routes: GET dashboard
Frontend/src/components/profile/Main.jsx - Server bootstrap → Express app: starts
Backend/src/index.js - Server bootstrap → MongoDB: connects
README.md - Express app → User routes: mounts
Backend/src/app.js - User routes → Login and tokens: dispatches login
Backend/src/routes/user.route.js - User routes → User registration: dispatches registration
Backend/src/routes/user.route.js - User routes → Profile handlers: dispatches dashboard
Backend/src/routes/user.route.js - User routes → Password recovery: dispatches OTP
Backend/src/routes/user.route.js - User routes → Password update: dispatches update
Backend/src/routes/user.route.js - User routes → Session check: dispatches check
Backend/src/routes/user.route.js - User routes → JWT middleware: guards routes
Backend/src/routes/user.route.js - JWT middleware → Session check: verifies access
Backend/src/routes/user.route.js - Login and tokens → User model: reads and saves
Backend/src/controllers/controller.js - User registration → User model: creates user
Backend/src/controllers/userRegister.js - Profile handlers → User model: reads profile
Backend/src/controllers/dashboard.js - Password recovery → User model: stores OTP
README.md - Password update → User model: updates password
README.md - User model → MongoDB: persists records
README.md - User routes → Upload handling: uses image upload
Backend/src/routes/user.route.js - User registration → Cloudinary upload: uploads image
Backend/src/controllers/userRegister.js - Upload handling → Cloudinary upload: stages file for