Build your own DocuSign alternative
You can build your own DocuSign dupe: upload a PDF, add signers, email each one a link, and let them sign inside your app. You vibe code the product with Cursor, Claude Code or Lovable, and Esign Comply gives your AI tool the signing rules and keeps the independent record of every signature.
Free plan: 10 live signatures a month and a full test mode. No card required.
- 01Upload a PDF and place the fieldsYou
- 02Add signers and email each a linkYou
- 03Signer opens your signing pageYou
- 04Ceremony reported from the signer's browserEsign Comply
- 05Sealed record, receipt and timestampEsign Comply
- 06Completed PDF sent to everyoneYou
What you're building: a send-for-signature app
The send-for-signature product everyone knows, with your name on it. These are the parts.
PDF upload
A sender drops in a contract. Your app stores the file and shows it page by page.
Signers and signing order
Add one person or five, with names and email addresses. Send to all at once or one after another.
Field placement
Drag signature, name and date fields onto the page for each signer.
Invitations and reminders
Each signer gets an email with their own link to your app, and a nudge when they go quiet.
A signing page
The signer reads the document, confirms an emailed code, types or draws a signature and clicks Sign.
Status tracking
A dashboard shows sent, viewed, signed and completed for every document.
Completed copies
When the last person signs, every party receives the final PDF.
A history per document
Who signed, when, and on which version, with a verification link for each signature.
Who does what in your DocuSign alternative
You build everything a user sees. Esign Comply is the layer underneath: the rules your AI tool follows and the record you do not hold.
Upload and storage
The upload form, your storage bucket, the list of documents.
Registers the PDF as an immutable document version. Every record pins that version by hash.
Viewer and field placement
The PDF viewer, the drag-and-drop fields and where each signature lands.
The rules prompt tells your AI tool how the document has to be put in front of the signer.
Signers, packet and order
The signer list, the packet, and who signs first.
One session per signer on the same document version, and one sealed record for each of them.
Invitations and links
The emails, the reminders and the signing links, sent from your domain with a provider such as Resend.
The one-time code email at L2. Esign Comply sends it and confirms it inside the ceremony.
The signing page
Every pixel: layout, notice text, name field or signature pad, the Sign button.
The browser SDK reports the ceremony from the signer's browser: document shown, notice, intent and the signing act.
The record of each signature
A row in your own table that stores the record ID and our receipt.
The sealed record, a signed receipt (ES256), an RFC 3161 timestamp from an outside authority and a hash-chained ledger.
The completed PDF
Stamping names, signature images and dates onto the PDF, for example with pdf-lib, and emailing the copies.
An evidence report PDF for each record, a public verification page to link from your copy, and an optional emailed copy to the signer.
Dashboard and templates
Status views, reusable templates, teams and billing.
A signed webhook when a record completes, so your dashboard updates the moment it happens.
How to build your DocuSign alternative, step by step
Nine steps from an empty repo to a signed PDF in everyone's inbox. Your AI tool writes the code. You review it.
- 01
Generate the prompt
In the Esign Comply dashboard, pick contract signing, your regions, your signer types and your stack. You get one prompt with the exact ceremony rules for the signing page, ready to paste into Cursor, Claude Code, v0, Lovable, Bolt or Replit.
Prompt generatorUse case Contract signing Method Typed name or drawn signature Assurance L2, one-time code by email Signers Business Stack Next.js on Vercel, Supabase
- 02
Register the document version
When a sender uploads a PDF, your server creates a document and publishes the file as a version. A version is immutable and hashed, and every record pins that exact
dv_version.Server · register the uploadPOST /v1/documents { "name": "Consulting Agreement", "type": "contract" } POST /v1/documents/doc_Ct41/versions Idempotency-Key: agreement-8841 { "version_label": "agreement-8841", "content": { "format": "pdf", "data_base64": "JVBERi0xLjcK..." } } // 201 Created { "id": "dv_7Rw3", "content_hash": "sha256:9f2c..." }
- 03
Create one session per signer
A session is one signer on one document version: three signers means three sessions on the same
version_idand three sealed records, and your app tracks the packet and the signing order. Create each session on your server when that signer opens their link, because a session lasts 30 minutes by default and 24 hours at most.Server · when a signer opens their link// One session per signer, all on the same document version. // esc is the server SDK: new EsignComply(process.env.ESIGNCOMPLY_API_KEY) const { data: session, error } = await esc.sessions.create( { profile: "prof_contract_9c2e", // typed name, L2 signer: { external_id: signer.id, email: signer.email, name: signer.name, class: "business", country: "US", }, documents: [ { document: agreement.documentId, version: agreement.versionId }, ], context: { url: `${origin}/sign/${signer.token}`, locale: "en-US", purpose: "contract_signature", }, metadata: { agreement_id: agreement.id }, }, { idempotencyKey: `sign-${agreement.id}-${signer.id}-${attempt}` }, ); // Send the browser only session.client_token, session.api_url // and session.documents.
- 04
Email each signer their link
The link points at your own app and carries your own token. Send it from your domain with a provider such as Resend, and send reminders the same way.
Server · invitation emailimport { Resend } from "resend"; const resend = new Resend(process.env.RESEND_API_KEY); const url = `https://yourapp.com/sign/${signer.token}`; await resend.emails.send({ from: "Acme Sign <sign@yourdomain.com>", to: signer.email, subject: `${sender.name} sent you ${agreement.title} to sign`, html: `<p><a href="${url}">Review and sign</a></p>`, });
- 05
Build the signing page with the browser SDK
Your page shows the PDF, the notice, the name field and the Sign button, and
@esigncomply/browserattaches to those elements and reports each step from the signer's browser straight to Esign Comply. At L2, Esign Comply emails the one-time code and confirms it.Browser · app/sign/[token]/signing.tsximport { EsignComply } from "@esigncomply/browser"; const ceremony = await EsignComply.attach({ clientToken, apiUrl }); // Your PDF viewer, showing the pinned version await ceremony.presentDocument({ versionId, mode: "scrollbox", container: viewer, }); // L2: Esign Comply emails a code, the signer types it on your page await ceremony.verify.start({ method: "email_otp" }); await ceremony.verify.confirm({ code: codeInput.value }); // A typed name. For a drawn signature, pass canvas instead. ceremony.observeAssent({ region: assent, typedName: nameInput, submit: signButton, }); // From the click handler of your Sign button const result = await ceremony.complete(); // { recordId, receipt, verifyUrl, status }
- 06
Confirm on your server before you mark it signed
complete()answers the browser, so treat its result as a claim. Your server readsGET /v1with the secret key, or handles the signed/records /{id} record.completedwebhook, and only then marks that signer as signed.Server · confirm the record// The record ID came from the browser. Check it on your server. const { data: record, error } = await esc.records.get(recordId); const confirmed = !error && ["recorded", "timestamped", "anchored"].includes(record.status) && record.signer.external_id === signer.id && record.documents.every((d) => d.version_id === agreement.versionId) && record.livemode === (process.env.VERCEL_ENV === "production"); if (confirmed) { await markSigned(signer.id, record.id, record.receipt); }
- 07
Produce the completed PDF and send copies
When your server holds a confirmed record for every signer, stamp names, signature images and dates onto the PDF, for example with pdf-lib, and email the completed copy to every party. With receipts on, Esign Comply also emails each signer a copy and a verification link from its own domain.
Server · stamp the PDFimport { PDFDocument } from "pdf-lib"; const pdf = await PDFDocument.load(originalBytes); for (const s of signers) { const page = pdf.getPages()[s.field.page]; const { x, y } = s.field; // signedAt and recordId were saved at confirmation const stamp = `Signed ${s.signedAt} ${s.recordId}`; page.drawText(s.name, { x, y, size: 14 }); page.drawText(stamp, { x, y: y - 12, size: 7 }); } // Store it, then email it to every party const completed = await pdf.save();
- 08
Show status in your dashboard
Draft, sent, viewed, signed, completed, declined: all of it is state in your own database. Update it from server confirmation and from the
record.completed,session.expiredandsession.cancelledwebhooks. - 09
Keep our receipt and offer the evidence report
Store the signed receipt and the record ID next to each signer row. Link the public verification page from your completed PDF, and let senders download the evidence report for any signature.
Server · evidence for one signature// Use a key with full_access or read_only permission GET /v1/records/rec_Z4m8/report // evidence report (PDF) GET /v1/records/rec_Z4m8/evidence // evidence package (ZIP) // Anyone checks the package offline npx esigncomply-verify rec_Z4m8.zip
A starter prompt to paste into your AI tool
Paste this first. It tells your AI tool what the product is and where the rules live. Then paste the generated prompt from the dashboard.
Generate the full promptBuild a DocuSign-style send-for-signature app in this codebase. A sender uploads a PDF, places signature, name and date fields per signer, adds signers by name and email, and clicks Send. Each signer gets an email (use Resend) with a private link to our own signing page. There they read the PDF, confirm a one-time code sent to their email, type their name and click Sign. When all have signed, stamp names and dates onto the PDF with pdf-lib and email the completed copy to everyone. Add a dashboard with the statuses draft, sent, viewed, signed and completed. Use Esign Comply for the signing ceremony and the record. First read and follow https://esigncomply.com/setup.md and https://esigncomply.com/llms.txt. Never invent API methods, endpoints or parameters: if the docs do not cover it, stop and ask me. Create one Esign Comply session per signer on the same document version, and keep the packet and signing order in our database. Mark a signer as signed only after our server has confirmed the record. Next I will paste the prompt generated in the Esign Comply dashboard. It has the exact rules for the signing screen and overrides this message.
Why not build the record yourself
Your app can write signed_at into its own table, and it should. The trouble starts when a signer says they never signed: you control that table, so your row is your word against theirs. Esign Comply receives the ceremony straight from the signer's browser, seals it with keys you do not hold, chains it into an append-only ledger and has an outside authority timestamp it (RFC 3161). Hand the evidence package to anyone and they verify it offline with an open-source tool.
Pricing in one line
The Free plan includes 10 live signatures a month and a full test mode, with no card. Starter is $200 per year for 2,000 live signature events, Unlimited is $1,200 per year, and Enterprise starts at $10,000 per year. One event is one signer's completed signing act, so a contract with two signers is two events.
See pricingQuestions about building your own DocuSign
Can I build a DocuSign clone with Cursor?
Yes. Cursor, Claude Code, Lovable, v0, Bolt and Replit can build the whole product: upload, field placement, signer emails, the signing page and the dashboard. Esign Comply generates one prompt with the exact signing rules for your tool, and its browser SDK reports each signing from the signer's browser, so the record is independent of your app.
Generate a promptHow do multiple signers work?
Create one session per signer on the same document version. Each signer gets their own link, their own ceremony and their own sealed record, and your app tracks the packet and the signing order. The document is complete when your server has confirmed a record for every signer.
Who sends the emails?
You do, from your own domain, with a provider such as Resend: invitations, reminders and the completed copy. Esign Comply sends two messages itself: the one-time code when you verify the signer's email, and an optional receipt to the signer with a copy and a verification link.
Is a signature made in my own app recognized?
Yes. Electronic signatures are recognized under the U.S. ESIGN Act and state UETA laws: a signature cannot be denied legal effect just because it is electronic. Esign Comply gives your AI tool the ceremony rules drawn from those laws and from leading U.S. online-assent decisions, and keeps an independent, tamper-evident record of each signing.
U.S. rules we draw onWhere does the signer sign?
In your app, on your domain, on a page you designed. Esign Comply is headless: an API and a browser SDK that attach to your own viewer, name field and button. The signer sees your product from the email to the completed copy.
How the SDK worksBuild your own DocuSign. Leave the record to us.
Free plan: 10 live signatures a month and a full test mode. No card required.
DocuSign is a trademark of its owner. Esign Comply is not affiliated with it.