How mernamohamed09/hirehub works
Purpose and Entry Points
This is a full-stack recruitment platform: candidates manage CVs and applications; companies post jobs, operate an ATS, assess applicants, and schedule interviews; administrators manage users and companies. It consists of a React/Vite SPA, a Node/Express backend, and a Python AI scoring service.
Primary runtime entry points are Frontend/src/main.jsx, Backend/app.js, and ai-service/app.py.
Frontend Application
The React client provides public job discovery plus role-oriented candidate, company, and admin workspaces. Routing/application composition begins in Frontend/src/App.jsx; shared dashboard and public layouts are in Frontend/src/layouts/DashboardLayout.jsx and Frontend/src/layouts/MainLayout.jsx.
Frontend API calls are centralized through Frontend/src/api/axiosConfig.js and domain service modules such as Frontend/src/services/applicationService.js. Authentication state is held in Frontend/src/store/slices/authSlice.js, while live socket access is exposed through Frontend/src/context/SocketContext.jsx.
HTTP API and Domain Boundary
The Express backend is the system-of-record API and mounts domain route modules from Backend/app.js. Routes separate HTTP contracts from controller orchestration; representative boundaries include Backend/Routes/applicationRoute.js, Backend/Routes/jobRoute.js, and Backend/Routes/interviewRoute.js.
Controllers implement workflows for identity, job lifecycle, applications, assessments, chat, notifications, and administration, e.g. Backend/controller/applicationController.js, Backend/controller/assessmentController.js, and Backend/controller/chatController.js. Request validation is a dedicated boundary under Backend/controller/validation/.
Identity, Roles, and Profiles
Authentication and authorization are mediated by Backend/controller/authController.js and Backend/middleware/authMiddleware.js. The user model anchors accounts and role access in Backend/models/User.js; candidate and company-specific profiles are represented separately by Backend/models/candidate.js and Backend/models/company.js.
The frontend protects restricted views through Frontend/src/components/protectedRoute.jsx, with distinct dashboard surfaces under Frontend/src/pages/candidate, Frontend/src/pages/company, and Frontend/src/pages/admin.
Recruitment Workflow and Persistence
Core persisted workflow entities are jobs, applications, interviews, and assessments: Backend/models/jobs.js, Backend/models/application.js, Backend/models/interview.js, and Backend/models/assessment.js. Company ATS views (Frontend/src/pages/company/ATSBoard.jsx) consume this workflow to move applicants through hiring stages.
Application processing is augmented asynchronously by Backend/services/applicationAiWorker.js; assessment state is monitored by Backend/services/assessmentPoller.js. The requeue script at Backend/scripts/requeueVersionMismatch.js indicates durable or recoverable AI-processing work.
AI Resume Matching Service
The Python service exposes AI capabilities from ai-service/app.py, with request/response contracts in ai-service/schemas.py. Its scoring pipeline combines extracted skills, experience interpretation, requirement matching, and similarity scoring via ai-service/services/skills.py, ai-service/services/experience.py, and ai-service/services/scoring.py.
The Node backend integrates this service through Backend/services/aiService.js and also contains resume/file parsing adapters in Backend/services/resumeParser.js and Backend/services/fileParser.js. Skill normalization depends on versioned taxonomy data under ai-service/data/taxonomy.
Realtime, Files, and External Boundaries
Realtime chat and notifications use the backend socket layer at Backend/socket.js, backed by conversation, message, and notification models: Backend/models/conversation.js, Backend/models/message.js, and Backend/models/notification.js.
Uploaded CVs and avatars cross multer middleware boundaries in Backend/middleware/uploadMulter.js and Backend/middleware/uploadAvatar.js, with local storage roots at Backend/uploads/cvs and Backend/uploads/avatars. The system therefore requires Node.js, Python, a database implied by the model layer, local/upload storage, and network connectivity between the backend and AI service.
Main entry points: applicationController.js Workflow controllers · App.jsx App routing & layouts · candidate Role workspaces · applicationRoute.js Domain routes
Components 19
React SPA
- SPA entry
Frontend/src/main.jsx - App routing & layouts · Composes public and dashboard application surfaces.
Frontend/src/App.jsx - Role workspaces
Frontend/src/pages/candidate - Protected routes
Frontend/src/components/protectedRoute.jsx - API client
Frontend/src/api/axiosConfig.js - Auth state
Frontend/src/store/slices/authSlice.js - Socket context
Frontend/src/context/SocketContext.jsx
Node API
- Express API · System-of-record HTTP API and route mount point.
Backend/app.js - Domain routes · Application, job, and interview route boundaries.
Backend/Routes/applicationRoute.js - Workflow controllers · Runs application, assessment, chat, identity, and administration workflows.
Backend/controller/applicationController.js - Authentication & roles
Backend/middleware/authMiddleware.js - AI & assessment workers · Processes application scoring and monitors assessments.
Backend/services/applicationAiWorker.js - AI integration & parsing · Calls AI scoring and parses uploaded resumes.
Backend/services/aiService.js - Socket layer · Delivers chat and notification events.
Backend/socket.js - Upload boundary · Accepts CV and avatar uploads.
Backend/middleware/uploadMulter.js
AI Scoring Service
- AI API · Exposes resume matching request/response contracts.
ai-service/app.py - Scoring pipeline · Combines taxonomy-normalized skills, experience, requirements, and similarity.
ai-service/services/scoring.py
Persistence & Storage
- Recruitment data · Stores users, profiles, jobs, applications, interviews, assessments, and messaging.
Backend/models/User.js - CV & avatar storage
Backend/uploads/cvs
Connections 20
- SPA entry → App routing & layouts: starts
- App routing & layouts → Role workspaces: renders
- App routing & layouts → Protected routes: guards views with
- Protected routes → Auth state: reads session
- Role workspaces → API client: uses
- Role workspaces → Socket context: subscribes through
- API client → Express API: HTTP requests
- Socket context → Socket layer: realtime connection
- Express API → Domain routes: mounts
- Domain routes → Authentication & roles: applies
- Domain routes → Workflow controllers: dispatches
- Workflow controllers → Recruitment data: reads and writes
- Workflow controllers → AI & assessment workers: queues processing
- AI & assessment workers → AI integration & parsing: requests scoring
- AI integration & parsing → AI API: network call
- AI API → Scoring pipeline: runs
- AI & assessment workers → Recruitment data: persists results
- Socket layer → Recruitment data: uses conversations and notifications
- Upload boundary → CV & avatar storage: stores files
- Workflow controllers → Upload boundary: handles uploads through