Audience: New engineers picking up Documents work. It's a shared engine — Hiring and onboarding depend on it, so changes ripple.


Mental model

Three nouns and two workflows:

Workflow A: template In progress → Completed → Approved/Declined. Workflow B: Assign → Sign/Acknowledge → (Recall).

The 20-minute tour

  1. DocumentModel.cs — DocumentTemplateTypeParams (Offer/Employee/Company), DocumentTemplateStatuParams (the 4 statuses), and the Sign/Acknowledge/Assignment models.
  2. DocumentTemplate.cs — note the two signature concepts: Signature/SignaturePersonId (company) vs the employee's on EmployeeDocument.
  3. SmartText.cs — the five IsFor* context booleans.
  4. Signatory.cs — IsPrimary, company-scoped.
  5. DocumentService.cs (1,218) — the core; find Approve/Decline, Assign/Recall, Sign/Acknowledge.
  6. Employee/DocumentsService.cs (106) — the thin employee side.
  7. Frontend: pages/dashboard/documents/documents/ (module proper) and employee-dashboard/documents/.

Where things live

You want to change… Go to
Template fields / lifecycle DocumentTemplate.cs, DocumentService.cs
Approve/decline Admin/DocumentsController (Approve/Decline), DocumentService
Assign/recall Admin/DocumentsController (Assign/Recall)
Sign/acknowledge Employee/DocumentsController, Employee/DocumentsService
Smart text SmartText.cs, editor under documents/documents/
Signatories Signatory.cs
Admin UI web-app/.../dashboard/documents/documents/*

Things that will trip you up

  1. pages/dashboard/documents/ is a grab-bag — it also holds assets/, company-details/, time-and-attendance/, reports/, custom-form/. The module proper is documents/documents/. Source location ≠ nav — this exact confusion put a wrong claim in the Assets docs. (RFD-003)