How kayaladurgaeswar/upadhi works
Purpose and Entry Points
Upadhi is a MERN job portal connecting job seekers with employers. The React SPA starts at frontend/src/main.jsx and composes routing/UI in frontend/src/App.jsx. The Express API starts through backend/server.js, with application initialization in backend/app.js.
Frontend Application Shell
The Vite-served React client owns navigation, page composition, and API-driven user workflows. Shared chrome is centralized in frontend/src/components/Layout/Navbar.jsx and frontend/src/components/Layout/Footer.jsx; unmatched routes use frontend/src/components/NotFound/NotFound.jsx.
Authentication and Session Boundary
Registration and login originate from frontend/src/components/Auth/Register.jsx and frontend/src/components/Auth/Login.jsx. Backend user endpoints are exposed by backend/routes/userRoutes.js, implemented in backend/controllers/userController.js, and protected request identity is established by backend/middlewares/auth.js. JWT issuance is handled by backend/utils/jwtToken.js.
Job Lifecycle
Employers create and manage postings through frontend/src/components/Job/PostJob.jsx and frontend/src/components/Job/MyJobs.jsx; seekers browse and inspect postings via frontend/src/components/Job/Jobs.jsx and frontend/src/components/Job/JobDetails.jsx. Requests cross the API boundary at backend/routes/jobRoutes.js, execute business operations in backend/controllers/jobController.js, and persist job records through backend/models/jobSchema.js.
Application and Resume Workflow
Candidate submission and tracking are represented by frontend/src/components/Application/Application.jsx and frontend/src/components/Application/MyApplications.jsx. Resume interaction is isolated in frontend/src/components/Application/ResumeModal.jsx. Server-side application operations flow from backend/routes/applicationRoutes.js to backend/controllers/applicationController.js, with durable records in backend/models/applicationSchema.js.
Persistence, Files, and Infrastructure
MongoDB is the system of record, connected through backend/database/dbConnection.js; user data is modeled in backend/models/userSchema.js. The backend is a Node/Express runtime configured through backend/config/config.js and environment values such as DB_URL, JWT settings, CORS frontend URL, and port. Multer-backed file handling and filesystem preparation are implied by backend/utils/initFolders.js, forming the boundary for resume uploads.
Error and Request Control
Async controller failures are normalized by backend/middlewares/catchAsyncError.js and final error handling by backend/middlewares/error.js. backend/app.js is the integration point where route groups, middleware, CORS/security behavior, and global error flow are expected to be assembled before the server listens.
Main entry points: App.jsx Application shell · app.js Express application · jobController.js Controllers · userRoutes.js User API
Components 19
React SPA
- React entry
frontend/src/main.jsx - Application shell
frontend/src/App.jsx - Shared layout · Navbar and footer frame application pages.
frontend/src/components/Layout/Navbar.jsx - Auth screens
frontend/src/components/Auth/Login.jsx - Job workflows · Posting, management, browsing, and details views.
frontend/src/components/Job/Jobs.jsx - Application workflows · Submission, tracking, and resume interaction.
frontend/src/components/Application/Application.jsx - Not found page
frontend/src/components/NotFound/NotFound.jsx
Express API
- Server entry
backend/server.js - Express application · Assembles CORS, security, routes, and global errors.
backend/app.js - User API
backend/routes/userRoutes.js - Job API
backend/routes/jobRoutes.js - Application API
backend/routes/applicationRoutes.js - Controllers · User, job, and application request handling.
backend/controllers/jobController.js - Auth middleware
backend/middlewares/auth.js - JWT issuer
backend/utils/jwtToken.js - Error flow · Normalizes controller failures and final responses.
backend/middlewares/error.js
Persistence & files
- Domain models · User, job, and application records.
backend/models/jobSchema.js - MongoDB
backend/database/dbConnection.js - Resume uploads
backend/utils/initFolders.js
Connections 25
- React entry → Application shell: mounts
- Application shell → Shared layout: composes
- Application shell → Auth screens: routes to
- Application shell → Job workflows: routes to
- Application shell → Application workflows: routes to
- Application shell → Not found page: fallback
- Auth screens → User API: API requests
- Job workflows → Job API: API requests
- Application workflows → Application API: API requests
- Server entry → Express application: starts
- Express application → User API: mounts
- Express application → Job API: mounts
- Express application → Application API: mounts
- Express application → Error flow: global failures
- User API → Auth middleware: protects requests
- Job API → Auth middleware: protects requests
- Application API → Auth middleware: protects requests
- User API → Controllers: dispatches
- Job API → Controllers: dispatches
- Application API → Controllers: dispatches
- Controllers → JWT issuer: issues tokens
- Controllers → Domain models: reads/writes
- Controllers → Resume uploads: handles resumes
- Domain models → MongoDB: persists to
- Express application → MongoDB: connects