Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

TechCorp HRM

A multi-tenant HR Management platform built with Node.js, TypeScript, Express, PostgreSQL, Redis, and BullMQ.

Stack

Layer Technology
Runtime Node.js 20 + TypeScript
API Express 4
Database PostgreSQL 16 (via pg)
Cache / Queue Redis 7 + BullMQ
Auth JWT (jsonwebtoken) + bcrypt
PDF PDFKit

Features

  • Employee Management — create, update, terminate, search
  • Department Management — org structure with manager assignment
  • Leave Management — annual/sick/unpaid leave with balance tracking
  • Payroll — background job processing, payslip PDF generation
  • Multi-tenancy — all data is scoped to tenant_id
  • Role-based auth — ADMIN / HR / EMPLOYEE roles

Quick Start

cp .env.example .env
docker-compose up -d postgres redis
npm install
npm run migrate
npm run dev

API available at http://localhost:3000

API Endpoints

Auth

Method Path Description
POST /api/v1/auth/login Login, receive JWT
POST /api/v1/auth/logout Invalidate token
POST /api/v1/auth/forgot-password Request reset link
POST /api/v1/auth/reset-password Set new password

Employees

Method Path Description
GET /api/v1/employees List all with departments
GET /api/v1/employees/search?q= Search by name/email/title
GET /api/v1/employees/:id Get single employee
POST /api/v1/employees Create employee
PATCH /api/v1/employees/:id Update employee
DELETE /api/v1/employees/:id Terminate employee

Leave

Method Path Description
GET /api/v1/leave/balance/:employeeId Get leave balance
POST /api/v1/leave/request Submit leave request
GET /api/v1/leave List all requests (HR/Admin)
PATCH /api/v1/leave/:id/approve Approve request
PATCH /api/v1/leave/:id/reject Reject request

Payroll

Method Path Description
GET /api/v1/payroll/:employeeId/runs List payroll runs
POST /api/v1/payroll/run Queue payroll batch
GET /api/v1/payroll/:employeeId/payslip/:runId Download payslip PDF

Project Structure

src/
  config/         # Database + Redis connections
  middleware/     # Auth, error handler, rate limiter, tenant extraction
  routes/         # Express route handlers
  services/       # Business logic
  repositories/   # Database access layer
  jobs/           # BullMQ background workers
  utils/          # Cache helper
  types/          # TypeScript interfaces
  migrations/     # SQL migration files

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages