E-Signatures
The E-Signatures app enables users to request electronic signatures on documents and track incoming signature requests. It supports a complete request lifecycle from pending through signed, declined, expired, or cancelled.
Key Features
Section titled “Key Features”- Send signature requests linked to documents with an optional message and expiration date
- Dual-view tabs — switch between “Sent” and “Received” requests on the same page
- Status tracking with color-coded badges (signed, pending, declined, cancelled, expired)
- Signed document storage with a dedicated
SignedDocumentrecord linking to the final signed file - IP address logging on signatures for audit purposes
Page Structure
Section titled “Page Structure”| Route | Purpose |
|---|---|
/business/apps/esignatures | Tabbed list of sent and received signature requests |
/business/apps/esignatures/new | Create a new signature request |
/business/apps/esignatures/[id] | Single request detail view |
Data Model Overview
Section titled “Data Model Overview”SignatureRequest
Section titled “SignatureRequest”The core entity linking a requester_id to a signer_id for a given document_id. Tracks status (pending, signed, declined, expired, cancelled), an optional message, and expires_at.
Signature
Section titled “Signature”Stores the actual signature data: the signature_image_path, signed_at timestamp, and the signer’s ip_address.
SignedDocument
Section titled “SignedDocument”References the final signed version of the document with its storage_path, linking back to both the request and original document.
Key Components
Section titled “Key Components”- Tab switcher — pill-style toggle between Sent and Received views, displaying counts for each
- Request cards — each card shows a truncated document ID, signer/requester ID, date, optional message (for received requests), and a status badge
- Status badge variants —
statusVariantfunction maps statuses to badge styles: default (signed), secondary (pending), destructive (declined/cancelled/expired) - Back navigation — arrow-left link to
/business/appsfor returning to the app index
Notable Integrations
Section titled “Notable Integrations”- Services:
listRequestsfrom$lib/apps/esignatures/services— called twice in parallel with"requester"and"signer"role parameters - Types:
SignatureRequestimported from$lib/apps/esignatures/types - Signing flow: Received requests link to
/sign/[id](a separate public-facing signing route outside the business app) - Database: Stored in a separate
ext_esignaturesschema