EmpFlow is a Java-based Employee Management System built using JDBC, DAO pattern, and Service layer architecture.
The project focuses on clean separation of concerns, maintainability, and real-world backend design practices.
This system supports user authentication, role management, and employee operations.
- User authentication (Login)
- Role management
- Employee CRUD operations
- DAO + DAOImpl pattern
- Service layer for business logic
- JDBC-based database interaction
- Maven project structure
- Easily extendable for future features
EmpFlow follows a layered architecture:
Main
↓
Controller
↓
Service
↓
DAO
↓
Database
- Easy maintenance
- Clear responsibility separation
- Industry-standard backend design
- Easy to add new features
EmpFlow-EMS/
│
├── src/
│ └── main/
│ └── java/
│ └── com/company/ems/
| |
| ├── controller/
| | ├── AuthService.java
│ | └── EmployeeService.java
│ ├── dao/
│ │ ├── EmployeeDAO.java
│ │ ├── RoleDAO.java
│ │ ├── UserDAO.java
│ │ ├── EmployeeDAOImpl.java
│ │ ├── RoleDAOImpl.java
│ │ └── UserDAOImpl.java
│ │
│ ├── model/
│ │ ├── Employee.java
│ │ ├── Role.java
│ │ └── User.java
│ │
│ ├── service/
│ | ├── AuthService.java
│ | └── EmployeeService.java
│ |
| └── resources
| ├── db.properies
| └── schema.sql
|
|
├── pom.xml
├── .gitignore
└── README.md
Contains entity classes:
Employee– Employee detailsUser– Login credentialsRole– User roles
Defines database operation contracts:
EmployeeDAOUserDAORoleDAO
Contains JDBC implementations:
EmployeeDAOImplUserDAOImplRoleDAOImpl
Contains business logic:
AuthServiceEmployeeService
DBConnection– Manages database connection logic
- Java (JDK 8+)
- JDBC
- Maven
- PostgreSQL / MySQL
- SLF4J (Logging)
- IntelliJ IDEA
| Column | Type |
|---|---|
| id | INT |
| username | VARCHAR |
| password | VARCHAR |
| role_id | INT |
| Column | Type |
|---|---|
| id | INT |
| name | VARCHAR |
| Column | Type |
|---|---|
| id | INT |
| name | VARCHAR |
| VARCHAR | |
| department | VARCHAR |
| salary | DOUBLE |
git clone https://github.com/LahiruCodez/EmpFlow-EMS.git
cd EmpFlow-EMSUpdate database credentials in db.properties:
String url = "jdbc:postgresql://localhost:5432/empflow-ems";
String username = "postgres";
String password = "your_password";mvn clean installRun the Main class from IntelliJ IDEA.
- ADMIN – Full access
- MANAGER – Employee management
- USER – Limited access
- Spring Boot migration
- REST APIs
- JWT authentication
- React frontend
- Connection pooling (HikariCP)
- Unit testing with JUnit