How ftnimran/linknest works
LinkNest lets people authenticate, create and share a public profile with ordered links and uploaded media, while account holders manage that profile from a protected dashboard. The main stages are OTP-backed registration or password recovery, authenticated profile editing, and public profile viewing/sharing; backend controllers persist profile and authentication state. README-described dashboard, PDF viewing, crop, and sharing capabilities are included where their source paths exist. Excerpts do not show all frontend request wiring, so uncertain calls are omitted.
Main entry points: authController.js Authentication · App.jsx Route application · ProfilePage.jsx Public profile · server.js Express server
Components 26
Web experience
- Route application
frontend/src/App.jsx - Login and OTP
frontend/src/pages/LoginPage.jsx - Auth state
frontend/src/context/AuthContext.jsx - Profile editor
frontend/src/pages/AdminDashboard.jsx - Sortable links
frontend/src/components/Admin/DraggableLinkList.jsx - Public profile
frontend/src/pages/ProfilePage.jsx - Profile header
frontend/src/components/ProfileHeader.jsx - Profile links
frontend/src/components/LinkButton.jsx - Resume viewer
frontend/src/components/ResumeViewerModal.jsx - Image crop
frontend/src/components/Admin/ImageCropModal.jsx
API and domain
- Express server
backend/src/server.js - Auth routes
backend/src/routes/authRoutes.js - Profile routes
backend/src/routes/userRoutes.js - Authentication
backend/src/controllers/authController.js - Profile management
backend/src/controllers/userController.js - Token protection
backend/src/middlewares/authMiddleware.js - File upload
backend/src/middlewares/uploadMiddleware.js
Persistence and messaging
- User records
backend/src/models/User.js - OTP records
backend/src/models/Otp.js - Database connection
backend/src/config/db.js - Email delivery
backend/src/config/mailer.js - OTP generation
backend/src/utils/generateOTP.js
Other components
- Profile visitor
- Account holder
- MongoDB
- Email service
Connections 26
- Profile visitor → Route application: opens profile
- Account holder → Route application: uses app
- Route application → Login and OTP: routes login
- Route application → Profile editor: routes admin
- Route application → Public profile: routes username
- Login and OTP → Auth state: establishes session
- Auth state → Express server: fetches own profile
- Express server → Auth routes: mounts auth API
- Express server → Profile routes: mounts profile API
- Auth routes → Authentication: dispatches auth
- Profile routes → Profile management: dispatches profile
- Profile routes → Token protection: protects edits
- Profile routes → File upload: handles media
- Authentication → User records: reads and writes users
- Authentication → OTP records: stores and verifies codes
- Authentication → OTP generation: generates codes
- Authentication → Email delivery: sends OTP mail
- Email delivery → Email service: delivers email
- Profile management → User records: reads and updates profiles
- Express server → Database connection: connects database
- Database connection → MongoDB: opens connection
- Profile editor → Sortable links: manages links
- Profile editor → Image crop: edits avatar
- Public profile → Profile header: presents profile
- Public profile → Profile links: renders links
- Public profile → Resume viewer: previews resume