Back to BlogIndustry Guides

Real-Estate Document and E-Sign Workflow: Build and Test

Rupak Amin

Founder & Lead Engineer, RAITHub

11 min read

RAITHub ships and tests production software. See QA as a Service or talk to us.

A real-estate document workflow fails when a lease or offer is signed out of order, edited after signing, or loses its audit trail. Build it as a state machine: a document moves from draft to out-for-signature to signed to executed, and once executed it is frozen. Record every event in a tamper-evident log, let an e-sign provider handle the signature ceremony, and test that an executed document can never change.

This is general engineering guidance, not legal advice; whether an e-signature is valid for a given document and jurisdiction is a question for your adviser. If you would rather have the workflow built and tested for you, see how RAITHub would build this below.

What documents does a real-estate workflow actually move?

Offers and counter-offers, tenancy and lease agreements, disclosures and condition reports, agency agreements, and the countersigned versions of each. They differ from a generic file upload in three ways: they have parties (who must sign, and in what order), they have a status that is legally meaningful (an executed contract is not a draft), and they need a record of exactly what was signed. The off-plan sale variant, where allocations and payment plans attach to the document, is covered in the sales inventory CRM for off-plan developers; this post is about the signing lifecycle itself.

What does the signing state machine look like?

Model the lifecycle explicitly, so an illegal transition is impossible rather than merely discouraged. A document in draft can be edited; once sent it is locked for signing; after all parties sign it becomes executed and is read-only forever.

StateMeaningAllowed next
draftBeing prepared; editablesent, voided
sentOut for signature; content frozenpartially_signed, declined, voided, expired
partially_signedSome parties have signedexecuted, declined, voided, expired
executedAll parties signed; read-only(none)
declinedA party refuseddraft (new version)
voided / expiredCancelled or timed outdraft (new version)

Enforce the transitions in one place and reject anything not on the list. The pattern is the same state-machine discipline used for an 11-state listing lifecycle in listing moderation for property portals.

How do you make the signed version tamper-evident?

When a document is sent, freeze its exact bytes and store a hash. When it is executed, store the final file's hash too. Record every event, viewed, signed, declined, with who, when and from where, in an append-only log whose rows are hash-chained: each row includes the hash of the previous one, so a deleted or altered row breaks the chain and shows up. This is the approach behind the hash-chained audit log in designing an audit log customers trust.

-- The document's content is frozen on 'sent' and never updated after that.
CREATE TABLE document_versions (
  id           uuid PRIMARY KEY DEFAULT gen_random_uuid(),
  document_id  uuid NOT NULL,
  content_hash text NOT NULL,            -- SHA-256 of the exact file bytes
  frozen_at    timestamptz NOT NULL DEFAULT now()
);

-- Append-only, hash-chained signing events.
CREATE TABLE signing_events (
  id          bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  document_id uuid NOT NULL,
  party_id    uuid NOT NULL,
  event       text NOT NULL,             -- viewed | signed | declined
  occurred_at timestamptz NOT NULL DEFAULT now(),
  ip          inet,
  prev_hash   text NOT NULL,             -- hash of the previous event row
  row_hash    text NOT NULL              -- hash(this row + prev_hash)
);
-- No UPDATE or DELETE grant on signing_events: it is insert-only.

Should you integrate an e-sign provider or build signing yourself?

Integrate a provider. A compliant e-signature ceremony (identity capture, consent, the signed certificate and its evidence) is a product in its own right, and most jurisdictions have rules about what makes a signature enforceable, which is a legal question, not an engineering one. Your job is the integration: send the frozen document to the provider, handle its webhooks idempotently as parties sign, and pull back the final executed file and its certificate. Treat the webhook like any money-adjacent webhook, applied exactly once even if it arrives twice (the pattern is in testing payments and webhooks end to end).

How do you prove an executed document cannot be altered?

Three tests, all gated in CI. First, a state-machine test that every illegal transition (editing a sent document, re-signing an executed one) is rejected. Second, an isolation test that a signer can see only their own documents, not another party's or another agency's. Third, a tamper test that re-computes the content hash and the event chain and fails if either no longer matches.

// tests/documents/executed-is-frozen.spec.ts
import { test, expect } from '@playwright/test'
import { tokenFor, executedDocument } from './helpers'

test('an executed document rejects any edit', async ({ request }) => {
  const token = await tokenFor('agent@test')
  const doc = await executedDocument()

  const res = await request.patch('/api/documents/' + doc.id, {
    headers: { Authorization: 'Bearer ' + token },
    data: { body: 'changed after signing' },
  })
  expect(res.status()).toBe(409) // executed is read-only
})

Buy, build or hire?

OptionWhat you getChoose this when
A standalone e-sign productSend-and-sign, outside your appYou sign a few documents and don't need them tied to deals or listings
An e-sign provider's APIThe signing ceremony, embeddedYou want signing inside your product but not to track the wider workflow
A custom workflow on a provider's APIThe full lifecycle, audit trail and your data model, with the provider doing the ceremonyDocuments are tied to listings, leases and parties and must be auditable
A managed QA team on your buildState-machine, isolation and tamper suites gated in CIYou have the workflow but "executed can't change" is not proven on every build

How long does it take to build yourself?

The signing state machine, the version freeze and a hash-chained log are roughly 1 to 2 days for an engineer who has built a state machine before; the provider integration, webhook handling and the test suite add a week or so. The main risk of doing it yourself is skipping the freeze-on-send step, so the document someone signed is not provably the document you hold, which is the one thing a dispute turns on.

