The project employs an MVC (Model-View-Controller) architecture for maintainability, scalability, and separation of concerns. The overall directory structure is as follows:
Employee Payroll Management System/
โ
โโโ bin/ย ย ย ย ย ย ย ย ย ย ย ย # Compiled .class files (Java bytecode, same hierarchy as src/)
โ
โโโ employees ย ย ย ย ย ย ย ย ย # JSON data file for employee records and payroll history
โ
โโโ src/ย ย ย ย ย ย ย ย ย ย ย ย # Source code root
โ ย โโโ controller/ ย ย ย ย ย ย # Controllers: Handle application logic and user input
โ ย โ ย โโโ AuthenticationController.java
โ ย โ ย โโโ EmployeeController.java
โ ย โ ย โโโ PayrollController.java
โ ย โ ย โโโ TaxController.java
โ ย โ
โ ย โโโ model/ย ย ย ย ย ย ย ย ย # Models: Represent data and business logic
โ ย โ ย โโโ Admin.java
โ ย โ ย โโโ Employee.java
โ ย โ ย โโโ Payroll.java
โ ย โ ย โโโ PayrollProcessor.java
โ ย โ ย โโโ TaxRule.java
โ ย โ ย โโโ User.java
โ ย โ
โ ย โโโ util/ ย ย ย ย ย ย ย ย ย # Utilities: Helper classes and utilities
โ ย โ ย โโโ DataGenerator.java
โ ย โ ย โโโ EmailService.java
โ ย โ ย โโโ ReportGenerator.java
โ ย โ ย โโโ EmployeeFileUtil.java
โ ย โ ย โโโ LocalDateAdapter.java
โ ย โ
โ ย โโโ view/ ย ย ย ย ย ย ย ย ย # Views: GUI components (Java Swing)
โ ย ย ย โโโ AdminDashboard.java
โ ย ย ย โโโ EmployeeDashboard.java
โ ย ย ย โโโ EmployeeManagementPanel.java
โ ย ย ย โโโ LoginPanel.java
โ ย ย ย โโโ ModernEmployeeDialog.java
โ ย ย ย โโโ PayrollHistoryPanel.java
โ ย ย ย โโโ ReportPanel.java
โ ย ย ย โโโ TaxRulePanel.java
โ ย ย ย โโโ WelcomeScreen.java
โ ย ย ย โโโ jesan.jpg ย ย ย ย ย # Asset/Image used in the GUI
โ
โโโ lib/ย ย ย ย ย ย ย ย ย ย ย ย # Third-party libraries
โ ย โโโ gson-2.10.1.jar ย ย ย ย # Gson library for JSON serialization/deserialization
โ
โโโ Main.java ย ย ย ย ย ย ย ย ย # Main entry point of the application
bin/ Contains compiled .class files, reflecting the source structure for execution.
employees JSON file used as the persistent data store for employee information and payroll records.
src/ Main source code folder, structured as follows:
controller/: Handles user input and orchestrates communication between view and model.
model/: Contains core business logic and data representation.
util/: Helper classes, utilities for data manipulation, email simulation, report generation, file operations, and data adaptation.
view/: GUI panels and windows constructed with Java Swing; handles all user interface elements.
lib/ External libraries required for the project (e.g., Gson for JSON processing).
Main.java
The application's main class containing the public static void main(String[] args) method to launch the system.
This modular organization ensures the project is easy to understand, maintain, and extend, adhering to best practices in OOP and Java application development.