~/vimal-jain
Enterprise SaaSMar 2026

HRMS Backend Platform

Multi-tenant HR management backend platform for employee lifecycle, HR workflows, documents, tasks, and real-time collaboration.

Problem Statement

The platform was engineered to centralize core enterprise HR operations that were previously fragmented across manual spreadsheets and disparate tools. It delivers a unified multi-tenant backend supporting employee lifecycle tracking, onboarding, attendance, leave requests, task boards, company document distribution, and real-time company announcements across employees, department managers, HR administrators, and tenant owners.

Role & Engineering Leadership

•Served as Backend Architect and Technical Lead on the platform.
•Coordinated backend feature delivery across 4 interns, including task assignment, architecture planning, sprint tracking, and rigorous code reviews.
•Provided hands-on implementation across core domain services, authentication, and database schemas.

System Architecture

The backend is a REST API-first Node.js and TypeScript application built with Express.js, structured into domain routers, service layers, Mongoose models, and security middleware. Multi-tenancy is enforced at the database level with company-scoped queries and tenant validation middleware to guarantee strict data isolation. Socket.io provides real-time event delivery through company-isolated namespaces, while AWS S3 handles secure document storage using pre-signed URLs.

Client Requests (Web / Mobile)
  │
  ▼
Nginx Reverse Proxy / SSL Termination
  │
  ▼
Express.js REST API Layer (Node.js & TypeScript)
  ├── Security: Helmet, CORS, Rate Limiting
  ├── Authentication: JWT Access & Refresh Token Middleware
  └── Authorization: Multi-Tenant Tenant Guard & RBAC Middleware
  │
  ├── Domain Services Layer
  │     ├── Employee Lifecycle & Onboarding Workflows
  │     ├── Attendance & Leave Management
  │     ├── Task Management (Kanban Boards & Sprints)
  │     └── HR Services: Room Booking, Referrals, Announcements
  │
  ├── Persistence & Caching
  │     ├── MongoDB / Mongoose (Company-Isolated Schemas)
  │     └── Redis Cache (User Sessions & Fast State Lookup)
  │
  ├── Real-Time Layer: Socket.io (Company-Specific Namespaces)
  ├── Document Pipeline: AWS S3 with Expiring Signed URLs
  └── Background Engine: Workerpool & PM2 Master Cron Scheduling

Core Features & Modules

•Multi-Tenant Isolation: Complete tenant partitioning ensuring cross-company data leakage is impossible at both API and database layers.
•Authentication & RBAC: Secure JWT authentication with refresh token rotation and granular role-based permissions (Super Admin, Company Admin, HR Manager, Employee).
•Employee Lifecycle: End-to-end employee record management, department hierarchy, and digital onboarding document tracking.
•Leave & Attendance: Automated leave approval workflows, leave balance tracking, and attendance logs.
•Task Management Boards: Real-time Kanban task boards with status updates, assignments, and milestone tracking.
•Company Document Pipeline: Document uploads (PDF, Word, Excel) with AWS S3 encrypted storage and expiring signed URLs for private downloads.
•Real-Time Notification Pipeline: Instant task assignment alerts, company announcements, and status changes broadcast via Socket.io.

Technical Challenges & Engineering Solutions

•Real-Time Multi-Tenancy: Implemented Socket.io company-based namespaces and connection-level JWT authentication to isolate real-time event broadcasts strictly within each tenant organization.
•PM2 Multi-Instance Cron Isolation: Prevented duplicate scheduled job execution across PM2 cluster instances by gating cron triggers strictly to instance ID 0 (process.env.pm_id === '0'), avoiding race conditions in email digests.
•Non-Blocking Document & Mail Generation: Offloaded CPU-heavy PDF generation and templated email assembly using workerpool worker threads, keeping the primary Node.js event loop unblocked.
•Unified Document Pipeline: Built automated S3 upload services with mime-type validation, size limits, and pre-signed temporary download URLs for employee sensitive records.

Impact & Verification Status

Status: Pre-production enterprise platform.
•Architecture validated for ~1,000 concurrent simulated users per server instance under load testing.
•Built and maintained 30+ domain services and REST API endpoints across core HR modules.
•Successfully led 4 junior developers through sprint delivery and code quality standards.

Stack

Node.jsExpress.jsTypeScriptMongoDBMongooseRedisSocket.ioAWS S3JWTRBACWorkerpoolPM2