# abd-mjahdi/employee-hr-management-system architecture

> Architecture diagram of the GitHub repository abd-mjahdi/employee-hr-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abd-mjahdi/employee-hr-management-system
- Repository: https://github.com/abd-mjahdi/employee-hr-management-system

## Overview

This is an Angular, tenant-aware workforce management frontend. Users select a company-specific entry point, authenticate, then use role-gated screens for time and leave tracking, team approvals, people and project administration, and reports; feature services exchange data with a backend API. The graph covers the principal product domains and shared tenant/auth layers. Several feature files and the README were not provided, so links for those areas rely on the route excerpt or SOURCE INDEX rather than inspected implementation.

Main entry points: [`frontend/src/app/app.routes.ts`](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/app.routes.ts) (Application routes), [`frontend/src/app/core/tenant/tenant.service.ts`](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/tenant/tenant.service.ts) (Tenant resolution), [`frontend/src/app/core/services/auth.service.ts`](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/auth.service.ts) (Authentication), [`frontend/src/app/core/services/time-entry.service.ts`](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/time-entry.service.ts) (Time entry API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and access"]
  node_routes["Application routes<br/>[app.routes.ts]"]
  node_authui["Login and invites"]
end

subgraph group_shared["Shared application services"]
  node_tenant["Tenant resolution<br/>[tenant.service.ts]"]
  node_tenantutil["Tenant URL utilities<br/>[tenant.util.ts]"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_guards["Route access guards"]
  node_interceptor["Auth interceptor"]
  node_models["Domain data models"]
end

subgraph group_workforce["Workforce operations"]
  node_dashboard["Dashboard"]
  node_timescreens["Time entry and review screens"]
  node_timeservice["Time entry API client"]
  node_leavescreens["Leave request screens"]
  node_leaveservice["Leave request API client"]
end

subgraph group_management["People and projects"]
  node_userscreens["People administration"]
  node_userservice["User API client<br/>[user.service.ts]"]
  node_departments["Department management"]
  node_projects["Project management<br/>[project.service.ts]"]
end

subgraph group_insights["Reporting"]
  node_reportscreens["Reports"]
  node_reportservice["Reporting API client<br/>[report.service.ts]"]
end

node_employee(("Employee or admin"))
node_backend["Tenant backend API"]

node_employee -->|"uses"| node_routes
node_routes -->|"routes to"| node_authui
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_timescreens
node_routes -->|"routes to"| node_leavescreens
node_routes -->|"routes to"| node_userscreens
node_routes -->|"routes to"| node_reportscreens
node_routes -->|"applies guards"| node_guards
node_authui -->|"authenticates"| node_auth
node_auth -->|"uses tenant"| node_tenant
node_tenant -->|"resolves host"| node_tenantutil
node_guards -->|"checks session"| node_auth
node_interceptor -->|"reads token"| node_auth
node_auth -->|"sends auth requests"| node_backend
node_dashboard -.->|"loads dashboard"| node_backend
node_timescreens -->|"uses"| node_timeservice
node_timeservice -->|"builds tenant URLs"| node_tenant
node_timeservice -->|"sends time requests"| node_backend
node_leavescreens -->|"uses"| node_leaveservice
node_leaveservice -->|"builds tenant URLs"| node_tenant
node_leaveservice -->|"sends leave requests"| node_backend
node_userscreens -->|"uses"| node_userservice
node_userservice -->|"builds tenant URLs"| node_tenant
node_userservice -->|"sends user requests"| node_backend
node_departments -->|"builds tenant URLs"| node_tenant
node_departments -->|"sends department requests"| node_backend
node_projects -->|"builds tenant URLs"| node_tenant
node_projects -->|"sends project requests"| node_backend
node_reportscreens -.->|"uses reports"| node_reportservice
node_reportservice -->|"builds tenant URLs"| node_tenant
node_reportservice -->|"sends report requests"| node_backend

click node_routes "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/app.routes.ts"
click node_authui "https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/features/auth"
click node_tenant "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/tenant/tenant.service.ts"
click node_tenantutil "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/tenant/tenant.util.ts"
click node_auth "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/auth.service.ts"
click node_guards "https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/core/guards"
click node_interceptor "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/interceptors/auth.interceptor.ts"
click node_models "https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/core/models"
click node_dashboard "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/features/dashboard/dashboard-landing.component.ts"
click node_timescreens "https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/features/time"
click node_timeservice "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/time-entry.service.ts"
click node_leavescreens "https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/features/leave"
click node_leaveservice "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/leave-request.service.ts"
click node_userscreens "https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/features/users"
click node_userservice "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/user.service.ts"
click node_departments "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/department.service.ts"
click node_projects "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/project.service.ts"
click node_reportscreens "https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/features/reports"
click node_reportservice "https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/report.service.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_routes,node_authui toneBlue
class node_tenant,node_tenantutil,node_auth,node_guards,node_interceptor,node_models toneAmber
class node_dashboard,node_timescreens,node_timeservice,node_leavescreens,node_leaveservice,node_backend toneMint
class node_userscreens,node_userservice,node_departments,node_projects toneRose
class node_reportscreens,node_reportservice,node_employee toneIndigo
```

## Components

### Entry and access

- [Application routes](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/app.routes.ts): `frontend/src/app/app.routes.ts`
- [Login and invites](https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/features/auth): `frontend/src/app/features/auth`

### Shared application services

- [Tenant resolution](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/tenant/tenant.service.ts): `frontend/src/app/core/tenant/tenant.service.ts`
- [Tenant URL utilities](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/tenant/tenant.util.ts): `frontend/src/app/core/tenant/tenant.util.ts`
- [Authentication](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/auth.service.ts): `frontend/src/app/core/services/auth.service.ts`
- [Route access guards](https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/core/guards): `frontend/src/app/core/guards`
- [Auth interceptor](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/interceptors/auth.interceptor.ts): `frontend/src/app/core/interceptors/auth.interceptor.ts`
- [Domain data models](https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/core/models): `frontend/src/app/core/models`

### Workforce operations

- [Dashboard](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/features/dashboard/dashboard-landing.component.ts): `frontend/src/app/features/dashboard/dashboard-landing.component.ts`
- [Time entry and review screens](https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/features/time): `frontend/src/app/features/time`
- [Time entry API client](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/time-entry.service.ts): `frontend/src/app/core/services/time-entry.service.ts`
- [Leave request screens](https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/features/leave): `frontend/src/app/features/leave`
- [Leave request API client](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/leave-request.service.ts): `frontend/src/app/core/services/leave-request.service.ts`

### People and projects

- [People administration](https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/features/users): `frontend/src/app/features/users`
- [User API client](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/user.service.ts): `frontend/src/app/core/services/user.service.ts`
- [Department management](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/department.service.ts): `frontend/src/app/core/services/department.service.ts`
- [Project management](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/project.service.ts): `frontend/src/app/core/services/project.service.ts`

### Reporting

- [Reports](https://github.com/abd-mjahdi/employee-hr-management-system/tree/main/frontend/src/app/features/reports): `frontend/src/app/features/reports`
- [Reporting API client](https://github.com/abd-mjahdi/employee-hr-management-system/blob/main/frontend/src/app/core/services/report.service.ts): `frontend/src/app/core/services/report.service.ts`

### Other components

- **Employee or admin**
- **Tenant backend API**

## Connections

- Employee or admin → Application routes: uses (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → Login and invites: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → Dashboard: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → Time entry and review screens: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → Leave request screens: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → People administration: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → Reports: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Application routes → Route access guards: applies guards (evidence: `frontend/src/app/app.routes.ts`)
- Login and invites → Authentication: authenticates (evidence: `frontend/src/app/features/auth/login.component.ts`)
- Authentication → Tenant resolution: uses tenant (evidence: `frontend/src/app/core/services/auth.service.ts`)
- Tenant resolution → Tenant URL utilities: resolves host (evidence: `frontend/src/app/core/tenant/tenant.service.ts`)
- Route access guards → Authentication: checks session (evidence: `frontend/src/app/core/guards/auth.guard.ts`)
- Auth interceptor → Authentication: reads token (evidence: `frontend/src/app/core/interceptors/auth.interceptor.ts`)
- Authentication → Tenant backend API: sends auth requests (evidence: `frontend/src/app/core/services/auth.service.ts`)
- Dashboard → Tenant backend API: loads dashboard
- Time entry and review screens → Time entry API client: uses (evidence: `frontend/src/app/features/time/time-form.component.ts`)
- Time entry API client → Tenant resolution: builds tenant URLs (evidence: `frontend/src/app/core/services/time-entry.service.ts`)
- Time entry API client → Tenant backend API: sends time requests (evidence: `frontend/src/app/core/services/time-entry.service.ts`)
- Leave request screens → Leave request API client: uses (evidence: `frontend/src/app/features/leave/leave-approvals.component.ts`)
- Leave request API client → Tenant resolution: builds tenant URLs (evidence: `frontend/src/app/core/services/leave-request.service.ts`)
- Leave request API client → Tenant backend API: sends leave requests (evidence: `frontend/src/app/core/services/leave-request.service.ts`)
- People administration → User API client: uses (evidence: `frontend/src/app/features/users/user-detail.component.ts`)
- User API client → Tenant resolution: builds tenant URLs (evidence: `frontend/src/app/core/services/user.service.ts`)
- User API client → Tenant backend API: sends user requests (evidence: `frontend/src/app/core/services/user.service.ts`)
- Department management → Tenant resolution: builds tenant URLs (evidence: `frontend/src/app/core/services/department.service.ts`)
- Department management → Tenant backend API: sends department requests (evidence: `frontend/src/app/core/services/department.service.ts`)
- Project management → Tenant resolution: builds tenant URLs (evidence: `frontend/src/app/core/services/project.service.ts`)
- Project management → Tenant backend API: sends project requests (evidence: `frontend/src/app/core/services/project.service.ts`)
- Reports → Reporting API client: uses reports (evidence: `frontend/src/app/features/reports/leave-balances-report.component.ts`)
- Reporting API client → Tenant resolution: builds tenant URLs (evidence: `frontend/src/app/core/services/report.service.ts`)
- Reporting API client → Tenant backend API: sends report requests (evidence: `frontend/src/app/core/services/report.service.ts`)
