Skip to content

Part 3b โ€” Data Aggregation

Source of truth for design decisions: https://github.com/alan-eu/Topics/discussions/32979 โง‰

Where the code lives

All 3b query code lives under backend/components/payroll_tool/internal/business_logic/queries/data/.

Public entry points are exposed via backend/components/payroll_tool/public/api.py (added by Task 14 of the 3b implementation stack).

Implementation stack

The 3b implementation is split into 17 stacked PRs โ€” see Linear PAY-1839 for the parent and the full sub-task list (PAY-1840 โ†’ PAY-1856).

High-level layering (framing ยง3):

  • Layer A โ€” raw data: filter, join, group, aggregate, sort, paginate.
  • Layer B โ€” formatting: per-column rendering using FormatConfig.

Adjacent framings (context)

  • Part 1 / 1.5 โ€” scope and overall architecture.
  • Part 2 โ€” PayrollChange generation (model and pipeline).
  • Part 3a โ€” PayrollTemplate / PayrollColumnDefinition / interface contract.
  • Part 3c โ€” UI + export surface (consumes 3b's get_payroll_data).