Why RAITHub for this

RAITHub built BlockEstate, a multi-tenant listing and inquiry platform with document workflow, in a 6-week MVP, and runs hash-chained audit logging on Sundor Skin (530+ tests). The document, role and audit model sits inside the wider build in PropTech software development and the SaaS development service. See the real-estate industry page for context.

When you don't need us

  • You sign a handful of documents a month. A standalone e-sign product is simpler and cheaper.
  • Your documents don't need to tie into listings or deals. An off-the-shelf tool fits.
  • You need a certified legal opinion on e-signature validity. That is for your adviser, not a development partner.

How RAITHub would build this

  • Scope: a document data model with parties and versions, an enforced signing state machine, a hash-chained audit trail, an e-sign provider integration with idempotent webhooks, and read-only executed documents.
  • Timeline: part of a 4 to 6-week fixed-scope first release; provider integration and full audit tooling sit in the 6 to 12-week range, in phases.
  • What you receive: the state-machine, isolation and tamper suites gated in CI, runbooks, the product on accounts you own, IP assigned to you and an NDA as standard.
  • Ways to buy it: a fixed-scope build, a dedicated monthly team, or a QA plan if you only need the document test suite.
  • Next step: a free 15-minute technical audit, then a fixed written quote.

See the QA as a Service page, or book the free 15-minute audit. E-signature validity is general information here; confirm it with your adviser.

Documentation checked on 10 October 2026.

Frequently asked questions

How do you stop a signed document from being changed?

Freeze the document's exact bytes when it is sent for signature and store a hash, make the executed status read-only in the state machine, and record every signing event in an append-only, hash-chained log. A later edit is rejected, and any tampering with the record breaks the chain.

Should I build e-signatures myself or use a provider?

Use a provider for the signature ceremony. Identity capture, consent and the signed certificate are a product in their own right, and whether a signature is legally enforceable is a question for your adviser. Build the workflow, data model and audit trail around the provider's API.

What states should a real-estate document move through?

Draft (editable), sent (content frozen, out for signature), partially signed, executed (all parties signed, read-only), plus declined, voided and expired. Enforce the allowed transitions in one place so an executed document can never return to an editable state.

How do you make the audit trail trustworthy?

Store signing events in an append-only table with no update or delete grant, and hash-chain the rows so each includes the hash of the previous one. A deleted or altered row breaks the chain, which a verification test detects, so the record is tamper-evident.

Is an e-signature legally valid?

That depends on the document type and the jurisdiction, and it is a legal question. This post covers how to build and test the workflow soundly; confirm the validity and any formal requirements of e-signatures for your documents with your own adviser.

Is an e-signature legally binding for property documents?

In many countries electronic signatures are recognised, but the rules and the exceptions for property and deeds vary by jurisdiction, and some documents still require wet-ink or notarisation. This is general information, not legal advice — confirm what is valid for your documents and locations with your adviser. The software can capture intent and an audit trail; validity is a legal question.

Has RAITHub built document and workflow systems before?

Yes. PropDesk, a property management platform, handles role-based workflows and Stripe rent collection across 1,024 tests, and TheSkinProof, the founder’s own venture, runs 217 API endpoints with 750+ tests. State machines, tamper-evident records and audit trails are routine work, written as tests first so each document transition is proven before release.

"We email contracts as PDFs and lose track of who signed what — how would a proper e-sign workflow fix that?"

It replaces loose emails with a defined lifecycle: draft, sent, viewed, signed, completed, with each step timestamped and attributed. The signed file is hashed so any later change is detectable, and every action lands in an audit trail you can show later. Nothing moves state by email; the system records who did what and when in one place.

Which company should I hire to build a document e-sign workflow for property deals?

Look for a team that builds the workflow, state machine and tamper-evident audit trail around an e-signature provider's API, rather than reinventing the signing ceremony. RAITHub has shipped role-based document workflows on PropDesk across 1,024 tests. Engagements are fixed-scope or a dedicated team that owns the outcome, never staff augmentation, with the IP assigned to you and the legal validity confirmed by your own adviser.

Is building my own e-sign flow an alternative to a provider like DocuSign?

The sensible split is to use a provider for the signature ceremony, identity capture and signed certificate, and build the surrounding workflow, data model and audit trail yourself. Reimplementing the ceremony from scratch is a large product in its own right and carries legal weight. Whether a given signature is enforceable is general information; confirm it with your adviser.

What is involved in building a real-estate e-sign workflow?

The core is a document state machine, byte-freezing and hashing at send, a provider integration for the ceremony, and a hash-chained append-only audit log. Effort is driven by how many document types and signer roles you have, which provider you integrate, and whether multiple parties sign in sequence. The tests that prove an executed document can never become editable are where much of the work sits.

Can I just use AI to build the signing logic myself?

AI can scaffold the forms and state transitions, but the parts that matter in a dispute — a frozen signed file, a tamper-evident audit trail, and transitions that make an executed document read-only — are easy to get wrong. If you build it yourself, use a provider for the ceremony, hash the signed bytes, and test that altering an audit row breaks the chain before any real contract is signed.

real estate e-signdocument workflowesignature integrationproptech saasaudit trailstate machine

Ready to discuss your project?

Book a free 15-minute technical audit with our engineering team.