
Document Signer — Self-Hosted Contract Signer
Self-hosted, privacy-first document signing. Sign, send, and manage contracts with a full audit trail — all on your own infrastructure.
sha256:08e8801a…· 106.7 KBRecommended Stack
| Component | Role | Version | Notes |
|---|---|---|---|
| Next.js | Full-Stack Framework | >=14.0.0 | App Router provides server-side rendering for public signing pages, API routes for envelope CRUD, and built-in middleware for authentication. Monolith reduces deployment complexity vs. separate frontend/backend. |
| PostgreSQL | Primary Database | >=15.0 | Reliable ACID-compliant relational database for transactional envelope operations. JSONB columns for flexible field configuration. Native UUID support for signing IDs. |
| Prisma | ORM & Migrations | >=5.0 | Type-safe database access with auto-generated migrations. Declarative schema maps directly to envelope/recipient/document/field/audit data model. Supports PostgreSQL JSONB and enums. |
| Redis | Job Queue & Caching | >=7.0 | In-memory data store for BullMQ job queue (email delivery, reminders, document processing). Also caches rendered PDF thumbnails and template previews. |
| BullMQ | Background Job Processor | >=5.0 | Redis-backed job queue with scheduling, retries, rate limiting, and delayed jobs. Handles email delivery, automatic reminders, envelope expiration, and document processing without blocking API responses. |
| pdf-lib | PDF Manipulation | >=1.17.0 | Client-side and server-side PDF manipulation library. Places signature fields, text fields, and checkboxes onto PDF documents. Generates Certificate of Completion PDFs. No external PDF service needed. |
| pdfjs-dist | PDF Rendering & Preview | >=4.0.0 | Mozilla's PDF.js renders PDF pages in the browser for document preview and field placement. Provides zoom, page navigation, and text layer extraction. |
| MinIO | S3-Compatible Object Storage | latest | Self-hosted S3-compatible storage for uploaded documents and signed PDFs. Documents never leave customer infrastructure. Compatible with AWS SDK S3 client. |
| Tailwind CSS | Styling System | >=4.0 | Utility-first CSS framework for rapid UI development. Consistent design system with dark/light mode support. shadcn/ui components built on Tailwind. |
| shadcn/ui | Component Library | latest | Copy-paste component library built on Radix UI primitives. Provides accessible dialog, dropdown, form, tooltip, and toast components. Customizable via Tailwind CSS variables. |
| Nodemailer | Email Delivery | latest | SMTP email client for sending signing invitations, reminders, and completion notifications. Supports HTML templates with embedded signing links. |
| Zustand | State Management | latest | Lightweight client-side state for envelope builder UI, field placement tool state, and document preview interactions. |
| React Hook Form + Zod | Form Validation | latest | Performant form handling with schema-based validation. Used for envelope creation forms, recipient configuration, template editor, and settings panels. |
| Lucide React | Vector Icon Set | latest | Consistent iconography for document actions, signing states, field types, and navigation. Tree-shakeable, no icon bloat. |
| Sonner | Toast Notifications | latest | Lightweight toast system for envelope status updates, error states, and success confirmations. |
Requirements
| API Key | Purpose | Free Tier |
|---|---|---|
| SendGrid | SMTP Delivery** — Bring your own SMTP server (SendGrid, Mailgun, Postmark, or self-hosted). | ✓ |
| Postmark | SMTP Delivery** — Bring your own SMTP server (SendGrid, Mailgun, Postmark, or self-hosted). | ✓ |
| Twilio | SMS OTP Verification** — Optional Twilio-based phone verification. | ✓ |
| Mailgun | SMTP Delivery** — Bring your own SMTP server (SendGrid, Mailgun, Postmark, or self-hosted). | ✓ |
| AWS S3 | Documents are stored in object storage (S3-compatible) with a unique key | ✓ |
External Services
- PostgreSQLself-hostable
- MySQLself-hostable
- SQLiteself-hostable
- MongoDBself-hostable
- Redisself-hostable
- Dockerself-hostable
- MinIOself-hostable
Platform Notes
- •Requires Docker and Docker Compose
Data Model
users
Application users — admins and members who create and manage envelopes.
envelopes
Document signing envelopes — the core entity that groups documents, recipients, and fields for a signing workflow.
documents
Documents attached to an envelope. Each document is a PDF (converted on upload) stored in S3-compatible storage.
recipients
Signing recipients for an envelope. Each recipient has a signing order and authentication settings.
fields
Signature and data fields placed on document pages for recipients to fill.
audit_events
Immutable audit log of every action in the envelope lifecycle. Used for Certificate of Completion generation.
templates
Reusable document templates with pre-placed fields. Templates can be cloned into new envelopes.
webhooks
Webhook endpoints that receive real-time envelope event notifications.
api_keys
API keys for programmatic envelope access via the REST API.
settings
Application-wide configuration including SMTP settings, branding, and feature flags.
External Dependencies
- 🔴smtp serverserviceRequired
Email delivery for signing invitations, reminders, and notifications. Any SMTP provider works: SendGrid, Mailgun, Postmark, or self-hosted.
- 🔴dockerinfrastructureRequired
Containerized deployment via Docker Compose with PostgreSQL, Redis, and MinIO services.
- 🔴postgresqlinfrastructureRequired
Primary database for envelopes, recipients, documents, fields, audit events, templates, and user data.
- 🔴redisinfrastructureRequired
Job queue backend for BullMQ — handles email delivery, reminders, expiration, and document processing jobs.
- 🔴s3-compatible storageinfrastructureRequired
Document file storage. MinIO is the default (self-hosted), but any S3-compatible provider works.
- 🟡twilio (optional)serviceOptional
SMS OTP verification for signer authentication. Optional — email-only mode works without it.
Tags
Details
- Category
- developer-tools
- Difficulty
- high
- Version
- 1.1.1
- Published
- 6/16/2026
Related Blueprints
Coming soon...