Enterprise HR vacation readiness platform for evaluating employee leave preparation with explicit business rules, role-based access, and production-quality engineering practices.
TimeReady is an enterprise HR vacation readiness platform that helps HR teams determine whether an employee is prepared to take leave โ before problems surface on the first day of absence.
The application stores the facts that matter for vacation preparation (time balance, remaining days, manager notification, handover status), evaluates them through a rule-based decision engine, and surfaces actionable findings. It is built as a portfolio project to demonstrate production-quality architecture, clean code, automated testing, and CI/CD โ the kind of engineering practices expected in regulated, enterprise software environments.
| Problem | Vacation readiness checks scattered across spreadsheets, email, and tribal knowledge |
| Solution | Centralized employee data, explicit readiness rules, and role-aware access |
| Audience | HR operators and administrators โ not a self-service employee portal |
| Repository | github.com/mahbejam/TimeReady |
Try the interactive TimeReady portfolio demo. It is a static GitHub Pages experience with simulated sample data, working time tracking, filters, and browser-local persistence โ it is not connected to a live backend.
This repository still contains the real full-stack application: the ASP.NET Core API, Angular frontend, PostgreSQL integration, automated tests, and Docker Compose setup. The GitHub Pages site is an isolated demonstration of the product experience in docs/index.html and does not replace or modify those application layers.
- Employee management โ Create, read, update, and delete employee records with the fields required for readiness evaluation
- Rule-based readiness engine โ Evaluates time balance, vacation timing, manager notification, and handover status through explicit, configurable thresholds
- Readiness findings โ Returns blocking, warning, and informational findings with stable rule codes for explainability
- Dashboard and notifications โ Angular UI surfaces readiness status and follow-up items at a glance
- JWT authentication โ Access tokens with configurable lifetime and refresh-token rotation
- Role-based authorization โ Admin and Operator roles with policy-based endpoint protection
- Authenticated-by-default API โ Endpoints require authentication unless explicitly marked anonymous
- Account lockout โ Brute-force protection via ASP.NET Core Identity lockout settings
- Security headers middleware โ Hardened HTTP response headers on every request
- Rate limiting โ Fixed-window rate limiting per client IP address
- Append-only audit trail โ Every data change captured through an EF Core save-changes interceptor
- Audit search and filtering โ Admin-only query endpoints with validation
- Audit retention and archiving โ Configurable retention policy with background processing, archive storage, and health monitoring
- REST API โ ASP.NET Core 9 with API versioning, OpenAPI/Swagger (Development), and Problem Details error responses
- Structured logging โ Serilog with console and rolling file sinks
- Health checks โ Liveness, readiness, and background-service probes for orchestrators
- Docker Compose stack โ One-command deployment of PostgreSQL, API, and web frontend
- Database migrations and seed data โ EF Core migrations applied on startup with demo employees and accounts
- Automated test suites โ 78 backend tests (unit + integration) and 38 frontend tests, validated on every push via GitHub Actions
TimeReady follows a layered architecture with clear separation between presentation, application logic, domain rules, and infrastructure concerns.
Presentation
โ
Application
โ
Domain
โ
Infrastructure
| Layer | Responsibility | Implementation |
|---|---|---|
| Presentation | HTTP endpoints, request validation, auth policies | ASP.NET Core controllers, FluentValidation, Angular standalone components |
| Application | Use-case orchestration, DTO mapping, auth services | Services, repositories, mapping extensions |
| Domain | Business rules, readiness evaluation, audit models | IReadinessService, rule engine, domain entities |
| Infrastructure | Persistence, identity, logging, background jobs | EF Core + PostgreSQL, Identity, Serilog, hosted services |
- Separation of concerns โ The readiness rule engine has no dependency on HTTP or the database; it accepts domain input and returns a result
- SOLID โ Interfaces for services and repositories; configuration bound through strongly typed options with startup validation
- Dependency injection โ Constructor injection throughout;
TimeProviderinjected for testable date logic - Testability โ Unit tests for rules and services; integration tests boot the real API against throwaway PostgreSQL databases via
WebApplicationFactory - Maintainability โ Extension methods group service registration; controllers stay thin; validation lives in dedicated FluentValidation classes
- Scalability โ Stateless API design, connection pooling, rate limiting, and health probes suitable for container orchestration
flowchart TB
UI["Angular UI"]
API["ASP.NET Core API"]
Rules["IReadinessService<br/>rule engine"]
Repos["EF Core repositories"]
DB[(PostgreSQL)]
Audit["Audit interceptor"]
UI -->|"JWT / JSON"| API
API --> Rules
API --> Repos
Repos --> Audit --> DB
Further detail: docs/architecture.md ยท docs/decisions.md
| Technology | Purpose |
|---|---|
| ASP.NET Core 9 | REST API host |
| ASP.NET Core Identity | User and role management |
| JWT Bearer authentication | Stateless access tokens |
| Entity Framework Core 9 | ORM and migrations |
| FluentValidation | Request validation |
| Serilog | Structured logging |
| Swashbuckle | OpenAPI / Swagger documentation |
| Asp.Versioning | Header, query, and media-type API versioning |
| Technology | Purpose |
|---|---|
| Angular 20 | Standalone components, routing, forms |
| Angular Material | Enterprise UI components |
| RxJS | Reactive state and HTTP |
| Vitest | Unit testing |
| Technology | Purpose |
|---|---|
| PostgreSQL 17 | Primary data store |
| Npgsql | .NET database provider |
| EF Core migrations | Schema versioning |
| Technology | Purpose |
|---|---|
| xUnit | Backend test framework |
| WebApplicationFactory | Integration tests against real API host |
| Vitest + jsdom | Frontend unit tests |
| Technology | Purpose |
|---|---|
| GitHub Actions | Continuous integration on push and pull request |
| Docker Compose | Local and production-shaped container stacks |
| Docker multi-stage builds | API and frontend container images |
TimeReady/
โโโ .github/
โ โโโ workflows/
โ โโโ ci.yml # GitHub Actions CI pipeline
โโโ backend/
โ โโโ TimeReady.Api/
โ โ โโโ Authorization/ # Roles and policy constants
โ โ โโโ Configuration/ # Strongly typed options classes
โ โ โโโ Controllers/ # REST API endpoints
โ โ โโโ Data/
โ โ โ โโโ Auditing/ # Save-changes audit interceptor
โ โ โ โโโ Configurations/ # EF Core entity configurations
โ โ โ โโโ Repositories/ # Data access abstractions
โ โ โ โโโ Seeding/ # Identity and demo data seeders
โ โ โโโ Dtos/ # Request and response models
โ โ โโโ Extensions/ # Service registration and middleware
โ โ โโโ Infrastructure/ # Background services, health checks
โ โ โโโ Migrations/ # EF Core database migrations
โ โ โโโ Models/ # Domain and identity entities
โ โ โโโ Services/ # Application and domain services
โ โ โโโ Validation/ # FluentValidation rules and filter
โ โโโ TimeReady.Tests/
โ โโโ Integration/ # API integration tests
โ โโโ Unit/ # Service and rule unit tests
โโโ frontend/
โ โโโ src/
โ โโโ app/
โ โโโ core/ # Auth, services, state, models
โ โโโ features/ # Dashboard, employees, audit, auth
โ โโโ shared/ # Reusable UI components
โโโ docs/ # Product, architecture, security, API
โโโ docker-compose.yml # Production-shaped stack
โโโ docker-compose.override.yml # Local development conveniences
โโโ CONTRIBUTING.md
โโโ SECURITY.md
โโโ README.md
TimeReady uses JWT bearer authentication with role-based authorization.
- Client submits credentials to
POST /api/auth/login - Server validates credentials via ASP.NET Core Identity and returns an access token and refresh token
- Client sends the access token in the
Authorization: Bearerheader on subsequent requests - Refresh tokens rotate on
POST /api/auth/refresh; logout revokes the refresh token
| Role | Capabilities |
|---|---|
| Admin | Full access โ create/delete employees, read audit trail, manage retention |
| Operator | Day-to-day HR work โ read employees, update preparation flags, view readiness |
Authorization is enforced through named policies (employees:read, employees:update, employees:manage, audit:read) rather than hard-coded role checks in controllers. The API defaults to requiring an authenticated user on every endpoint unless explicitly marked [AllowAnonymous].
The Angular frontend mirrors these roles with route guards and conditional UI visibility.
Further detail: docs/security.md
TimeReady maintains automated test coverage across both backend and frontend, validated on every push to main.
Isolated tests for business logic without external dependencies:
- Readiness rule engine (
IReadinessService) - Token and refresh-token services
- Audit save-changes interceptor
- Audit retention service and monitor
Full-stack tests that boot the real ASP.NET Core application via WebApplicationFactory against throwaway PostgreSQL databases:
- Authentication (login, refresh, logout,
/me) - Employee CRUD with role enforcement
- Readiness evaluation endpoints
- Audit search and retention endpoints
Every push and pull request triggers the CI workflow, which:
- Builds and runs 78 backend tests against a PostgreSQL service container
- Runs 38 frontend unit tests and verifies the production build succeeds
- Uploads test result artifacts for inspection
| Suite | Tests | Scope |
|---|---|---|
| Backend unit | 39 | Rules, services, interceptors |
| Backend integration | 39 | Real API + PostgreSQL |
| Frontend unit | 38 | Auth, guards, interceptors, state |
Further detail: docs/testing.md
The GitHub Actions workflow (.github/workflows/ci.yml) runs on every push and pull request to main.
- Start PostgreSQL 17 as a service container
- Restore and build the .NET solution (Release configuration)
- Run all backend tests with integration-test environment variables
- Upload TRX test result artifacts
- Install dependencies with
npm ci - Run Vitest unit tests
- Verify the production Angular build completes successfully
Both jobs run in parallel. A green CI run confirms the full stack builds, all 116 automated tests pass, and the frontend compiles for production deployment.
- Docker Desktop (recommended), or
- .NET SDK 9.0, Node.js 20+, and PostgreSQL 17
git clone https://github.com/mahbejam/TimeReady.git
cd TimeReady
docker compose up --build| Service | URL |
|---|---|
| Application | http://localhost:4200 |
| API | http://localhost:5080 |
| Swagger UI | http://localhost:5080/swagger |
| API health | http://localhost:5080/health |
docker compose up -d db # or use your own PostgreSQL instance
cd backend/TimeReady.Api && dotnet run # http://localhost:5080
cd frontend && npm ci && npm start # http://localhost:4200docker compose up -d db
cd backend && dotnet test
cd ../frontend && npm test| Account | Role | Password |
|---|---|---|
admin@timeready.local |
Admin | Admin#Demo2026 |
operator@timeready.local |
Operator | Operator#Demo2026 |
Demo credentials only. Change all passwords before any shared or internet-facing deployment.
Further detail: CONTRIBUTING.md
TimeReady is intentionally scoped as an enterprise software engineering demonstration, not a feature-maximal product.
The goal is to show how a real-world HR tool can be built with the discipline expected in regulated industries โ pharmaceutical, industrial automation, financial services, and large-scale SaaS โ where correctness, traceability, and maintainability matter more than surface-level complexity.
This project prioritizes:
- Clean architecture โ Business rules isolated from infrastructure; dependencies point inward
- Maintainability โ Readable code, grouped registrations, XML documentation, and structured docs
- Production-ready practices โ Health probes, structured logging, rate limiting, security headers, configuration validation at startup
- Software craftsmanship โ Explicit rule codes instead of opaque scoring; policy-based authorization instead of scattered role checks; reproducible date logic via injected
TimeProvider - Scalability โ Stateless API, container-ready deployment, and separation that allows independent scaling of UI, API, and database tiers
Features that would add complexity without demonstrating engineering judgment โ payroll integration, calendar sync, multi-tenancy, machine learning โ are deliberately out of scope.
TimeReady exists as a public portfolio project by mahbejam to demonstrate end-to-end full-stack delivery for enterprise hiring teams.
It answers the questions reviewers typically ask:
- Can this engineer design a coherent architecture with clear boundaries?
- Do they write testable, maintainable code with appropriate abstractions?
- Do they understand security fundamentals โ authentication, authorization, audit trails?
- Can they deliver a working product with CI/CD, Docker, documentation, and honest scope?
The repository is structured so a reviewer can clone, run, sign in, and evaluate the engineering quality within minutes โ without reverse-engineering the codebase.
Realistic enhancements that build on the current architecture without changing its core design:
- HttpOnly cookie storage for refresh tokens instead of client-side session storage
- Retention status screen in the Angular UI
- Natural-language summary of readiness findings (rules remain the source of truth)
- Per-manager filtered views within the existing single-tenant model
- OpenTelemetry distributed tracing for production observability
- GitHub Actions deployment workflow for container registry publish
MIT โ see LICENSE.
Copyright (c) 2026 mahbejam.