Skip to content

Open-source document signature platform. Not affiliated with DocuSign.

TypeScript

Add Resend first in the Deploy button, explain the retry, add an agent deploy guide

Claudee3a8a994c0b7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7adeee8..40a7664 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,18 @@ All notable changes to SignuDoc are recorded here. The format follows
change settings or the database in ways that need a migration step; each
release says when it does.
+## [Unreleased]
+
+### Deploying
+
+- The Deploy button adds Resend first, then Neon and Blob, so Resend's
+ sending domain has longer to be ready before the first deployment starts.
+- The README and the self-hosting guide say what to do when Vercel stops the
+ first deployment with "One or more integration resources failed to
+ provision": wait, refresh and redeploy.
+- New [guide for AI agents](docs/deploy-with-an-agent.md) that deploy
+ SignuDoc for someone through their browser, linked from the README.
+
## [0.2.0] - 2026-11-15
Installs can now find and take new releases without using git. No database
diff --git a/README.md b/README.md
index ea5172a..f71be5c 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
</p>
<p align="center">
- <a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FNYLLON-SOFTWARE%2FSignuDoc&project-name=signudoc&repository-name=signudoc&stores=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22neon%22%2C%22productSlug%22%3A%22neon%22%2C%22protocol%22%3A%22storage%22%7D%2C%7B%22type%22%3A%22blob%22%2C%22access%22%3A%22private%22%7D%2C%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22resend%22%2C%22productSlug%22%3A%22resend-email%22%2C%22protocol%22%3A%22messaging%22%7D%5D&demo-title=SignuDoc&demo-description=Your%20own%20e-signature%20site.%20Upload%20a%20PDF%2C%20place%20fields%2C%20send%20signing%20links%2C%20and%20keep%20the%20signed%20copy%20with%20its%20audit%20certificate.&demo-url=https%3A%2F%2Fgithub.com%2FNYLLON-SOFTWARE%2FSignuDoc&demo-image=https%3A%2F%2Fraw.githubusercontent.com%2FNYLLON-SOFTWARE%2FSignuDoc%2Fmain%2Fdocs%2Fimages%2Fbanner.png"><img src="https://vercel.com/button" alt="Deploy with Vercel"></a>
+ <a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FNYLLON-SOFTWARE%2FSignuDoc&project-name=signudoc&repository-name=signudoc&stores=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22resend%22%2C%22productSlug%22%3A%22resend-email%22%2C%22protocol%22%3A%22messaging%22%7D%2C%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22neon%22%2C%22productSlug%22%3A%22neon%22%2C%22protocol%22%3A%22storage%22%7D%2C%7B%22type%22%3A%22blob%22%2C%22access%22%3A%22private%22%7D%5D&demo-title=SignuDoc&demo-description=Your%20own%20e-signature%20site.%20Upload%20a%20PDF%2C%20place%20fields%2C%20send%20signing%20links%2C%20and%20keep%20the%20signed%20copy%20with%20its%20audit%20certificate.&demo-url=https%3A%2F%2Fgithub.com%2FNYLLON-SOFTWARE%2FSignuDoc&demo-image=https%3A%2F%2Fraw.githubusercontent.com%2FNYLLON-SOFTWARE%2FSignuDoc%2Fmain%2Fdocs%2Fimages%2Fbanner.png"><img src="https://vercel.com/button" alt="Deploy with Vercel"></a>
</p>
<p align="center">
@@ -195,13 +195,15 @@ DocuSign's figures are its US list prices for annual plans in November 2026: $30
### Deploy to Vercel
1. **Click Deploy with Vercel** above, and sign in to Vercel. It copies SignuDoc into your GitHub account and builds your site from that copy.
-2. **Add the three things Vercel offers to create**, each on a free plan: a [Neon](https://neon.com) Postgres database, a private [Vercel Blob](https://vercel.com/docs/vercel-blob) store, and [Resend](https://resend.com) for email.
-3. **Click Deploy.** The build creates the database tables by itself.
+2. **Add the three things Vercel offers to create**, each on a free plan: [Resend](https://resend.com) for email, a [Neon](https://neon.com) Postgres database, and a private [Vercel Blob](https://vercel.com/docs/vercel-blob) store.
+3. **Click Deploy.** The build creates the database tables by itself. If Vercel stops with "One or more integration resources failed to provision", nothing is wrong with your copy: Resend was still checking its domain. Wait a minute or two, refresh the page, and click **Redeploy**. See [If the first deployment fails](docs/self-hosting.md#if-the-first-deployment-fails).
4. **Open your new site.** Name your organization, give the email address people should write to for help, and create the first account, which is the administrator.
5. **Set up the address you send from.** Under Settings, Organization, enter an address at your own domain. The site lists the DNS records to add and checks them for you.
**Taking new versions.** Settings, SignuDoc, **Check for updates** tells you when a new release is out and what is in it. A workflow that comes with your copy then opens a pull request with the release in your GitHub repository; merge it and Vercel deploys the update. See [Keep your install up to date](docs/self-hosting.md#keep-your-install-up-to-date).
+**Deploying with an AI agent.** An agent that can use your browser can do all of this for you. Point it at [docs/deploy-with-an-agent.md](docs/deploy-with-an-agent.md), which lists every screen, what to choose, what to ask you, and how to retry.
+
There is nothing to type in Vercel and no terminal to open. Until step 5 is done, email reaches only the address on your Resend account, so you can try the whole product straight away by sending a document to yourself. The [self-hosting guide](docs/self-hosting.md) covers your own domain, locking down a new install, keeping it up to date, running in the EU, and every optional setting.
### Try it on your computer
diff --git a/docs/deploy-with-an-agent.md b/docs/deploy-with-an-agent.md
new file mode 100644
index 0000000..a83518d
--- /dev/null
+++ b/docs/deploy-with-an-agent.md
@@ -0,0 +1,93 @@
+# Deploying SignuDoc with an agent
+
+This page is for an AI agent that controls a web browser and has been asked to deploy SignuDoc for someone. It lists every step, what to choose, what to ask the person, and how to retry when a step fails. A person can follow it too. The [self-hosting guide](self-hosting.md) explains each step in more depth.
+
+The person you are working for is called "the person" below.
+
+## Before you start
+
+- The browser should already be signed in to the person's **Vercel** account and to the **GitHub** account Vercel will copy SignuDoc into. If a sign-in page appears, stop and ask the person to sign in. Never type a password, a one-time code or a passkey prompt for them unless they give you that job.
+- Everything here is free. Pick the **free plan** at every choice. If a screen asks for a card, a paid plan or an upgrade, stop and ask the person.
+- Ask the person for these before you begin, so you are not stopped half way:
+ 1. **The domain email should come from**, for example `acme.com`. SignuDoc suggests a `sign.` subdomain (`sign.acme.com`) so its email stays apart from the organization's own. If they have no domain yet, email can wait: leave Resend's domain question at its default.
+ 2. **The organization's name**, as signers should see it.
+ 3. **The support email address** signers and staff should write to for help.
+ 4. **The administrator's email address.** The person creates the password themselves at step 6, or tells you to use their password manager.
+- Do one step at a time, and check each result on the page before you move on. Vercel changes its wording from time to time, so match screens by what they do, not by exact text.
+
+## 1. Open the Deploy button
+
+Open this address (it is the "Deploy with Vercel" button in the [README](../README.md)):
+
+```
+https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FNYLLON-SOFTWARE%2FSignuDoc&project-name=signudoc&repository-name=signudoc&stores=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22resend%22%2C%22productSlug%22%3A%22resend-email%22%2C%22protocol%22%3A%22messaging%22%7D%2C%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22neon%22%2C%22productSlug%22%3A%22neon%22%2C%22protocol%22%3A%22storage%22%7D%2C%7B%22type%22%3A%22blob%22%2C%22access%22%3A%22private%22%7D%5D
+```
+
+## 2. Create the copy on GitHub
+
+Vercel asks where to put the copy of SignuDoc. Choose the person's GitHub account (or the organization they name), keep the name `signudoc` unless it is taken, and create it. A private repository is fine. If Vercel asks to install or authorize its GitHub app, that is expected; if GitHub asks the person to confirm with a passkey or code, hand over to them.
+
+## 3. Add the three stores, in the order shown
+
+Vercel lists three things to add. Add each one, on its free plan:
+
+1. **Resend** (email). When it asks for a domain, enter the sending domain the person gave you, such as `sign.acme.com`. Accept its terms if asked. Resend then sets the domain up and checks its DNS records in the background; you do not need to wait for that here.
+2. **Neon** (Postgres database). Pick the region closest to the person, or the one they name. If they will sign agreements in the EU, choose an EU region.
+3. **Vercel Blob** (file store). It is already set to **private**. Leave it private.
+
+Resend is first on purpose: it needs the most time to be ready, and adding it first gives it the time the other two take.
+
+## 4. Deploy, and retry if Vercel cannot provision a store
+
+Click **Deploy** and wait for the result. It usually takes two to four minutes.
+
+- **Success.** Vercel shows the new site with a link to visit it. Go to step 5.
+- **"One or more integration resources failed to provision for this deployment."** The deployment stopped before it built, almost always because Resend was still checking its domain. Nothing needs fixing. Then:
+ 1. Wait 60 to 120 seconds.
+ 2. Refresh the page. Open the project's **Storage** tab and check that Resend, Neon and Blob are all listed.
+ 3. Open **Deployments**, open the menu (⋯) on the failed deployment, click **Redeploy**, and confirm.
+ 4. If it fails the same way, wait three to five minutes and redeploy again. After three failed tries, stop and tell the person what you saw, including the message and the time.
+- **The build fails with a log.** This is a different problem. Do not redeploy in a loop. Copy the last 30 or so lines of the build log and give them to the person.
+
+## 5. Open the new site
+
+Open the production address (`https://<project>.vercel.app`, or the "Visit" link). Do this straight away: a new install belongs to whoever opens it first.
+
+- **It opens on `/setup`.** Go to step 6.
+- **It says to connect a database.** Neon was not connected when the site was built. In the project, open **Storage**, connect the Neon database to the project for Production, then redeploy (step 4.3) and reload the site.
+
+## 6. Set the site up
+
+On the setup page:
+
+1. Enter the **organization's name** and the **support email address**.
+2. **Send email from** is filled in from what the site knows, usually `notifications@sign.<their domain>`. Check it against the domain the person gave you, and correct it if needed.
+3. Enter the **administrator's email**. Let the person type the password, or use their password manager if they told you to. Never make one up and keep it.
+4. Finish setup. You are signed in as the administrator.
+
+## 7. Check email
+
+Open **Settings, Organization** and find the email section.
+
+- **"Email is not connected".** The Resend keys reached the project after this deployment was built. Redeploy once (step 4.3) and reload.
+- **DNS records listed, not yet verified.** The domain's records are not in place yet. If the domain is managed somewhere other than Vercel, give the person the list of records to add where their domain is managed. The page checks them again by itself. This can take from minutes to a few hours.
+- **Verified.** Email is ready.
+
+Until the domain is verified, Resend delivers only to the email address of the Resend account, so the person can still try SignuDoc by sending a document to themselves.
+
+## 8. Report back
+
+Tell the person:
+
+- the site's address and the GitHub repository it deploys from,
+- whether email is verified, and any DNS records they still have to add,
+- anything you could not do, and why.
+
+Then point them to the [self-hosting guide](self-hosting.md) for their own web address, `SETUP_TOKEN`, the "Needs Attention" badge on database variables, and keeping the install up to date.
+
+## Rules for the agent
+
+- Never pay for, upgrade or start a trial of anything without the person's say-so.
+- Never delete a project, store, database or repository to "start over". If something is badly wrong, stop and ask.
+- Never copy a secret (API keys, database URLs, passwords) out of Vercel into a chat, a file or a message.
+- Redeploy only for the provisioning message in step 4 and for the cases in steps 5 and 7, and no more than three times in a row.
diff --git a/docs/self-hosting.md b/docs/self-hosting.md
index 69a46a0..c78f9c5 100644
--- a/docs/self-hosting.md
+++ b/docs/self-hosting.md
@@ -18,10 +18,10 @@ Everything about running your own SignuDoc: deploying it, setting it up, what it
1. **Click "Deploy with Vercel"** in the [README](../README.md).
2. **Sign in to Vercel** and let it copy this repository into your GitHub account. Your site is built from that copy.
3. **Add the three things Vercel offers to create.** Each has a free plan:
+ - [Resend](https://resend.com) for sending email (it comes first because its domain takes the longest to be ready),
- a Postgres database from [Neon](https://neon.com) (pick the region closest to you),
- - a private file store, [Vercel Blob](https://vercel.com/docs/vercel-blob), for the documents,
- - [Resend](https://resend.com) for sending email.
-4. **Click Deploy.** The build creates the database tables by itself.
+ - a private file store, [Vercel Blob](https://vercel.com/docs/vercel-blob), for the documents.
+4. **Click Deploy.** The build creates the database tables by itself. If it stops with "One or more integration resources failed to provision", see [If the first deployment fails](#if-the-first-deployment-fails).
5. **Open your new site.** It takes you to a setup page, where you name your organization, give the email address people should write to for help, and create the first account. That account is the administrator.
6. **Set up the address you send from.** Under Settings, Organization, enter an address at your own domain in "Send email from" and save (the setup page offers the same field). The site lists the DNS records for that domain and checks them for you. Add them where your domain is managed. If your Resend key is not allowed to manage domains, the page sends you to Resend's dashboard for this step instead.
@@ -29,6 +29,18 @@ Everything about running your own SignuDoc: deploying it, setting it up, what it
Step 6 is the one part that cannot be done for you: every email provider asks for proof that you own the domain you send from. While "Send email from" is empty, email goes out from Resend's test address, which Resend delivers only to the email address of the Resend account itself, normally the one on your Vercel account. So to try the whole product straight away, leave that field empty and send a document to that address. Once you save an address of your own, email is sent from it, and Resend does not deliver it until the domain shows as verified. Add the records before you count on it.
+### If the first deployment fails
+
+Vercel starts the first deployment as soon as the last store is added. Resend asks for a domain, sets it up and then checks its DNS records, and that can take a few minutes. If the deployment starts before Resend is ready, Vercel stops it before the build begins, with "One or more integration resources failed to provision". Your copy of SignuDoc is fine, and the database, file store and email are all created.
+
+1. Wait a minute or two.
+2. Refresh the page. In the Vercel project, Storage lists Resend, Neon and Blob.
+3. Open Deployments, open the failed deployment's menu (⋯), and click **Redeploy**.
+
+If it fails the same way again, wait a few more minutes and redeploy once more. A deployment that fails during the build, with a log, is a different problem: the log says what went wrong.
+
+The build itself never waits on Resend. SignuDoc builds and runs without email, and Settings, Organization says when email is not connected yet.
+
If the site opens on a page that says to connect a database, the database was not connected when the site was built. Connect it under Storage in the Vercel project, deploy again and reload.
### What it costs
diff --git a/src/lib/deploy-button.test.ts b/src/lib/deploy-button.test.ts
index 45ea83d..1bda9f3 100644
--- a/src/lib/deploy-button.test.ts
+++ b/src/lib/deploy-button.test.ts
@@ -39,6 +39,17 @@ test("the button creates the database, the private file store and email", () =>
);
assert.deepEqual(stores, [
+ // Resend comes first. Vercel shows the stores in this order, and the
+ // first deployment starts as soon as the last one is added. Resend's
+ // sending domain takes the longest to be ready, and a deployment that
+ // starts before it is fails with "One or more integration resources
+ // failed to provision", so Resend gets the time the other two take.
+ {
+ integrationSlug: "resend",
+ productSlug: "resend-email",
+ protocol: "messaging",
+ type: "integration",
+ },
{
integrationSlug: "neon",
productSlug: "neon",
@@ -47,15 +58,27 @@ test("the button creates the database, the private file store and email", () =>
},
// Private, so no document ever has a public address.
{ access: "private", type: "blob" },
- {
- integrationSlug: "resend",
- productSlug: "resend-email",
- protocol: "messaging",
- type: "integration",
- },
]);
});
+test("the agent deploy guide opens the same link as the button", () => {
+ const guide = readFileSync(
+ path.join(repoRoot, "docs", "deploy-with-an-agent.md"),
+ "utf8",
+ );
+ const match = /https:\/\/vercel\.com\/new\/clone\?\S+/.exec(guide);
+
+ assert.ok(match, "docs/deploy-with-an-agent.md has no Deploy link");
+
+ const guideStores = new URL(match[0]).searchParams.get("stores");
+
+ assert.equal(guideStores, readDeployLink().searchParams.get("stores"));
+ assert.equal(
+ new URL(match[0]).searchParams.get("repository-url"),
+ readDeployLink().searchParams.get("repository-url"),
+ );
+});
+
test("the button asks for nothing to be typed in, and carries no values", () => {
const link = readDeployLink();
@@ -98,6 +121,7 @@ test("every picture and page the README and the guides link to is in the reposit
for (const document of [
"README.md",
"docs/self-hosting.md",
+ "docs/deploy-with-an-agent.md",
"docs/development.md",
"docs/part11/README.md",
"docs/part11/traceability-matrix.md",