AI-powered Human Resource Management System for enterprises supporting 5,000+ employees.
SmartHR Nexus is a state-of-the-art, full-stack HRMS with dedicated, role-based dashboards, real-time attendance tracking, payroll automation, candidate recruitment pipelines, and an advanced AI HR assistant (ARIA) powered by Google Gemini.
The platform is architected with React 18, Node.js, Express, MongoDB (Mongoose), Redis (for session management and caching), Socket.io (for real-time events), and Tailwind CSS for styling.
Repository: github.com/adityakr1108/SmartHR-Nexus-AI-Workforce-Platform
SmartHR Nexus implements a robust role-based access control (RBAC) system with 5 distinct roles. Each role is served a tailored dashboard and set of features:
- System-wide Settings: Access to global settings, theme preferences, active integrations, and system logs.
- Access Control: Promotes, demotes, or deactivates user accounts.
- Infrastructure Management: Monitors database and Redis connection health statistics.
- Full CRUD Scope: Holds override rights for all employee records, department structures, and financial logs.
- Employee Directory: Perform CRUD operations on employee profiles (Add, Edit, View, and Soft Delete). Handles avatar uploads, education/experience logging, and skills tags.
- Payroll Processing: Calculates CTC, basic salaries, HRA, allowances, professional taxes, and PF deductions. Automates payslip generation (PDF format) and processes payouts.
- Department Management: Creates and manages organizational departments (Engineering, HR, Sales, Product, Marketing, Finance, Design, Operations), configures budgets, and assigns Department Heads.
- Analytics & Reports: Generates system-wide summaries, exportable attendance reports, and payroll histories.
- Team Dashboard: Displays real-time attendance, daily check-in statuses, and overall performance ratings of direct reports.
- Leave Approvals: Real-time workflow (Approve/Decline) for team leave requests. Approving dynamically deducts from the employee's respective leave balance.
- Performance Evaluations: Submits quarterly/annual performance reviews, scores key metrics (technical, communication, teamwork, leadership, productivity), and triggers AI Performance Insights for recommendations.
- Job Listings: Creates and manages public/internal job listings, outlining requirements, salary ranges, experience, and remote/hybrid work modes.
- Visual Candidate Pipeline: Interactive drag-and-drop pipeline board tracking applicants across 8 hiring stages (Applied, Screening, Shortlisted, HR Interview, Technical Interview, Offer Sent, Hired, Rejected).
- AI Resume Screening: Uploads PDF/Docx resumes and processes them through the Gemini AI Engine. Returns a compatibility score (0-100), key strengths, weaknesses, and a structured hiring recommendation.
- Personal Dashboard: View daily check-in times, upcoming leaves, pending performance reviews, and notifications.
- Real-time Attendance: One-click check-in and check-out tracking (Status: Present, Late, Absent, On Leave).
- Leave Center: Submits leave requests with date selectors and reason descriptions. Displays real-time balances for Annual, Sick, Casual, Maternity, Paternity, and Unpaid leaves.
- My Payslips: Securely view and download PDF payslips for previous pay cycles.
- My Performance: Completes self-assessments, views manager feedback, and tracks progress on personal goals.
- ARIA HR Chatbot: A floating voice-and-text chatbot accessible from any dashboard. It provides answers to company policy questions, helps calculate leave balances, and interfaces with the database to retrieve user-specific information.
- AI Resume Scorer: Uses Gemini Flash/Pro to parse resumes, compare text against job descriptions, and output standard JSON evaluations (score, summary, strengths, weaknesses).
- Performance Insights: Generates actionable growth summaries and coaching points based on manager review scores.
- Payroll Optimizer: Recommends tax-efficient structures for allowances and deductions to optimize the employee's in-hand salary.
- Dual-Token System: Authenticates with a short-lived JSON Web Token (Access Token) passed via HTTP headers and a long-lived Refresh Token stored in a secure,
httpOnlycookie. - Redis Token Blacklisting: On sign-out, the user's access token is cached in Redis with a TTL matching the token expiry. Any subsequent request with a blacklisted token is rejected.
- Account Lockout: Locks accounts for 2 hours after 5 consecutive failed login attempts to prevent brute-force attacks.
- Soft Delete: The database uses schema pre-middlewares to automatically exclude records containing a
deletedAttimestamp from standard query results.
- Socket.IO Rooms: Users are joined to rooms matching their role (
role:admin,role:senior_manager, etc.) and individual ID (user:<id>). - Live Notifications: Dispatches real-time pop-ups for attendance check-ins, leave submissions, and approval status changes.
SmartHR/
βββ frontend/ # React 18 + Vite + Tailwind CSS
β βββ src/
β β βββ components/ # Layouts, Sidebar, Header, AIAssistant
β β βββ pages/ # Auth, Admin, Manager, Recruiter, Employee pages
β β βββ store/ # Redux Toolkit slices (auth, ui, notifications)
β β βββ services/ # Axios API Client + Gemini AI
β βββ vite.config.js
βββ backend/ # Node.js + Express REST API
β βββ src/
β β βββ config/ # MongoDB Atlas, Upstash Redis
β β βββ controllers/ # Route controllers (auth, employee, leave, etc.)
β β βββ models/ # Mongoose schemas (User, Employee, Attendance, Leave)
β β βββ routes/ # Express routes
β β βββ middleware/ # JWT auth, rate limiter, security, error handling
β β βββ services/ # Gemini AI & Nodemailer SMTP services
β β βββ utils/ # Winston logger, DB seeder, socket handlers
β βββ uploads/ # Local storage for avatars, resumes, documents
βββ docker-compose.yml
βββ package.json # npm workspaces config
- Node.js 18+
- MongoDB 6+ (or Atlas connection string)
- Redis 7+ (or Upstash Redis)
- Google Gemini API key (Get one here)
git clone https://github.com/adityakr1108/SmartHR-Nexus-AI-Workforce-Platform.git
cd SmartHR-Nexus-AI-Workforce-Platform
# Install root, frontend, and backend packages
npm run install:allcd backend
cp .env.example .envOpen backend/.env and configure at minimum:
MONGODB_URIβ MongoDB connection string.REDIS_URLβ Redis server URI.JWT_SECRET&JWT_REFRESH_SECRETβ Long random strings.GEMINI_API_KEYβ Your Gemini API Key.
cd ../frontend
cp .env.example .env- Keep
VITE_API_URL=/api/v1for Vite proxies. - Add your
VITE_GEMINI_API_KEYfor client-side chat widgets.
From the repository root, run both servers concurrently:
npm run dev
# β Frontend: http://localhost:3000
# β Backend: http://localhost:5000Seed mock departments, profiles, attendance records, payslips, leaves, and applications:
cd backend
node src/utils/seeder.js --reset| Role | Password | |
|---|---|---|
| Admin | admin@demo.com |
Admin@1234 |
| Senior Manager | manager@demo.com |
Manager@1234 |
| HR Recruiter | hr@demo.com |
HR@12345 |
| Employee | employee@demo.com |
Employee@1234 |
Base URL: http://localhost:5000/api/v1
POST /auth/loginβ Sign in.POST /auth/registerβ Register a new account.GET /auth/meβ Retrieve logged-in user profile.POST /auth/logoutβ Blacklist token and clear cookies.POST /auth/refresh-tokenβ Rotate JWT access token.
GET /employeesβ Fetch directory listing.POST /employeesβ Create new profile.GET /employees/:idβ Get employee details.PUT /employees/:idβ Update profile.DELETE /employees/:idβ Soft-delete employee.
POST /attendance/checkinβ Check-in.POST /attendance/checkoutβ Check-out.GET /attendance/todayβ Fetch today's check-in status.GET /attendanceβ History (filters: employeeId, date ranges).
GET /leavesβ Fetch leaves history (filtered by employee).POST /leavesβ Request a leave.PATCH /leaves/:id/approveβ Approve request (Manager/Admin).PATCH /leaves/:id/rejectβ Decline request (Manager/Admin).
GET /payrollβ Fetch payroll logs.POST /payroll/processβ Auto-calculate monthly salaries.PATCH /payroll/:id/approveβ Approve payslip and lock database record.
GET /recruitment/jobsβ Fetch job postings.POST /recruitment/jobsβ Post job requirements.POST /recruitment/applicationsβ Submit application with resume.PATCH /recruitment/applications/:id/stageβ Update candidate stage.
To build and run the entire application containerized:
# Set production variables in .env
docker-compose up -d --build- Frontend: http://localhost
- Backend API: http://localhost:5000
MIT Β© SmartHR Nexus 2026




