PLEN

Leave Management & Absence Tracking (SaaS)

Off-Work is a SaaS platform for managing employee holidays and absences. It lets companies handle leave requests, control balances, plan team availability, and monitor absences in one place. Employees use a self-service panel, while managers and HR have tools for approving requests, managing staff, and analysing data.

Next.jsTypeScriptMantine UIMongoDBBetter AuthResendRecharts

Business Goal

I am developing Off-Work as a commercial product for companies that want to streamline leave and absence management. The assumption is to create a universal platform offered to many organisations in a SaaS model, without the need to build a separate system for each client. The application was designed with flexible configuration of leave policies in mind, along with separation of each company's data and centralisation of the processes around planning and approving absences.

Technologies and implementation

Off-Work replaces spreadsheets and long e-mail threads with a single, central system for managing leave. As a multi-tenant SaaS platform, it supports many organisations within one application, with separate data, department structures, and leave policies. The application was built using Next.js 16 (App Router), TypeScript, and the Mantine component library. Authentication and access management are handled by Better Auth with the organization and admin plugins. Security is based on two stages of verification: an initial session cookie check in middleware and a full server-side session verification. Organisation data is properly separated, and access to protected resources is subject to additional control. MongoDB and Mongoose handle the storage and processing of application data, covering, among others, employees, departments, leave requests, and company closure days. Transactional messages are prepared in React Email and sent via Resend, while Mantine Charts and Recharts are used for data visualisation and for creating reports and analyses.

Employee Area (/me)

Manager & HR Area (/team)

Architecture and technical solutions:

  • Multi-tenant Architecture: Better Auth with the Organization plugin supports many companies within a single application, while keeping each organisation's data separate.
  • Access Verification: Two-step verification of the user's session and permissions protects access to the parts of the application that require signing in.
  • Application Structure and Permissions: Splitting the app into a public part, sign-in, and the employee and team panels makes the code easier to organise. Access to individual views depends on the user's role.
  • E-mail Notifications: React Email and Resend handle messages related to password resets, e-mail address verification, and notifications about leave requests.
  • Responsive Interface: Mantine UI, a light and dark theme, and a layout adapted to different screen sizes ensure comfortable use on computers, tablets, and phones.

Business Value

  • ✓Support for multiple organisations: A single instance of the application supports many companies, with separate employees, departments, leave policies, and data.
  • ✓Less administrative work: Automatic calculation of leave balances, inclusion of days off, and request handling in one system reduce the amount of manual work involved in planning leave.
  • ✓Better work planning: Team calendars and the manager panel make it easier to check employee availability, monitor absences, and plan team work.
  • ✓Access to data and statistics: Reports and charts help analyse leave usage, absences, and employment structure, supporting HR decisions.
  • ✓Access control and ease of development: User roles, session verification, and a modular code structure make access management and further application development easier.