How abhay-0103/job-portal-project works
Project Type & Purpose
• This is a full-stack MERN (MongoDB, Express, React, Node.js) job portal.
• Frontend: React + Vite + Tailwind CSS, deployed on Vercel.
• Backend: Express.js REST API, MongoDB via Mongoose, deployed on Render/Railway.
• Third-party services: Clerk (authentication), Sentry (error tracking), Cloudinary/Multer (file uploads).
Key File-Structure Insights
• client/ – React app
• src/components, pages, context (React Context for state)
• Clerk integrated at UI layer (RecruiterLogin.jsx, AppContext.jsx)
• Tailwind, Axios, React Router for styling, HTTP, routing
• server/ – Express API
• config/ (db.js, cloudinary.js, multer.js, instrument.js for Sentry)
• middleware/authMiddleware.js (protect routes via Clerk token)
• routes/ → controllers/ → models/ (MVC pattern)
• utils/generateToken.js (JWT helpers)
• Deployment config: vercel.json in both tiers, env variables for MongoDB URI, Clerk keys, etc.
Main Components & Interactions
• Client Browser
← React UI components & pages
→ React Context for global state & real-time updates
→ Axios HTTP calls to Backend API
→ Clerk frontend SDK handles user sign-in/up flows
→ Sentry frontend SDK captures UI errors
• API Gateway (Express server)
← Receives HTTP requests (job listings, applications, user actions)
→ authMiddleware validates Clerk JWTs
→ Routes dispatch to Controllers
→ Controllers invoke Mongoose Models
→ MongoDB for CRUD
→ Cloudinary/Multer for resume uploads
→ Sentry backend instrumentation logs exceptions
• Database & External Services
• MongoDB Atlas: stores User, Company, Job, JobApplication collections
• Clerk: auth provider (frontend + backend tokens)
• Sentry: error monitoring (frontend & backend)
• Cloudinary: file storage for resumes via multer middleware
Architectural Patterns & Principles
• MVC on the backend (Routes → Controllers → Models)
• Component-based and context state management on the frontend
• RESTful API design
• Separation of concerns: UI, business logic, data layer
• Secure stateless auth using Clerk tokens & JWTs