Skip to content

IntelliSaad/Employee-Management-System-EMS-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Employee Management System (EMS)

Java MySQL FlatLaf iTextPDF License Status

A professional, full-featured Employee Management System built with Java Swing, featuring a premium dark-themed UI, sidebar dashboard, salary analytics, attendance tracking, leave management, CSV/PDF export, and offline demo mode.


Features

Core Employee Management

  • Add Employee - Register new employees with full details (name, CNIC, salary, department, etc.)
  • View Employees - Browse all employees with advanced multi-field search (name, email, phone, department)
  • Update Employee - Edit any employee record
  • Remove Employee - Delete employees with confirmation
  • Employee Profile - Detailed profile view with avatar, status badge, and all fields (double-click any row)

Department Management

  • Department Cards - Visual cards showing employee count per department (clickable to filter)
  • Department Filter - Dropdown filter on employee tables
  • 5 Default Departments: Engineering, Human Resources, Finance, Marketing, Operations

Attendance Tracking

  • Daily Attendance - Mark employees as Present / Absent / Late for today
  • Bulk Marking - Select multiple employees and mark at once
  • Attendance History - Per-employee history dialog with all past records
  • Live Stats - Real-time Present/Absent/Late counters

Leave Management

  • Leave Types - Sick Leave (10 days), Casual Leave (8 days), Annual Leave (15 days)
  • Leave Balance - Per-employee balance tracking with visual cards
  • Apply Leave - Submit new leave requests with date range and reason
  • Approve/Reject - Admin can approve or reject pending leave requests

Salary Analytics

  • Summary Cards - Total Payroll, Average Salary, Highest/Lowest Salary
  • Bar Chart - Custom-painted horizontal bar chart showing average salary by department
  • Top Earners - Leaderboard of top 5 highest-paid employees

Reports & Export

  • CSV Export - One-click export for: All Employees, Attendance, Leaves, Salary, Department Summary
  • Report Preview - Live preview table before exporting
  • Enhanced PDF Payslip - Professional payslip with salary breakdown (Basic 60%, Housing 20%, Transport 10%, Medical 10%), attendance summary, and leave balances

User Experience

  • Sidebar Dashboard - Professional sidebar navigation with organized sections
  • Toast Notifications - Animated slide-in notifications (success/error/warning/info) instead of popup dialogs
  • Keyboard Shortcuts - Ctrl+N (Add), Ctrl+F (Search), Ctrl+D (Departments), Ctrl+R (Reports)
  • Dark Theme - Premium deep navy + teal accent design across all screens
  • Settings - Theme toggle, demo credentials config, database connection reference
  • About Page - App version, tech stack, and feature summary

Getting Started

Prerequisites

  • JDK 17 or higher installed and added to system PATH
  • MySQL Server (Optional - only needed for persistent data storage)

Quick Start (Demo Mode - No Database Required)

# 1. Clone the repository
git clone https://github.com/IntelliSaad/Employee-Management-System-EMS-Java.git
cd Employee-Management-System-EMS-Java

# 2. Run the application
run.bat
  1. Log in with demo credentials:
    • Username: admin
    • Password: admin123

The application ships with Demo Mode enabled by default - 10 sample employees across 5 departments with pre-populated attendance and leave records.


Database Setup (Optional - For Persistent Storage)

To save data permanently with MySQL, follow these 3 steps:

Step 1: Create the Database

Open MySQL Workbench (or any MySQL client) and execute the SQL script:

src/Employee_Management_System/EMPLOYEE.sql

Step 2: Enable Database Connection

Open src/Employee_Management_System/Connect.java and:

  1. Uncomment the database connection block (lines 11-24)
  2. Comment out the demo mode line (line 28)
  3. Update the password if yours differs from Flowers@123
// In Connect.java — UNCOMMENT this block:
try {
    Class.forName("com.mysql.cj.jdbc.Driver");
    c = DriverManager.getConnection("jdbc:mysql://localhost:3306/EmployeeManagement", "root", "YOUR_PASSWORD");
    s = c.createStatement();
    demoMode = false;  // Change to false
} catch (Exception e) { e.printStackTrace(); }

Step 3: Recompile and Run

run.bat

Project Structure

Employee_Management_Sys/
|-- src/Employee_Management_System/
|   |-- Front_page.java        # Splash / welcome screen
|   |-- Login.java              # Authentication screen
|   |-- Home.java               # Sidebar dashboard
|   |-- AddEmployee.java        # Add employee form
|   |-- ViewEmployee.java       # Employee directory + search
|   |-- UpdateEmployee.java     # Edit employee form
|   |-- RemoveEmployee.java     # Delete employee screen
|   |-- EmployeeDetail.java     # Full employee profile view
|   |-- DepartmentView.java     # Department management
|   |-- AttendanceTracker.java  # Daily attendance marking
|   |-- LeaveManagement.java    # Leave requests & approvals
|   |-- SalaryStats.java        # Salary analytics dashboard
|   |-- ReportCenter.java       # CSV/PDF report hub
|   |-- CSVExporter.java        # CSV export utility
|   |-- EnhancedPayslip.java    # PDF payslip generator
|   |-- PayslipPrinter.java     # Legacy payslip printer
|   |-- ToastNotification.java  # Animated notification system
|   |-- SettingsPanel.java      # App settings screen
|   |-- AboutPage.java          # About page
|   |-- DemoData.java           # Central demo data store
|   |-- Connect.java            # Database connection manager
|   |-- EMPLOYEE.sql            # MySQL schema script
|-- lib/
|   |-- flatlaf-3.5.jar         # FlatLaf Look & Feel
|   |-- mysql-connector-java-8.0.30.jar
|   |-- itextpdf-5.5.13.3.jar   # PDF generation
|   |-- jcalendar-1.4.jar       # Date picker widget
|-- run.bat                     # Windows execution script
|-- README.md

Keyboard Shortcuts

Shortcut Action
Ctrl+N Add New Employee
Ctrl+F View / Search Employees
Ctrl+D Departments
Ctrl+R Reports

Tech Stack

Component Technology
Language Java 17+
UI Framework Java Swing + FlatLaf 3.5 (Dark Theme)
Database MySQL 8.0 (Optional)
PDF Generation iTextPDF 5.5.13
Date Picker JCalendar 1.4
Architecture Event-Driven, MVC-like
Build javac (no Maven/Gradle required)

Screenshots

(Run the application and capture screenshots of the sidebar dashboard, employee directory, salary analytics, and attendance tracker)


License

This project is licensed under the MIT License - see the LICENSE file for details.


Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

About

hehe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors