How iamrohitkandpal/workhub-app works
Project type and purpose
• This is a full-stack job board application (“WorkHub-App”) with:
• A React/Vite/TailwindCSS frontend (job browsing, applications, profile, admin panels)
• An Express/MongoDB backend exposing RESTful APIs (users, companies, jobs, applications)
• File upload/image storage via Multer + Cloudinary
• Authentication via JWT middleware
File structure
• Frontend (frontend/)
• src/components: pages & UI widgets (admin, auth, shared, ui)
• src/hooks + src/redux: data‐fetching & state management (React Query style hooks + Redux slices)
• Vite/Tailwind config & index.html entry point
• Backend (backend/)
• app.js: Express app & route mounting
• routes/*: route definitions
• controllers/*: MVC controllers
• models/*: Mongoose schemas (User, Company, Job, Application)
• middlewares/*: JWT auth, file‐upload handling
• utils: DB connection, Cloudinary integration, Data URI helper
Key insights from README
• Minimal description but file tree reveals standard frontend/backend split
Detailed capturing of essential elements
• Frontend:
• Entry: index.html → main.jsx
• Components (e.g., Jobs, JobDescription)
• Redux slices: authSlice, jobSlice, etc.
• Backend:
• app.js mounting /api/users, /api/jobs, /api/companies, /api/applications
• isAuthenticated middleware in front of protected routes
• multer and cloudinary in company & job controller file upload endpoints
• Data flow examples:
• User signup → POST /api/users → user.controller.create → user.model.save → returns JWT
• Company logo upload → multer → cloudinary.upload → returns URL → company.model.save