Canonical documentation for Documents — the company's document engine: reusable templates, smart text merge fields, signatories, the employee documents people sign or acknowledge, and document policies.
Source of truth:
core-backend-servicesource (DocumentService.cs1,218 lines + 21 endpoints) plus a live pass (Playwright, "Pade Demo" tenant, 2026-07-20; screenshots).
Documents is a shared engine, not a leaf module. Two finished doc-sets depend on it:
DocumentTemplates of type Offer; the candidate's signature is captured through this engine.Start with surface-map.md.
| Doc | Audience | What it answers | Status |
|---|---|---|---|
| surface-map.md | Everyone | Inventory, entity graph, types, routes | ✅ Done 2026-07-20 |
| business.md | PMs, QA, Support, HR | What it is — templates, signing, policies | ✅ Done 2026-07-20 |
| technical.md | Engineers | Entities, statuses, sign/acknowledge, smart text | ✅ Done 2026-07-20 |
| configuration.md | Admins, Implementation | Creating templates, signatories, assignment | ✅ Done 2026-07-20 |
| glossary.md | Everyone | Data dictionary | ✅ Done 2026-07-20 |
| api-reference.md | Engineers | The 21-endpoint surface | ✅ Done 2026-07-20 |
| user-journey.md | PMs, UX, Support | Admin, new hire, existing employee journeys | ✅ Done 2026-07-20 |
| how-to.md | Admins | Create, approve, assign, recall documents | ✅ Done 2026-07-20 |
| knowledge-base.md | End users | FAQ — signing, acknowledging, finding documents | ✅ Done 2026-07-20 |
| runbook.md | On-call / Ops | Stuck assignments, signature failures | ✅ Done 2026-07-20 |
| onboarding.md | New engineers | Ramp into DocumentService |
✅ Done 2026-07-20 |
| rfds/ | Engineers | Design decisions | ✅ Done 2026-07-20 (3 records) |
A DocumentTemplate is a reusable document with Contents, an audience (IsForNewEmployees / IsForExistingEmployees), and a signature requirement. It comes in three types — Offer (powering Hiring), Employee document, and Company document (issued by PaidHR to the tenant, not authored by them). Templates carry their own approval workflow — In progress → Completed → Approved / Declined — before they can be used. Their text is composed with smart text merge fields, which are context-tagged (IsForOffer, IsForRequest, IsForOnboardingNote, IsForAnniversary, IsForHiring) so each editor offers only relevant fields. A company Signatory (one marked IsPrimary) signs on the company's behalf. Assigning a template to a person creates an EmployeeDocument; the employee then either Signs it (capturing Signature + ActionDate) or merely Acknowledges it (ActionDate only), depending on IsSignatureRequired. Admins can Recall an assignment. Separately, document policies define required documentation, and employees can raise document requests through the Requests engine.
Verified live: the route (/dashboard/documents, create at /dashboard/documents/new), the Employee / Company tab split, the section copy for Offer Templates, Employee Documents and Company Documents, and the create flow's two options.
Established: the create flow offers only Offer Template and Employee Document — Company documents cannot be created by a tenant. Live evidence: a "Pade HCM Service Level Agreement" sitting in the Company tab with status Ready and the copy "correspondences between your company and My Payroll as well as any government documents we file on behalf of your company." (RFD-002)
Directory caveat recorded: pages/dashboard/documents/ is a grab-bag holding assets/, company-details/, time-and-attendance/, reports/ and more. The module proper is documents/documents/. This is the source of the earlier Assets mis-inference that Assets sat under Documents in the nav — it does not. (RFD-003)
Service note: the documents list loaded from middleware-dev.paidhr.com/admin/documents/select, while core-backend also exposes Admin/Documents/*. Which surface serves which screen is not fully mapped — flagged rather than guessed.
Still ⚠️ VERIFY: the template editor / smart-text picker, the approve/decline workflow, signatory management, and the employee sign/acknowledge screens — all need either an authored template or an assigned document, i.e. writes to the shared demo tenant.