Complete inventory of the Documents subsystem — reusable templates, smart text merge fields, signatories, the employee documents employees sign or acknowledge, and document policies.
Source of truth:
core-backend-servicesource plus a live pass (Playwright, "Pade Demo" tenant, 2026-07-20; screenshots).
Documents is a shared engine — Hiring offer letters are DocumentTemplates of type Offer, and onboarding uses the same sign/acknowledge flow.
| Service | Lines | Role |
|---|---|---|
DocumentService.cs |
1,218 | Core domain — templates, smart text, signatories, employee documents |
AdminDocumentsService.cs |
317 | Admin orchestration |
Employee/DocumentsService.cs |
106 | Employee self-service — sign / acknowledge |
| Total | 1,641 |
| Controller | Endpoints | Surface |
|---|---|---|
Admin/DocumentsController |
15 | View/Templates, Select, GetTemplate, Get, CheckTemplate, Add, Add_Document, Delete, Restore, Remove, Approve, Decline, Rename, Assign, Recall |
Employee/DocumentsController |
4 | Select, Sign, Acknowledge, Get |
DocumentsController |
2 | View/Download_Template, View/Download |
CompanyId-scoped)DocumentTemplateType ──< DocumentTemplate >── DocumentTemplateStatus
│
├─ Signatory (SignaturePersonId)
└─< EmployeeDocument >── Person
SmartText (merge fields, context-tagged)
DocumentPolicy ──< DocumentPolicyItem ──> PolicyType
| Entity | Purpose | Key fields |
|---|---|---|
DocumentTemplate |
A reusable document | DocumentTemplateTypeId, Description, Alias, Contents, DocumentTemplateStatusId, SignaturePersonId, Signature, SignatureDate, FileDate, IsDefault, IsForNewEmployees, IsForExistingEmployees, IsSignatureRequired, ReviewDate, Url |
EmployeeDocument |
A template issued to a person | PersonId, DocumentTemplateId, Signature, ActionDate |
SmartText |
A merge field | Description, Alias, IsForOffer, IsForRequest, IsForOnboardingNote, IsForAnniversary, IsForHiring |
Signatory |
Who signs on the company's behalf | PersonId, IsPrimary, CompanyId |
DocumentPolicy |
A policy document | Description, Alias, Contents, IsEmployeeEnabled, PolicyTypeId • items |
| Views | ViewDocumentTemplate, ViewEmployeeDocument, ViewSignatory, ViewDocumentPolicyItem |
Read models |
DocumentTemplateTypeParams)| Type | Int | Who creates it |
|---|---|---|
| Offer | 1 | Admin — powers Hiring offer letters |
| Employee document | 2 | Admin — issued to employees to sign/acknowledge |
| Company document | 3 | PaidHR, not the tenant — correspondence to the company (§4) |
DocumentTemplateStatuParams)In progress (1) → Completed (2) → Approved (3) / Declined (4)
Templates go through their own approval workflow before use (Admin/Documents/Approve · Decline).
| Screen | Route |
|---|---|
| Documents | /dashboard/documents |
| Create new document | /dashboard/documents/new |
Sidebar: PEOPLE → Documents. Two tabs: