I used the open-source MERN Employee Salary Management repository because it already has a React frontend, Node/Express backend, and payroll-focused flows that fit the assignment well.
Implemented an overtime workflow for site workers with:
- Overtime entry form for selecting an employee, date, hours, and reason
- Frontend validation before submission
- Backend validation on the API
- Duplicate overtime prevention per worker and date
- Monthly overtime cap validation
- Approval and rejection flow for overtime records
- Payroll integration so approved overtime contributes to salary output
Implemented the following tickets as separate commits:
LF-101: Payslip dates changed toDD/MM/YYYYLF-102: Negative salary and deduction amounts blocked with frontend and backend validationLF-103: Employee designation uses the existing Position Data source as a dropdown and is shown in the employee listLF-104: Employee list CSV export addedLF-105: Employee list mobile layout improved with stacked and horizontal mobile-friendly views
- Node.js 18+ recommended
- MySQL
- npm
git clone <your-fork-url>
cd mern-employee-salary-management-mainImport the assignment-ready database dump before starting the app.
The database import file is:
Backend/db/db_penggajian3.sql
This file has been replaced with an updated dump from the current working assignment database so reviewers can load the latest app state directly.
Recommended import flow:
mysql -u root -pCREATE DATABASE db_penggajian3;
EXIT;Then import:
Get-Content .\Backend\db\db_penggajian3.sql | mysql -u root -p db_penggajian3After import, optional implementation and review notes are available in:
docs/DB_report.md
That file documents the database work done during the assignment, including:
- overtime table creation
- role updates for
site_manager/site_admin - login/password notes
- verification SQL
Important note:
Backend/db/db_penggajian3.sqlis now the updated assignment dump, not the old upstream base dumpdocs/DB_report.mdis supporting documentation for the database changes made during implementation- session data is not meant to be reviewed as seeded user data
cd Backend
npm installCreate a .env file in Backend/ with the required environment variables:
APP_PORT=5000
SESS_SECRET=your_session_secret
DB_NAME=your_database_name
DB_USER=your_database_user
DB_PASS=your_database_password
DB_HOST=localhostStart the backend:
npm startOpen a second terminal:
cd Frontend
npm install
npm run dev- Frontend:
http://localhost:5173 - Backend:
http://localhost:5000
Use these credentials to review the updated app:
Role: username / password
admin:aldi / adminemployee:budi / employeesite manager:tony / sitemanager
I used OpenAI Codex, Antigrativity, Cursor, Github Copilot to:
- understand unfamiliar parts of the codebase faster
- review controller, route, and frontend form flows
- help debug rebase and commit-history cleanup
- draft and refine commit messages
- generate and improve documentation and review notes
All code changes were reviewed in the local repository and adjusted to fit the existing project structure rather than rewriting the app.
LF-103: Instead of introducing a brand-new hardcoded designation enum, I used the repo's existingPosition Data(data_jabatan) as the dropdown source. That matches the existing data model and keeps employee designations aligned with salary/position records already used by the application.LF-104: The assignment asks forname, designation, department, salary. This repo does not have a separate department field on the employee model, so the CSV export includes the available equivalent fields already modeled in the system: employee name, position/designation, and salary.
The branch is organized so that:
- overtime feature work is in separate commit(s)
- each ticket
LF-101throughLF-105is in its own commit
High-level sequence:
- documentation/context setup for understanding the inherited repo
- baseline repo fixes needed to make the project workable locally
- overtime feature commits
- individual LF-101 to LF-105 ticket commits
- small follow-up fixes and cleanup commits where needed
Additional non-ticket work done to support delivery:
- image upload fix on employee creation
- temporary password reset support for easier local access to inherited seed accounts
- project-context documentation because the original repo did not include assignment-friendly system context
- compatibility/cleanup fixes for issues encountered while working through the older codebase
These were kept separate from the LF ticket commits so the requested ticket history remains easy to review.
- Additional implementation notes and feature writeups are included under
docs/ - LF ticket quick summaries are documented in
docs/LF_Ticket_report.md - Overtime planning notes are documented in
docs/overtime_feature_plan.md - This submission intentionally works within the existing patterns of the chosen HRMS instead of rewriting the architecture