# Integrated HR Tool – Architecture

Based on: Working Hours & Holiday Management System – High Level Scope (IGF, Seedion, v1.0, 16 Feb 2026).

---

## 1. System boundaries

**In scope**

- Lightweight internal tool for working hours declaration and holiday management.
- Standalone application within IGF DIGITAL infrastructure.
- CRM used for authentication only; HR data in dedicated HR collections.
- Working hours declaration, holiday request/approval workflow, role-based dashboards, reporting/export, CRM authentication integration.

**Out of scope**

- Payroll processing, salary calculations, tax or labor law compliance automation.
- Performance management, real-time attendance tracking, expense management.

**Integration**

- Same CRM credentials; user records from existing CRM (e.g. admin/staff).
- Roles (Employee / Manager) derived from CRM data.
- HR data stored in separate HR collections in the same MongoDB instance.

---

## 2. Roles

- **Employee**
- **Manager**

Access to all functionality is controlled by the authenticated user’s role.

---

## 3. Responsibilities

### Employee

- View own monthly working hours calendar.
- For each working day: enter from/to times **or** set the number of hours directly.
- View daily and monthly total hours.
- Submit holiday requests.
- View status of own holiday requests (pending, approved, rejected).
- View annual holiday allowance, used days, and remaining balance.
- No visibility into other employees’ records.

### Manager

- View monthly working hour calendars and summaries for assigned team members.
- Review, approve, or reject holiday requests from assigned employees.
- Provide mandatory rejection reason when rejecting.
- View holiday balances for team members.
- Configure annual holiday allowances.
- Manage public holiday calendars.
- Export working hours and holiday reports (per employee and overall team).
- Cannot modify employee working hours (unless a future extension authorizes it).

---

## 4. Data entities

- **Working hours:** Daily entries (from time, to time, and/or number of hours; total hours derived or set); monthly cumulative totals; timestamped changes for audit.
- **Holiday request:** Start date, end date, optional comment, status (pending / approved / rejected), rejection reason when rejected; retained for reporting.
- **Employee:** Sourced from CRM; link to manager (assigned employees).
- **Holiday allowance:** Annual allowance, used days, remaining balance per employee.
- **Public holiday calendar:** Configurable by Manager.
- **Audit:** Timestamped log of changes to declared working hours.

---

## 5. Workflows

### Working hours declaration

- Calendar-based interface; standard days auto-pre-filled with default hours (e.g. 8h/day).
- Employee can, per working day: enter from/to times **or** set the number of hours; total hours are calculated when from/to are used, or taken as declared when hours are set directly.
- Monthly calendar shows daily entries and cumulative monthly totals.
- All declared hours stored for history and audit; changes timestamped and logged.
- Manager can view assigned employees’ daily entries and monthly summaries.

### Holiday request and approval

- Employee submits request: start date, end date, optional comment.
- Request has status: pending, approved, or rejected.
- Manager receives automatic email on submission.
- Manager approves or rejects; rejection requires mandatory reason.
- Employee notified by email when decision is made.
- Approved holidays shown in working hours calendar.
- All requests and decisions retained for reporting and reference.
