Business SaaS

Multi-Tenant HR Management SaaS

TypeScript

Business SaaS Featured

Multi-Tenant HR Management SaaS

A commercial-grade, multi-tenant HR Management SaaS covering the full employee lifecycle.

0 stars 0 forks 0 issues Created Jun 2026

Preview

Illustrative UI preview
Multi-Tenant HR Management SaaS — illustrative ui preview

A representative UI concept for this project — illustrative, not a screenshot of the running app. Explore the code and README below.

What this demonstrates

  • Multi-tenant, tenant-isolated workspaces
  • Admin, HR and employee permissions
  • PostgreSQL data layer with PLpgSQL
  • Dockerized for deployment
  • Modular, domain-driven architecture

Tech stack

TypeScript 89.5%PLpgSQL 5.4%JavaScript 1.8%CSS 1.2%Rich Text Format 0.7%HTML 0.6%Shell 0.5%PowerShell 0.2%Dockerfile 0%
Next.jsTypeScriptPostgreSQLMulti-tenant SaaSRole-based access controlDockerAuthenticationPayroll Logic

Overview

HRM SaaS is a multi-tenant Human Resource Management platform built on a modern Next.js SaaS stack. Each organization gets a tenant-isolated workspace to manage its entire employee lifecycle — onboarding, attendance, leave, payroll, performance, recruitment, learning and documents. It is a full product, not a demo: real database schema (PostgreSQL/PLpgSQL), Docker tooling, and a modular architecture organised around distinct HR domains.

Project README

HRM SaaS — Multi-Tenant SaaS Human Resource Management

A commercial-grade, multi-tenant Human Resource Management System (HRMS) built on a modern Next.js SaaS stack. The platform lets organizations manage their entire employee lifecycle — onboarding, attendance, leave, payroll, performance, recruitment, learning, and documents — under a single tenant-isolated workspace.

Originally bootstrapped from a sales/inventory SaaS, the codebase has been consolidated and re-platformed into a dedicated HR module. See HR_Module_Blueprint.md for the full solution blueprint and product vision.


✨ Features

Core HR Modules

  • Employees — employee records, departments, positions, org structure
  • Attendance — self check-in/out, attendance calendar, break sessions & penalties
  • Leave — leave types, balances, requests, and approval workflows
  • Payroll — salary structures & components, payroll periods/runs, payslips, custom columns, employee advances & recovery
  • Performance — review cycles, goals, and reviews
  • Recruitment — job postings, candidates, and applications
  • Learning — courses, modules, enrollments, and certifications
  • Documents — document categories and per-employee document storage

Platform Capabilities

  • Multi-tenancy — tenant isolation with Tenant, TenantMember, role-based permissions, invites, and billing
  • Authentication — NextAuth-based auth with email verification, password reset, and invite onboarding flows
  • Role-based access — admin, HR, and employee role separation with scoped views
  • Approvals — centralized approval requests linking HR and admin sign-off
  • Real-time — WebSocket-powered realtime provider with live notifications
  • Notifications — in-app notification poller with read tracking
  • Reporting & exports — PDF (jsPDF / pdf-lib) and Excel (ExcelJS) generation
  • Activity logging — audit trail of tenant activity

🧱 Tech Stack

LayerTechnology
FrameworkNext.js 16 (App Router) + React 18
LanguageTypeScript
DatabasePostgreSQL via Prisma ORM
AuthNextAuth (next-auth) + @auth/prisma-adapter
StylingTailwind CSS + Radix UI + shadcn-style components
RealtimeCustom WebSocket server (ws)
Caching / Rate limitingRedis (ioredis, Upstash)
MediaCloudinary
EmailNodemailer
ValidationZod + React Hook Form
MonitoringSentry
Docs/ExportsjsPDF, pdf-lib, ExcelJS, pdfjs-dist

🚀 Getting Started

Prerequisites

  • Node.js 20+ (developed on v22)
  • PostgreSQL database
  • (Optional) Redis instance, Cloudinary account, SMTP credentials

Installation

# Install dependencies
npm install

# Generate the Prisma client and apply migrations
npx prisma generate
npm run db:migrate

# (Optional) Seed the database and create a super admin
npm run db:seed
npm run db:create-admin

Running locally

# Standard Next.js dev server
npm run dev

# Dev server with the WebSocket realtime server
npm run dev:ws

The app runs at http://localhost:3000.


📜 Scripts

ScriptDescription
npm run devStart the Next.js dev server
npm run dev:wsStart dev with the WebSocket realtime server
npm run buildProduction build
npm run startStart the production server (with WebSocket)
npm run lintRun ESLint
npm run db:migrateRun Prisma dev migrations
npm run db:pushPush schema to the database
npm run db:seedSeed the database
npm run db:create-adminCreate a super admin user
npm run db:studioOpen Prisma Studio
npm run db:resetReset the database
npm run test:securityRun security assertions
npm run test:security:smokeRun authorization smoke tests

📁 Project Structure

app/
├── (public)/          # Public routes — login, onboarding, invite, verify-email, careers, reset-password
├── (tenant)/          # Authenticated tenant workspace
│   ├── admin/         # Tenant admin: approvals, system settings
│   ├── hr/            # HR modules: employees, attendance, leave, payroll,
│   │                  #   performance, recruitment, learning, documents, departments, positions
│   ├── employee/      # Employee self-service & payslips
│   ├── dashboard/     # Tenant dashboard
│   ├── profile/       # User profile
│   ├── settings/      # Workspace settings
│   ├── tenants/       # Tenant management
│   └── users/         # User management
prisma/
├── schema.prisma      # Data model (tenancy, HR, payroll, recruitment, etc.)
├── migrations/        # Migration history
└── seed.ts            # Seed script
scripts/               # Admin & security tooling

📚 Documentation


📄 License

Private and proprietary. All rights reserved.