Enterprise-Grade Payroll Management System | CP2 Group 4
A comprehensive Java-based application with modern UI/UX, workflow-based payroll processing, and professional employee management.
Current Phase: QA Testing Completion: 0% Last Updated: July 2, 2025 Version:
- β Complete MPHCR Implementation: All requirements fully satisfied
- β Modern Payroll Workflow: Complete CSV upload β validation β calculation β review β approval workflow
- β Professional Attendance Viewer: Analytics dashboard with month/year filtering and export capabilities
- β Modernized Dashboard: Personalized greeting, payroll cutoff countdown, interactive calendar
- β Enhanced UI/UX: Consolidated design system with consistent colors and modern interactions
- β Code Consolidation: Improved maintainability with centralized constants and utilities
- β Production Deployment: System successfully deployed and operational
The MotorPH Payroll System is a sophisticated Java-based application designed to streamline and automate payroll management for MotorPH company. Built with enterprise-grade architecture patterns and modern UI/UX principles, this system demonstrates advanced software engineering practices while providing a robust solution for payroll processing and employee management.
- β Employee List Display: Professional table view with sorting capabilities
- β Employee Details Viewing: Comprehensive employee information display
- β New Employee Creation: Full form with validation and CSV persistence
- β Month-based Salary Computation: Detailed payroll calculation with breakdown
- β CSV Data Persistence: Robust file handling with OpenCSV integration
- β UI Constants Package: Consistent styling across all components
- β Professional UI Design: Modern, accessible interface with error handling
- The application has undergone significant refactoring to improve code organization, maintainability, and robustness by implementing the Model-View-Controller (MVC) architectural pattern and consolidating redundant components.
-
Advanced Employee Management
- Employee List Display: Professional table with action buttons (View, Edit)
- Employee Search: Real-time search and filtering capabilities
- Employee Creation: Comprehensive form with full validation
- Employee Details: Complete employee information viewing
- CSV Persistence: Robust data storage with OpenCSV integration
-
Enhanced User Interface
- UI Constants Package: Consistent styling with professional color scheme
- Modern Design: Bootstrap-inspired color palette and typography
- Responsive Layout: Professional table design with hover effects
- Error Handling: User-friendly error messages and validation
- Action Buttons: Integrated table actions with visual feedback
-
Data Management
- CSV Integration: Full CRUD operations with file persistence
- Data Validation: Comprehensive input validation and error recovery
- Money Formatting: Proper CSV formatting for monetary values
- Resource Management: Safe file operations with try-with-resources
-
Employee Management
- Employee data storage and retrieval
- Search functionality by employee name or ID
- Comprehensive employee listings
- Employee attendance tracking and reporting
-
Payroll Processing
- Automatic calculation of regular and overtime hours
- Computation of gross and net pay
- Handling of government-mandated deductions (SSS, PhilHealth, Pag-IBIG, withholding tax)
- Management of employee allowances (rice subsidy, phone allowance, clothing allowance)
-
Reporting System
- Individual employee payslip generation
- Weekly and monthly summary reports
- Customizable date range for reports
-
User Interface
- Intuitive graphical user interface (GUI)
- Menu-driven navigation system
- Interactive dialogs for user input
- Consistent styling and visual presentation
- Employee List Display: Professional table view with sorting, filtering, and action buttons
- Employee Details Viewing: Comprehensive employee information display with formatted layout
- New Employee Creation: Full form with validation and real-time CSV persistence
- Employee Management: Complete CRUD operations with data integrity
- Month-based Salary Computation: Detailed payroll calculation with breakdown and validation
- CSV Data Persistence: Robust file handling with OpenCSV integration and error recovery
- Employee Search & Filter: Real-time search capabilities across all employee fields
- Professional Table Interface: Custom renderers with action buttons (View, Edit, Delete)
- Employee Details Dialog: Comprehensive information display with professional formatting
- Data Validation: Multi-layer validation (UI, business logic, data persistence)
- Attendance Tracking: Professional attendance viewer with analytics and export
- Employee Number Input: Specialized dialogs for employee selection and validation
- Modern Payroll Workflow: Complete CSV upload β validation β calculation β review β approval
- Automated Calculations: Regular and overtime hours with government-mandated deductions
- PaySlip Generation: Professional payslip creation with detailed breakdown
- Payroll Status Management: Track payroll processing status and approval workflow
- Date Range Processing: Flexible payroll calculation for custom periods
- Government Compliance: SSS, PhilHealth, Pag-IBIG, and withholding tax calculations
- Individual Payslip Reports: Detailed employee payslip generation with formatting
- Summary Reports: Comprehensive payroll summaries with date range filtering
- Attendance Analytics: Professional attendance viewer with month/year filtering
- Export Capabilities: Data export functionality for reports and analytics
- Date Range Dialogs: User-friendly date selection for custom reporting periods
- UI Constants Package: Centralized styling system with professional color scheme
- Bootstrap-Inspired Design: Modern color palette and typography standards
- Responsive Layout: Professional table design with hover effects and visual feedback
- Dialog System: Comprehensive dialog components for all user interactions
- Error Handling: User-friendly error messages with comprehensive validation
- Menu-Driven Navigation: Intuitive application flow with consistent styling
- MVC Architecture: Clean separation of Model, View, and Controller layers
- Service Layer Pattern: Business logic encapsulation with proper error handling
- Repository Pattern: Data access abstraction with CSV file operations
- OpenCSV Integration: Professional CSV parsing and writing with data validation
- Resource Management: Safe file operations with try-with-resources patterns
- Logging System: Comprehensive application logging for debugging and monitoring
---
config:
kanban:
ticketBaseUrl: 'https://github.com/CP2-Group4/MotorPH-Payroll/issues/#TICKET#'
---
kanban
id1[β
COMPLETED]
id11[MPHCR-02 Feature Implementation]@{ assigned: 'CP2-Group4', priority: 'High' }
id12[Employee Management System]@{ assigned: 'CP2-Group4', priority: 'High' }
id13[CSV Data Integration]@{ assigned: 'CP2-Group4', priority: 'High' }
id14[Modern Payroll Workflow]@{ assigned: 'CP2-Group4', priority: 'High' }
id15[Professional Attendance Viewer]@{ assigned: 'CP2-Group4', priority: 'Medium' }
id16[Dashboard Modernization]@{ assigned: 'CP2-Group4', priority: 'Medium' }
id17[UI/UX Consolidation]@{ assigned: 'CP2-Group4', priority: 'Medium' }
id18[Authentication System]@{ assigned: 'CP2-Group4', priority: 'High' }
id19[Final Documentation]@{ assigned: 'CP2-Group4', priority: 'High' }
id20[System Testing & QA]@{ assigned: 'CP2-Group4', priority: 'High' }
id21[Production Deployment]@{ assigned: 'CP2-Group4', priority: 'Very High' }
id2[π― PRODUCTION READY]
id22[System Demonstration]@{ assigned: 'CP2-Group4', priority: 'Very High' }
id23[Feature Showcase]@{ assigned: 'CP2-Group4', priority: 'High' }
id24[Architecture Presentation]@{ assigned: 'CP2-Group4', priority: 'Medium' }
id25[Live System Demo]@{ assigned: 'CP2-Group4', priority: 'Very High' }
id3[π FUTURE ENHANCEMENTS]
id31[Advanced Export Functionality]@{ assigned: 'Future', priority: 'Low' }
id32[Business Intelligence Dashboard]@{ assigned: 'Future', priority: 'Low' }
id33[REST API Integration]@{ assigned: 'Future', priority: 'Very Low' }
id34[Cloud Migration]@{ assigned: 'Future', priority: 'Very Low' }
gantt
title MotorPH Payroll System - Complete Development Timeline (CP2 Group 4)
dateFormat YYYY-MM-DD
section Phase 1: Foundation (COMPLETED)
Initial Setup & Planning :done, setup, 2024-11-01, 2024-11-15
MVC Architecture Design :done, mvc, 2024-11-10, 2024-11-25
Basic UI Framework :done, ui-base, 2024-11-20, 2024-12-05
section Phase 2: Core Features (COMPLETED)
Employee Management :done, emp-mgmt, 2024-12-01, 2024-12-20
CSV Integration :done, csv, 2024-12-15, 2025-01-05
Authentication System :done, auth, 2024-12-20, 2025-01-10
section Phase 3: Advanced Features (COMPLETED)
Payroll Workflow :done, payroll, 2025-01-05, 2025-01-20
Attendance Viewer :done, attendance, 2025-01-15, 2025-01-25
Dashboard Modernization :done, dashboard, 2025-01-20, 2025-01-28
section Phase 4: Final Implementation (COMPLETED)
Documentation & Polish :done, docs, 2025-01-25, 2025-02-05
Terminal Assessment :done, terminal, 2025-01-28, 2025-02-07
Final Testing & QA :done, test, 2025-02-01, 2025-02-05
Production Deployment :done, deploy, 2025-02-05, 2025-02-10
section Phase 5: Production (CURRENT)
System Demonstration :active, demo, 2025-07-01, 2025-07-15
Maintenance & Support :active, maintenance, 2025-07-01, 2025-12-31
section Milestones
MPHCR-02 Complete :milestone, m1, 2025-02-01, 0d
System Go-Live :milestone, m2, 2025-02-10, 0d
Production Ready :milestone, m3, 2025-07-02, 0d
The system follows a robust Model-View-Controller (MVC) design pattern with additional service and utility layers:
-
Model Layer (
com.motorph.model
)Employee.java
: Enhanced employee data model with comprehensive attributesAttendanceRecord.java
: Manages attendance information with validationPaySlip.java
: Handles payslip data structure and calculations
-
View Layer (
com.motorph.view
)MainFrame.java
: Main application window with card layoutEmployeeListPanel.java
: NEW - Professional employee table with action buttonsNewEmployeeDialog.java
: NEW - Comprehensive employee creation formEmployeeDetailsFrame.java
: NEW - Detailed employee information display- Specialized panels for different functions:
EmployeeManagementPanel.java
PayrollPanel.java
ReportsPanel.java
- Dialog components for user interactions
-
Controller Layer (
com.motorph.controller
)EmployeeController.java
: ENHANCED - Manages employee operations with validationPayrollController.java
: Handles payroll processingReportController.java
: Controls report generation
-
Service Layer (
com.motorph.service
)EmployeeService.java
: ENHANCED - Business logic with CSV persistencePayrollService.java
: Business logic for payroll calculationsPayrollProcessor.java
: Handles calculation algorithmsReportService.java
: Business logic for report generation
-
Repository Layer (
com.motorph.repository
)DataRepository.java
: Consolidated data access componentCSVCreateAndWrite.java
: NEW - Specialized CSV writing operations
-
Utility Layer (
com.motorph.util
)UIConstants.java
: NEW - Centralized UI styling constantsUIUtils.java
: NEW - UI utility functions and helpersDateUtils.java
: Date formatting and manipulation utilitiesErrorHandler.java
: Centralized error handlingInputValidator.java
: User input validationPayrollConstants.java
: System-wide constants
User Action β UI Validation β Service Layer β Repository Layer β CSV File
β β β β β
Error Recovery β Error Handling β Transaction β File Operation β Data Persistence
- Color Scheme: Professional Bootstrap-inspired colors
- Typography: Consistent font families and sizes
- Dimensions: Standardized component sizing
- Styling: Uniform border radius and spacing
- UI Level: Real-time form validation with visual feedback
- Service Level: Business rule validation and error handling
- Repository Level: Data integrity checks and file operations
- Recovery: Automatic rollback on operation failures### Data Management
- Enhanced CSV Operations: Full CRUD capabilities with OpenCSV integration
- Data Validation: Multi-layer validation with error recovery
- Transaction Safety: Rollback mechanisms for failed operations
- Resource Management: Proper file handling with try-with-resources
- Error Handling: Comprehensive exception handling and user feedback
- Data Integrity: Validation at UI, service, and repository layers
-
Employee List Display Implementation
- Professional JTable with custom renderers and editors
- Action buttons integrated within table cells
- Sorting and filtering capabilities
- Real-time data updates and refresh
-
Employee Creation System
- Comprehensive form with all required fields
- Multi-level validation (UI, business logic, data)
- CSV persistence with OpenCSV integration
- Error handling and user feedback
-
UI Constants Package Development
- Centralized styling system for consistency
- Professional color scheme (Bootstrap-inspired)
- Typography standards and component dimensions
- Reusable styling components across application
-
CSV Integration Enhancement
- OpenCSV library integration (v5.7.1)
- Proper money formatting for CSV files
- Append operations for single employee additions
- Full file rewrite for updates and deletions
- Resource management and error recovery
-
Project Structure Cleanup
- Removed redundant/empty files: Eliminated 8 empty or duplicate files (
EmployeeListPanelNew.java
,NavigationBar.java
,EmployeeDetailsDialog.java
, etc.) - Proper test organization: Moved all test files from
src/main/java
tosrc/test/java
following Maven standards - Data organization: Created dedicated
data/
directory for CSV files - Package consolidation: Streamlined repository package by moving development utilities to test directory
- Removed redundant/empty files: Eliminated 8 empty or duplicate files (
-
Code Consolidation
- Merged redundant repository classes into a single
DataRepository
class - Combined
MotorPHPayrollMain.java
andMotorPHPayrollApp.java
into a single entry point (Main.java
) - Removed unnecessary utility classes and duplicate code
- Eliminated duplicate UI panels (
EmployeeListPanelFixed.java
was redundant)
- Merged redundant repository classes into a single
-
Enhanced Error Handling
- Improved exception handling throughout the application
- Added comprehensive logging for better diagnostics
- Implemented input validation for critical user inputs
-
Improved Architecture
- Clearer separation of concerns between layers
- Better organized package structure following Maven conventions
- More consistent naming conventions
- 17% reduction in main source files (46 β 40 files)
-
UI Improvements
- Consistent styling across all components
- More intuitive user flows
- Better error messages and user feedback
- Java 17: Modern programming language with latest features and performance improvements
- Java Swing: Advanced GUI framework for desktop application development
- Maven 3.9.0: Build automation and dependency management tool
- OpenCSV 5.7.1: Professional CSV file parsing and writing library
- Java Logging API: Comprehensive application logging and debugging
- Unit testing for comprehensive test coverage
- Maven Surefire Plugin: Test execution and reporting
- IntelliJ IDEA / Eclipse: Integrated Development Environment support
- Git: Version control and collaboration
- MVC Pattern: Model-View-Controller architectural pattern for clear separation of concerns
- Repository Pattern: Data access abstraction layer for CSV operations
- Service Layer Pattern: Business logic encapsulation and transaction management
- Singleton Pattern: Consistent UI styling with centralized constants
- Observer Pattern: Event handling and UI state management
- Factory Pattern: Dialog and component creation
- Command Pattern: Action handling and user interface interactions
- Java Swing Components: JTable, JDialog, JPanel, CardLayout
- Custom Renderers: ActionButtonRenderer for table interactions
- Layout Managers: BorderLayout, GridBagLayout, FlowLayout
- Event Handling: ActionListener, MouseListener, KeyListener
- Look and Feel: System native appearance with custom styling
- CSV File Format: Comma-separated values for data persistence
- File I/O: Java NIO for efficient file operations
- Data Validation: Multi-layer input validation and error handling
- Resource Management: Try-with-resources for safe file operations
- Data Integrity: Transaction-like operations for data consistency
- Maven Compiler Plugin: Java 17 compilation
- Maven Exec Plugin: Application execution
- Maven Assembly Plugin: Distribution packaging
- Windows Batch Scripts: Easy application launcher (launch.bat)
- Static Code Analysis: Code quality metrics and standards
- Comprehensive Testing: Unit tests for critical components
- Error Handling: Robust exception management
- Logging: Detailed application activity tracking
- Documentation: JavaDoc and comprehensive README
- Java 17+: Ensure Java Development Kit 17 or higher is installed
- Maven 3.6+: For dependency management and building
- IDE: IntelliJ IDEA, Eclipse, or VS Code with Java extensions
-
Clone or download the project
cd CP2_GROUP-4/motorph_payroll_system
-
Build the project
mvn clean compile
-
Run the application
mvn exec:java -Dexec.mainClass="com.motorph.Main"
- View Employee List: Navigate to Employee Management β View All Employees
- Add New Employee: Click "New Employee" button and fill the comprehensive form
- View Employee Details: Click "View" button in the employee table
- Edit Employee: Click "Edit" button in the employee table
- Generate Payslip: Navigate to Payroll β Generate Payslip
- View Monthly Reports: Navigate to Reports β Monthly Summary
# Run the CSV integration tests
mvn test -Dtest=EmployeeServiceTest
mvn test -Dtest=CSVTest
mvn test -Dtest=SimpleCSVTest
mvn clean package
CP2_GROUP-4/
βββ motorph_payroll_system/ # Main application directory
β βββ src/main/java/com/motorph/ # Source code
β β βββ Main.java # Application entry point
β β βββ controller/ # MVC Controllers
β β β βββ AuthenticationController.java # User authentication
β β β βββ EmployeeController.java # Employee operations
β β β βββ PayrollController.java # Payroll processing
β β β βββ ReportController.java # Report generation
β β βββ model/ # Data Models
β β β βββ AttendanceRecord.java # Attendance tracking
β β β βββ Employee.java # Employee entity
β β β βββ PayrollRun.java # Payroll run status
β β β βββ PayrollStatus.java # Payroll status enum
β β β βββ PaySlip.java # Payslip entity
β β β βββ User.java # User authentication
β β βββ service/ # Business Logic Layer
β β β βββ AuthenticationService.java # Authentication logic
β β β βββ EmployeeService.java # Employee operations
β β β βββ PayrollProcessor.java # Core calculations
β β β βββ PayrollService.java # Payroll operations
β β β βββ ReportService.java # Report generation
β β βββ repository/ # Data Access Layer
β β β βββ CSVCreateAndWrite.java # CSV operations
β β β βββ DataRepository.java # Data access
β β βββ view/ # User Interface Layer
β β β βββ Dashboard.java # Main dashboard
β β β βββ EmployeePanel.java # Employee management UI
β β β βββ HeaderPanel.java # Application header
β β β βββ Login.java # Login window
β β β βββ LoginPanel.java # Login interface
β β β βββ MainFrame.java # Main application window
β β β βββ Payroll.java # Payroll interface
β β β βββ PayrollNew.java # Modern payroll workflow
β β β βββ Reports.java # Reports interface
β β β βββ dialog/ # Dialog components
β β β β βββ AttendanceViewerDialog.java # Attendance analytics
β β β β βββ DateRangeDialog.java # Date selection
β β β β βββ EmployeeDetailsDialog.java # Employee details
β β β β βββ EmployeeDialog.java # Employee form
β β β β βββ EmployeeNumberInputDialog.java # Employee selection
β β β β βββ PayslipDialog.java # Payslip display
β β β β βββ SearchResultDialog.java # Search results
β β β βββ renderer/ # Custom renderers
β β β βββ ActionButtonRenderer.java # Table action buttons
β β βββ util/ # Utility Classes
β β βββ AppConstants.java # Application constants
β β βββ AppUtils.java # Utility functions
β βββ src/test/java/com/motorph/ # Test Classes
β β βββ CredentialManager.java # Test credentials
β β βββ CSVCreateAndWrite.java # CSV test utilities
β β βββ CSVTest.java # CSV integration tests
β β βββ CSVTestRunner.java # Test runner
β β βββ CSVWriteTest.java # CSV write tests
β β βββ EmployeeServiceTest.java # Employee service tests
β β βββ ManualCSVTest.java # Manual testing
β β βββ SimpleCSVTest.java # Basic CSV tests
β βββ data/ # Data Files
β β βββ attendanceRecord.csv # Employee attendance data
β β βββ employeeDetails.csv # Employee information
β β βββ userCredentials.csv # User authentication data
β βββ target/ # Build Output
β β βββ classes/ # Compiled classes
β β βββ generated-sources/ # Generated source files
β β βββ maven-status/ # Maven build status
β β βββ test-classes/ # Compiled test classes
β βββ launch.bat # Windows launcher script
β βββ motorPH_logo.png # Application logo
β βββ payroll_system.log # Application logs
β βββ pom.xml # Maven configuration
β βββ QA_TEST_PLAN.md # Quality assurance plan
β βββ sources.txt # Source file listing
βββ MotorPH Payslip - MotorPH Payslip.pdf # Sample payslip document
βββ motorPH_logo.png # Project logo
βββ payroll_system.log # System logs
βββ README.md # This documentation
βββ README.mdx # Extended documentation
βββ test/ # Additional test resources
- Main.java: Application entry point with initialization
- controller/: MVC controllers handling user interactions
- model/: Data models representing business entities
- service/: Business logic layer with core functionality
- repository/: Data access layer for CSV operations
- view/: User interface components and dialogs
- util/: Utility classes and constants
- Comprehensive test suite for all components
- CSV integration testing
- Employee service testing
- Manual testing utilities
- attendanceRecord.csv: Employee time tracking data
- employeeDetails.csv: Employee personal and job information
- userCredentials.csv: System user authentication data
- Maven build output directory
- Compiled classes and test classes
- Build artifacts and generated sources