How amritanshraizada/jobverse works
Project Type & Purpose
– This is a full-stack MERN (MongoDB, Express, React, Node) job portal named JobVerse.
– Frontend: React + Vite + Tailwind CSS + Redux Toolkit for state.
– Backend: Node.js + Express, follows an MVC-style structure (controllers, models, routes), using Mongoose to talk to MongoDB.
– Provides user- and admin-facing features (browse/apply jobs, company/job management), JWT auth, file uploads via Multer & Cloudinary.
File Structure Analysis
• Top level separates “frontend” and “backend” directories.
• Backend:
– controllers/ (application.controller.js, company.controller.js, job.controller.js, user.controller.js)
– models/ (application.model.js, company.model.js, job.model.js, user.model.js)
– routes/ (one route file per resource)
– middlewares/ (isAuthenticated.js for JWT guard, multer.js for file uploads)
– utils/ (db.js for Mongo connection, cloudinary.js, datauri.js)
• Frontend:
– src/components/ (UI broken into auth, admin, shared, ui-kit, feature components)
– src/hooks/ for data–fetching hooks
– src/redux/ for state slices and store
– lib/utils.js, utils/constant.js for shared logic
Key README Insights
– Tech stack chart confirms React+Vite, Node+Express, MongoDB, JWT, Cloudinary, Redux.
– Live demo on Vercel (frontend) and Render/local (backend).
– Auth is role-based (Admin vs User).
– Features broken down by user type (job seeker vs recruiter).
Main Components
a. Frontend Layer
– Browser client running React/Vite
– Redux store + React Router + custom hooks
b. API Layer (Backend)
– Express server with route modules
– Middleware chain (CORS, JSON parser, isAuthenticated, Multer)
– Controller functions implementing business logic
c. Persistence Layer
– MongoDB Atlas or local MongoDB
– Mongoose models (User, Company, Job, Application)
d. External Services
– Cloudinary (image uploads)
– JWT issuer/validator (part of auth middleware)
– Hosting platforms: Vercel (frontend), Render (backend)
Relationships & Data Flows
– UI actions (e.g. “Apply to job”) → Redux action → custom hook → HTTP request → Express route → controller → model → DB → response → Redux store update → UI re-render.
– Authentication: Login/Signup request → JWT issued → stored in client (localStorage) → attached to subsequent API calls in Authorization header → protected routes check via isAuthenticated middleware.
– File uploads: client sends multipart data → Multer middleware → buffer passed to datauri util → sent to Cloudinary → Cloudinary returns URL → saved in MongoDB document.
Architectural Patterns & Principles
– Backend: MVC-style separation (models, controllers, routes).
– Frontend: Component-based UI + container/presentational pattern, hooks for data layer, Redux Toolkit for global state.
– Single-Page App served by Vite dev server (or static build on Vercel).
– RESTful API with clear resource separation (users, companies, jobs, applications).
– Layered security: JWT auth + role-based access in routes/controllers.