# Build your own DocuSign alternative

> Build your own DocuSign with Cursor, Claude Code or Lovable. A DocuSign alternative you own: upload a PDF, email signing links, collect signatures in your app.

Source: https://esigncomply.com/build/docusign-alternative

Build guide · send for signature

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.

[Get started](https://esigncomply.com/signup) · [Generate a prompt](https://esigncomply.com/product/prompt-generator)

Free plan: 10 live signatures a month and a full test mode. No card required.

The flow, and who does each part

1. Upload a PDF and place the fields · You
2. Add signers and email each a link · You
3. Signer opens your signing page · You
4. Ceremony reported from the signer's browser · Esign Comply
5. Sealed record, receipt and timestamp · Esign Comply
6. Completed PDF sent to everyone · You

## 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.

You vibe code · Esign Comply handles

## 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

You vibe code

The upload form, your storage bucket, the list of documents.

Esign Comply handles

Registers the PDF as an immutable document version. Every record pins that version by hash.

### Viewer and field placement

You vibe code

The PDF viewer, the drag-and-drop fields and where each signature lands.

Esign Comply handles

The rules prompt tells your AI tool how the document has to be put in front of the signer.

### Signers, packet and order

You vibe code

The signer list, the packet, and who signs first.

Esign Comply handles

One session per signer on the same document version, and one sealed record for each of them.

### Invitations and links

You vibe code

The emails, the reminders and the signing links, sent from your domain with a provider such as Resend.

Esign Comply handles

The one-time code email at L2. Esign Comply sends it and confirms it inside the ceremony.

### The signing page

You vibe code

Every pixel: layout, notice text, name field or signature pad, the Sign button.

Esign Comply handles

The browser SDK reports the ceremony from the signer's browser: document shown, notice, intent and the signing act.

### The record of each signature

You vibe code

A row in your own table that stores the record ID and our receipt.

Esign Comply handles

The sealed record, a signed receipt (ES256), an RFC 3161 timestamp from an outside authority and a hash-chained ledger.

### The completed PDF

You vibe code

Stamping names, signature images and dates onto the PDF, for example with pdf-lib, and emailing the copies.

Esign Comply handles

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

You vibe code

Status views, reusable templates, teams and billing.

Esign Comply handles

A signed webhook when a record completes, so your dashboard updates the moment it happens.

9 steps

## 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.

1. **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 generator

   ```
   Use case    Contract signing
   Method      Typed name or drawn signature
   Assurance   L2, one-time code by email
   Signers     Business
   Stack       Next.js on Vercel, Supabase
   ```

2. **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 upload

   ```
   POST /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..." }
   ```

3. **Create one session per signer**

   A session is one signer on one document version: three signers means three sessions on the same `version_id` and 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.
   ```

4. **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 email

   ```
   import { 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>`,
   });
   ```

5. **Build the signing page with the browser SDK**

   Your page shows the PDF, the notice, the name field and the Sign button, and `@esigncomply/browser` attaches 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.tsx

   ```tsx
   import { 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 }
   ```

6. **Confirm on your server before you mark it signed**

   `complete()` answers the browser, so treat its result as a claim. Your server reads `GET /v1/records/{id}` with the secret key, or handles the signed `record.completed` webhook, 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);
   }
   ```

7. **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 PDF

   ```
   import { 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();
   ```

8. **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.expired` and `session.cancelled` webhooks.

9. **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
   ```

[Read the quickstart](https://esigncomply.com/docs/quickstart) · [Browser SDK reference](https://esigncomply.com/docs/sdk/browser)

For Cursor, Claude Code, Lovable

## 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 prompt](https://esigncomply.com/product/prompt-generator)

`starter-prompt.md`

```markdown
Build 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.
```

The record

## 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.

[Why the record should not be yours](https://esigncomply.com/why)

Annual, per domain

## 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 pricing](https://esigncomply.com/pricing)

## Questions 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 prompt](https://esigncomply.com/product/prompt-generator)

### How 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 on](https://esigncomply.com/compliance/united-states)

### Where 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 works](https://esigncomply.com/product/ceremony-sdk)

### More build guides

- [Build your own Dropbox Sign](https://esigncomply.com/build/dropbox-sign-alternative)
- [Build your own PandaDoc](https://esigncomply.com/build/pandadoc-alternative)
- [Build your own Adobe Acrobat Sign](https://esigncomply.com/build/adobe-sign-alternative)
- [Build your own signNow](https://esigncomply.com/build/signnow-alternative)
- [Build your own DocSend](https://esigncomply.com/build/docsend-alternative)
- [Build your own clickwrap](https://esigncomply.com/build/clickwrap)
- [All build guides](https://esigncomply.com/build)

### A copy-paste prompt for your AI tool

- [Cursor](https://esigncomply.com/build/cursor)
- [Claude Code](https://esigncomply.com/build/claude-code)
- [Codex](https://esigncomply.com/build/codex)
- [Windsurf](https://esigncomply.com/build/windsurf)
- [GitHub Copilot](https://esigncomply.com/build/github-copilot)
- [Devin](https://esigncomply.com/build/devin)
- [Lovable](https://esigncomply.com/build/lovable)
- [v0](https://esigncomply.com/build/v0)
- [Bolt](https://esigncomply.com/build/bolt)
- [Replit](https://esigncomply.com/build/replit)
- [ChatGPT](https://esigncomply.com/build/chatgpt)
- [Grok](https://esigncomply.com/build/grok)
- [Grokbot](https://esigncomply.com/build/grokbot)
- [Muse](https://esigncomply.com/build/muse)
- [All AI tools](https://esigncomply.com/build#tools)

## Build your own DocuSign. Leave the record to us.

[Get started](https://esigncomply.com/signup) · [Documentation](https://esigncomply.com/docs)

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.

---

Every page on esigncomply.com has a Markdown version at the same URL plus `.md` (the home page is `https://esigncomply.com/index.md`). https://esigncomply.com/llms.txt lists them.
