Audience: Backend engineers, DBAs, integration engineers — anyone who needs to reason about how People & Org Structure is implemented, what PersonService (16,942 lines, the largest service in the codebase) actually does, how the org chart is materialised, and how admin tiers + cross-account managers work.

Companion: business.md for product/PM/QA. Onboarding and Payroll for cross-cutting concerns.

Source of truth. Every fact below was derived from reading actual code:

Items needing operational confirmation are marked ⚠️ VERIFY.


Table of Contents

  1. Architectural shape
  2. Two databases — what lives where for People
  3. ER — Person and its satellites
  4. ER — Org structure (Department, Title, Workplace, Manager, OrgChart)
  5. ER — Lifecycle entities (Exit, Suspension, Log, PaygradeHistory)
  6. State machines
  7. Person creation algorithm — CreatePerson
  8. MultiCreatePerson and CreateAdmin differences
  9. Bulk import algorithm — BulkCreatePerson, BulkUpdatePerson
  10. Update flows — UpdatePerson, UpdatePersonPartial, UpdatePersonPartial_Ess
  11. Self-onboarding — SelfOnboardPerson, CancelSelfOnboarding
  12. Review and Confirm — ReviewPerson, BulkReviewPerson, ConfirmPerson, BulkConfirmPerson
  13. Suspension lifecycle implementation
  14. Exit lifecycle implementation
  15. Rehire — RehirePerson