Skip to content

mayankgorana/EmployeeManagement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧑‍💼 Employee Management System (EMS) – PERN Stack

This project is a PERN (PostgreSQL, Express.js, React.js, Node.js) based Employee Management System designed to help organizations efficiently manage their employee records, departments, performance reviews, leave requests, and attendance.


⚙️ Tech Stack

  • Frontend: React.js
  • Backend: Node.js, Express.js
  • Database: PostgreSQL
  • ORM/Driver: pg PostgreSQL driver
  • Session Management: express-session with connect-pg-simple
  • Authentication: Bcrypt password hashing
  • API Communication: Axios / Fetch API

🛠 Features

  • 🔐 Login System (with hashed passwords using bcrypt)
  • 👤 Employee CRUD (Add, View, Update, Delete)
  • 🏢 Department Management (Create, Assign Manager)
  • 📊 Performance Reviews
  • 🕒 Attendance Tracking
  • 🌴 Leave Requests
  • 🔄 Assign Employees to Departments
  • 🧪 Form Validation & Error Handling

🗃 Database Schema (PostgreSQL)

employees

  • employee_id (PK)
  • first_name, last_name, email, phone_number
  • date_of_birth, hire_date, job_title, salary
  • department_id (FK → departments)

departments

  • department_id (PK)
  • department_name, location
  • manager_id (FK → employees)

performance_reviews

  • review_id (PK)
  • employee_id (FK)
  • review_date, rating (1–5), comments

attendance

  • attendance_id (PK)
  • employee_id (FK)
  • clock_in_time, clock_out_time, work_hours, status, reason

leave_requests

  • leave_id (PK)
  • employee_id (FK)
  • leave_type, start_date, end_date, status, comments

🔧 How to Run Locally

🖥 Backend Setup

cd backend
npm install
# Set up .env with your PostgreSQL details:
# PG_USER, PG_PASSWORD, PG_DATABASE, PG_HOST, PG_PORT, FOO_COOKIE_SECRET

npm run dev  # or node server.js


🌐 Frontend Setup
cd frontend
npm install
npm start


📝 .env Sample (backend)
PG_USER=your_postgres_user
PG_PASSWORD=your_password
PG_DATABASE=ems_db
PG_HOST=localhost
PG_PORT=5432
FOO_COOKIE_SECRET=random_session_key

🧠 Key Learnings & Considerations ✅ Secure authentication with bcrypt

✅ Robust API routing and PostgreSQL queries

✅ Normalized relational schema design

✅ Effective use of React state management

✅ Clean UI/UX with modular forms and reusable components

✅ Real-world HR system simulation (performance, leaves, attendance)

🚀 Future Enhancements ✅ Add role-based access (Admin vs Employee)

📊 Dashboard charts for attendance/reviews

📱 Mobile responsiveness

📤 Export data to CSV/PDF Screenshot 2025-07-18 230132 Screenshot 2025-07-18 225929 Screenshot 2025-07-18 230023 Screenshot 2025-07-18 230034 Screenshot 2025-07-18 230045 Screenshot 2025-07-18 230058

About

Employee Management System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors