Build your own signing page
Studio serves the signing page and the verification page for you (see The document); a campaign works without any hosting on your side. When the pages should live on your own domain, such as https://signing.example.com, with your own headers, limits and wording in front of them, you build them as a small app on the signing package, @maravilla/studio-signing, and point the campaign at it.
The package holds the link handling, the client for the signing functions, the rate limiter, the document proxy, the brand checks, the signing page with a signature pad, and ready routes for SvelteKit. SvelteKit on Maravilla Cloud is the recommended stack, and the Studio skill studio-custom-signing-app builds the app with you.
Three ways to build it
| Way | What you write | When |
|---|---|---|
| Ready routes | About ten small files. The package answers the link, the signature and the documents, and shows the signing, verification and status pages. You set the wording and the look in one configuration object. | The default. |
| Your own pages | The same ready server, with your own page design: your layout around the package’s signing page, or your own form. | The pages must match your site’s design. |
| Fully custom | Every route yourself, from the package’s building blocks. | Another framework, or an app that does more than signing. |
The skill asks which one you want before it writes anything, and whose look the pages should have.
How it fits together
The app sits between the signer and Studio. It takes the personal link, applies its rate limits, and calls Studio’s signing functions with a service credential. Studio checks the link itself on every call, so the signing record stays consistent whatever the page in front of it does, and the credential does nothing without a live link.
The app holds one secret, on the server only:
| Setting | What it is |
|---|---|
| A service identity | A dedicated identity for the app that runs the signing and verification functions and reads nothing. Your tenant’s administrator creates it and gives you its email and password. |
The personal links need no key in your app: a link is a random 32-character token that only Studio can check.
An own app serves digital signing. Keep Paper returns off on a campaign whose Sign page address is your app.
The page images, the personal copy and the signed copy are made by Studio’s media service, as for the hosted pages: when Setup shows the document’s page previews and a test signing delivers its signed copy, your app has everything it needs. The app uses version 0.3.0 or later of the signing package.
Routes
| Route | Purpose |
|---|---|
GET /s/<token> | The link from the mail. It finds which request the link belongs to, starts the session and redirects to /s. |
GET /s | The signing page for the session: read the document, enter details, sign. |
POST /s/submit | Records the signature. |
GET / POST /s/print | The signer’s personal copy (the document stamped with their reference code): its state, or a request to make it. |
GET /s/copy | Whether the signed copy is ready; the thank-you screen asks until it is. |
GET /s/doc/… | The document for the session: page images, the personal copy and the signed copy. |
GET /verify/<code> | The public certificate behind the QR code on the signed copy. |
GET /healthz | A health check; ?deep=1 also checks the connection to Studio. |
Settings
The app reads these environment variables at request time. Set them in the project on Maravilla Cloud (the password as a secret):
| Variable | Meaning |
|---|---|
RAISINDB_URL, RAISINDB_REPO | The address of the engine your Studio uses, and its repository (usually studio). |
SIGNING_SERVICE_EMAIL, SIGNING_SERVICE_PASSWORD | The service identity. The password is a secret; the app signs in with it and renews its session by itself. |
TRUSTED_PROXY_HEADER, TRUSTED_PROXY_HOPS | The header your edge sets for the client address, and which entry from the right to count. |
Link exchange, cookie and headers
The personal link carries the token in its path. The first request exchanges it for a session cookie and redirects to /s, so the address bar, the browser history and the referrer never show the token. The cookie is HttpOnly, SameSite=Lax, limited to the /s path, Secure on every host except a local one, and lasts as long as the link (at most 24 hours). After signing it stays only for the signed-copy window.
Every response carries Referrer-Policy: no-referrer, Cache-Control: no-store, X-Content-Type-Options: nosniff, X-Robots-Tag: noindex, nofollow and a strict content security policy. Check the headers on the deployed app or a production build; the development server relaxes the content security policy. When a link is expired, withdrawn or replaced by a newer one, the cookie is cleared.
Rate limiting and the client address
The limiter counts per client address in a sliding window (by default 120 views and 20 signings per 10 minutes) and, separately, failed attempts on a valid link (by default 10 per 15 minutes), so a stranger cannot lock the real signer out. The client address comes from the header you name, counted from the right, where your own edge appends it; a request without it is refused rather than counted in a shared bucket. The counts live in the project’s key-value store on Maravilla Cloud, so every instance of the app shares them; put edge limits in front as well.
Branding and language
By default the pages show the campaign’s brand from Studio (name, accent colour, logo, corner radius, font and page tint), and every value is checked again before it is used. The accent colour is darkened automatically when white text on it would be hard to read. In the app’s configuration you can fix single values over the Studio brand, or switch the Studio brand off and use only your own design. With your own pages, the brand is data your page may use or ignore.
The invitation and reminder mails and the signed copy are made by Studio and always carry the campaign’s brand. When your pages use their own design, set the campaign’s brand in Studio to match it, so the mail and the page look alike. The page language is the one recorded with the request, otherwise the browser’s. Expired links, already signed documents and busy periods each get a designed page that says what happened and what to do.
Point a campaign at it
Do this before you approve the campaign: the Sign page address is part of the approval, and a mail keeps the address it was sent with.
- Deploy the app and attach your domain, so it answers on an
https://address with a dotted host. - In the campaign’s Setup, open Channels and set the Sign page address to that address, with no path (the campaign property
sign_base_url). The links in the mails (https://signing.example.com/s/<token>) and the QR code on the signed copy (https://signing.example.com/verify/<code>) are built from it. - Keep Paper returns off.
Check it
In Setup, use Test the signing, start to finish and open the signing page. Check that:
- you land on
/swith no token in the address bar, and the document’s pages show; - Your personal copy prepares and downloads a PDF with your reference code;
- after signing, the thank-you screen shows the reference, Verify this signature, and then the signed copy download once it is ready (about a minute); when the copy cannot be made, the screen says so and the signature itself is kept;
- the QR code on the signed copy opens the certificate on your domain, with who signed and when;
- an unknown reference such as
/verify/NOPE-NOPEanswers “No signature found”.
Then approve and send.
Build it with an AI agent
A coding assistant can build and deploy the whole app when it has the Studio skill. SvelteKit is the recommended stack.
-
Create the project on Maravilla Cloud. Install the Maravilla CLI, sign in with
maravilla login, and create an empty folder for the app. The agent wires the folder to a new cloud project withmaravilla connectonce the app builds. -
Get the service identity. Ask your tenant’s administrator for a service identity for an own signing app (the skill’s
reference/service-identity.mdhas the commands for them). Store the password yourself withmaravilla secret set SIGNING_SERVICE_PASSWORD --env production; never paste it into the conversation. -
Install the skill in the app folder:
mkdir -p .claude/skills curl -sL https://assets.studio.maravilla.cloud/studio-skills.tar.gz | tar -xz -C .claude/skills ls .claude/skills/studio-custom-signing-app -
Paste the prompt, with your own values:
Build my own signing app for Maravilla Studio signing campaigns with the studio-custom-signing-app skill. Ask me its two questions first (how much of the app I own, whose look), then follow the reference for my answer. - Stack: SvelteKit 2 with @maravilla-labs/adapter-sveltekit, deployed to Maravilla Cloud. - My domain will be https://signing.example.com. My engine is https://<engine>, repository studio. - The service identity's email is sign-app@studio.service. I set the password myself: never ask me for it, never write it into a file other than a git-ignored .env, never print it. - Do not add a link secret. Do not use getClientAddress() for the client key. - Languages: en and de. - When the build is green, give me the exact maravilla commands for steps 4 to 8 of the skill and stop before the first push so I can review. Afterwards walk me through reference/end-to-end-check.md. -
Deploy and attach the domain. Push with
git push maravilla mainand follow the build withmaravilla pipeline status --branch main. In the project’s Settings > Domains, addsigning.example.com, then create the DNS recordCNAME signing.example.com -> <project>-<handle>.maravilla.page; the certificate is issued automatically. -
What to check before you point a campaign at it:
https://signing.example.com/healthz?deep=1answersokandengine ok: the project’s settings and the service password reach the running app.- The client-address check from the skill names your own address, even when you send a made-up
X-Forwarded-For. - Every response carries the five headers listed above.
- A test signing lands on
/swith no token in the address bar, the personal copy and the signed copy download, and the QR code on the signed copy opens your verify page.
Next: Export and verification.
Pilot documentation. Studio is in a partner pilot. Screens and YAML shown here are current as of the version noted on each page; tell your Maravilla contact when something does not match what you see.