I was the backend engineer responsible for building this leave management module from the ground up. The challenge was creating a system flexible enough to handle different leave policies across organizations while maintaining accuracy in leave balance calculations and accruals.
I designed the database schema using Entity Framework Core with Fluent API to handle complex relationships between employees, leave types, policies, and approvals. I built the leave accrual engine that automatically calculates leave balances based on configurable policies—some organizations accrue monthly, others annually, some pro-rate for new employees.
The system integrates with our approval workflow engine, meaning leave requests automatically route through the right approval chains. I also implemented temporal tables to track complete leave history, crucial for audits and disputes.