DocuSign
Dormant — not wired into any runtime path (verified 2026-06-12). The API client (
backend/src/lib/docusign-client.ts) exists with unit tests, and the signature tables remain inschema.ts, but no service or route imports the client and nothing writes the tables at runtime. The client was last touched in PR#591 (2025-12-09). DocuSign appears in live features only as an external-service link: portal flow steps of typedocusignrender an “Open in DocuSign” button (external_servicestep type alongside KfW and Calendly —backend/src/routes/flow-definitions.ts,frontend/src/types/portal.ts).
What Exists in the Codebase
| Component | Path | Status |
|---|---|---|
| API client | backend/src/lib/docusign-client.ts | Dormant — zero non-test importers |
| Client tests | backend/src/test/lib/docusign-client.test.ts | Passing unit tests |
| Schema tables | signature_requests, signed_documents, signed_documents_metadata | Present, no runtime writers |
| Portal flow step | external_service step type docusign | Live — external link only, no API call |
Earlier descriptions of backend/src/services/docusign-service.ts, backend/src/routes/docusign/, DB-stored encrypted OAuth tokens, and webhook status updates do not match the code — those components were never built.
Authentication (as implemented in the client)
JWT grant OAuth 2.0 (not authorization-code): the client requests tokens with a private key, no tokens are persisted. Configuration via environment variables:
| Variable | Purpose |
|---|---|
DOCUSIGN_INTEGRATION_KEY | App integration key |
DOCUSIGN_USER_ID | Impersonated API user |
DOCUSIGN_ACCOUNT_ID | DocuSign account |
DOCUSIGN_PRIVATE_KEY | RSA key for the JWT grant |
DOCUSIGN_BASE_PATH | API base (defaults to the demo environment) |
DOCUSIGN_OAUTH_BASE_PATH | OAuth base (defaults to account-d.docusign.com) |
Intended Capability (if revived)
The client implements envelope creation/sending (documents as base64, signers with sign-here tabs) and status mapping to SignatureStatusEnum from @shared/types. The schema links signature_requests to users, buildings, and dataverse_imports — a Dataverse-era design that would need rework against the current contact/file conventions (contact FKs, CAS fileId) before going live.
Related
- Dataverse — the era this integration was designed in
- Portal — flow steps linking out to DocuSign
- External Integrations — Integration overview