ComingUp ComingUp
C

Cervo

HRM System: Employee, Attendance, Leave, Payroll

Posted on behalf of the maker

Is this your project? Ask us to take it down

About

Cervo HRM - Human Resource Management System

Cervo HRM is a comprehensive, enterprise-grade Human Resource Management System built with modern technologies.

🎯 Overview

Cervo HRM is a complete HR management solution featuring:

  • Employee Management - Full CRUD with import/export capabilities
  • Attendance Tracking - GPS & IP-based check-in/out with approval workflow
  • Leave Management - Request, approve, and balance tracking
  • Payroll Processing - Automated calculations with payslip generation
  • Role-Based Access Control - Granular permissions per role
  • Audit Logging - Complete activity tracking
  • Multi-Company Support - Manage multiple organizations

✨ Features

Core Modules

ModuleFeatures

Dashboard Real-time statistics, quick actions, recent activity

Employees Directory, profiles, contracts, bank accounts, CSV import

Departments Organization structure, head/manager assignment

Attendance Check-in/out, GPS tracking, IP validation, admin view

Leave Request workflow, approval system, balance tracking

Payroll Run management, auto-calculation, payslip generation

Reports Headcount, leave summary, payroll reports, CSV export

Notifications In-app alerts, broadcast announcements

Audit Log Complete activity trail

Support Tickets Issue tracking and resolution

Role-Based Access Control

RoleCapabilities

ADMIN Full system access

EXECUTIVE Company-level management

HR HR operations, payroll, employees

MANAGER Department management, leave approval

USER Personal data, leave requests

🔑 Demo Credentials

After running the seed script, use these accounts:

RoleEmailPassword

Admin [email protected] password123

HR [email protected] password123

Manager [email protected] password123

Employee [email protected] password123

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL 15+ or SQLite
  • npm/yarn/pnpm

Installation

# 1. Clone the repository

git clone <repository-url>

cd cervo

# 2. Install dependencies

npm install

# 3. Set up environment

cp .env.example .env

# Edit .env with your database URL

# 4. Initialize database

npx prisma generate

npx prisma db push

# 5. Seed demo data

npm run seed

# 6. Start development server

npm run dev

Open http://localhost:3000 in your browser.

📁 Project Structure

cervo/

├── prisma/

│ ├── schema.prisma # Database schema

│ ├── migrations/ # Database migrations

│ └── seed.ts # Demo data seeder

├── src/

│ ├── actions/ # Server Actions (API)

│ │ ├── auth.ts # Authentication

│ │ ├── employees.ts # Employee management

│ │ ├── departments.ts

│ │ ├── leave.ts # Leave management

│ │ ├── attendance.ts # Attendance tracking

│ │ ├── payroll.ts # Payroll processing

│ │ ├── notifications.ts

│ │ └── reports.ts

│ ├── app/ # Next.js App Router

│ │ ├── (auth)/ # Login, Register

│ │ ├── employees/ # Employee pages

│ │ ├── departments/ # Department pages

│ │ ├── leave/ # Leave pages

│ │ ├── attendance/ # Attendance pages

│ │ ├── payroll/ # Payroll pages

│ │ └── ...

│ ├── components/ # React components

│ │ └── ui/ # UI primitives

│ └── lib/ # Utilities

│ ├── authz.ts # RBAC permissions

│ ├── session.ts # JWT session

│ └── prisma.ts # Database client

└── public/ # Static assets

🛠️ Technology Stack

CategoryTechnology

Framework Next.js 16 (App Router)

Language TypeScript 5

Database PostgreSQL / SQLite

ORM Prisma 7

Auth JWT (jose) + bcrypt

Styling Tailwind CSS

Icons Material Symbols

📖 Documentation

DocumentDescription

INSTALLATION.md Detailed installation guide

CONFIGURATION.md Environment configuration

FEATURES.md Complete feature reference

USER_GUIDE.md End-user manual

API_REFERENCE.md Server Actions API

DEPLOYMENT.md Production deployment

🔐 Security Features

  • JWT-based session management
  • Password hashing with bcrypt
  • Role-based access control (RBAC)
  • Audit logging for all actions
  • Protected routes via middleware
  • Input validation on all forms
  • Prisma ORM (SQL injection prevention)

📊 Database Models

18 complete models with proper relations and indexes:

Company ←→ Department ←→ Employee ←→ User

↓

LeaveType ←→ LeaveBalance

↓

LeaveRequest ←→ LeaveApproval

↓

AttendanceRecord ←→ AttendanceApproval

↓

PayrollRun ←→ PayrollItem ←→ Payslip

↓

Notification, AuditLog, Ticket

🌐 Deployment

Vercel (Recommended)

  1. Push to GitHub
  2. Connect to Vercel
  3. Set environment variables
  4. Deploy

Railway / Render

  1. Create PostgreSQL database
  2. Set DATABASE_URL environment variable
  3. Deploy with npm run build && npm start

Docker

FROM node:18-alpine

WORKDIR /app

COPY package*.json ./

RUN npm ci

COPY . .

RUN npx prisma generate

RUN npm run build

EXPOSE 3000

CMD ["npm", "start"]

Comments (0)

No comments yet. Be the first to comment!