Payroll Technical Documentation
Summary
This section describes the source-confirmed architecture and technical boundaries of Payroll Service without duplicating API, database, event-contract, UI, operations, or troubleshooting reference material.
Audience
Backend and frontend developers, QA and DevOps engineers, support and security engineers, solution architects, and engineers onboarding to Payroll.
Overview
Technical scope
Payroll Service is a .NET 8 ASP.NET Core service for Payroll-owned periods, runs, workforce/input projections, calculation, reversible freeze, outputs, audit/timeline evidence, and integration events. It uses minimal APIs, direct scoped services, EF Core/PostgreSQL, a broker consumer, and Shared Kernel observability/messaging foundations.
Runtime responsibilities and dependencies
The service owns Payroll computation and records. It consumes Employee, Attendance, Leave, and Expense facts; maintains local advance-recovery state; generates payslip/PDF/CSV outputs; and publishes Payroll events through outbox records. Conceptual runtime dependencies are the gateway, PostgreSQL, integration broker, upstream event producers, Shared Kernel/Contracts, and Notification consumers.
Current maturity
Transitional. Native and compatibility surfaces coexist behind gateway-controlled cutover. Input backfill and parity tooling exist. Automatic outbound relay, service-local authorization, dependency readiness, Document Service storage, Workflow integration, payment execution, accounting posting, and formal Payroll .NET tests are incomplete or require confirmation.
Technical documentation map
- Payroll Service Architecture
- Payroll Service Responsibilities
- Payroll Project Structure
- Payroll Layered Architecture
- Payroll Domain Model
- Payroll Run Aggregate
- Payroll Period Model
- Payroll Workforce Projection
- Salary Component Model
- Earnings and Deductions Model
- Payroll Calculation Engine
- Attendance Input Boundary
- Leave Input Boundary
- Expense Input Boundary
- Advance Recovery Boundary
- Payroll Application Layer
- Payroll Infrastructure Layer
- Repository and Unit of Work
- Command and Query Flow
- Payroll Technical Validation
- Freeze and Unfreeze
- Payslip Generation
- Bank Export Foundation
- Payroll Tenant Context
- Payroll Gateway Interaction
- Messaging and Outbox
- Payroll Document Integration
- Payroll Notification Integration
- Payroll Workflow Boundary
- Payroll Dependency Injection
- Payroll Configuration
- Payroll Security Boundaries
- Payroll Observability
- Payroll Health Checks
- Payroll Performance Considerations
- Payroll Testing Architecture
- Payroll Known Limitations
- Payroll Future Evolution
Related documentation
- Payroll Business Documentation
- Future foundations: API, Database, Events, UI, Operations, Reference, and Troubleshooting
Source References
microservices/src/payroll-service/Program.csmicroservices/src/payroll-service/payroll-service.csprojmicroservices/src/payroll-service/Application/PayrollCalculationService.csmicroservices/src/payroll-service/Application/PayrollOutputsService.csmicroservices/src/payroll-service/Infrastructure/PayrollDbContext.csmicroservices/src/payroll-service/Messaging/PayrollReadModelConsumer.csmicroservices/src/gateway-api/Program.cs
Related Articles
See Also
Keywords
- Payroll Service
- Payroll Technical Documentation
- Technical architecture
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly