Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • E eacreator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Jian Zhang
  • eacreator
  • Merge requests
  • !2

Merged
Created Oct 28, 2025 by Michael Hu@michaelhuMaintainer

Add Core HR module with PostgreSQL database integration

  • Overview 0
  • Commits 3
  • Changes 22

Features Added

HR Module

  • 3-step wizard for HR configuration
  • Core HR (mandatory) + 4 optional sub-modules
    • Payroll & Compensation
    • Time & Attendance
    • Compliance & Documents
    • Performance & Growth
  • Module selection, basic config, and preview/export

Database Layer

  • PostgreSQL schema with multi-tenant architecture
  • Schema-based namespacing (public + hr schemas)
  • Row Level Security (RLS) policies
  • 8 tables: organizations, users, org_members, module_registry, departments, positions, employees, employee_roles
  • 43+ performance indexes
  • Type-safe TypeScript interfaces
  • Database client with CRUD helpers and transaction support
  • Migration file with sample seed data (2 orgs, 5 employees)

Infrastructure

  • Added pg (node-postgres) for database connectivity
  • Added dotenv for environment variable management
  • Added tsx for TypeScript execution in Node.js
  • Created .env.example template
  • Updated .gitignore to protect secrets

Documentation

  • Comprehensive database README with troubleshooting
  • Quick start guide for database setup
  • Updated CLAUDE.md with database architecture
  • HR module documentation

Technical Notes

  • Uses process.env (not import.meta.env) for Node.js scripts
  • Dynamic imports required for dotenv in test scripts
  • RLS policies use current_setting() for auth (compatible with raw PostgreSQL)

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: test