Files
5b32922f39 feat(goja): embed ESM-free e-signature bundle for in-process cloud fold (task #100) (#8)
* feat(goja): embed ESM-free e-signature bundle for in-process cloud fold

Port the Hanzo Sign server-side domain (documents, recipients, fields, signing
flow/state, audit trail, completion) to a self-contained goja bundle exposing
globalThis.handle(req), plus a std-lib-only Go embed module (Bundle()). This is
the HIP-0106 (task #100) fold: the unified hanzoai/cloud binary runs the sign
flow as TS-on-goja backed by Hanzo Base/SQLite — no Next.js/Remix, no Prisma,
no Postgres. Persistence (globalThis.db) and the PDF/PKI seal primitives
(globalThis.pdf) are injected by cloud/clients/sign as Go host-functions.

Claude-Session: https://claude.ai/code/session_016yg7GPhYdWCh9vpp4HEwLZ

* docs(llm): note the in-process cloud goja fold (task #100)

Claude-Session: https://claude.ai/code/session_016yg7GPhYdWCh9vpp4HEwLZ

* refactor(goja): run on the reusable gojabase RW-Base host (__db/__newId/__now/__pdf)

Retarget the bundle to the clients/gojabase contract the captable pilot (#96)
established: handle({route,params,query,orgId,body}); persistence via
__db.query/__db.exec + __newId/__now (one txn per dispatch, commits iff
status<400); the PDF/PKI seal via __pdf.stamp/__pdf.sign injected through
gojabase Config.HostFns. One binding, not two. No behavior change to the flow.

Claude-Session: https://claude.ai/code/session_016yg7GPhYdWCh9vpp4HEwLZ

---------

Co-authored-by: hanzo-dev <dev@hanzo.ai>
2026-07-10 03:06:24 -07:00

1.7 KiB

Hanzo Sign

Overview

The Open Source DocuSign Alternative.

Tech Stack

  • Language: TypeScript/JavaScript

Build & Run

npm install && npm run build
npm test

Structure

sign/
  AGENTS.md
  ARCHITECTURE.md
  CLA.md
  CODE_OF_CONDUCT.md
  CODE_STYLE.md
  CONTRIBUTING.md
  LICENSE
  LLM.md
  MANIFEST.md
  README.md
  SIGNING.md
  WRITING_STYLE.md
  apps/
  assets/
  build.log

Key Files

  • README.md -- Project documentation
  • package.json -- Dependencies and scripts

In-process cloud fold (HIP-0106, task #100)

The core server-side e-signature flow is ALSO shipped as a self-contained, ESM-free goja bundle so the unified hanzoai/cloud binary runs it in-process (TS-on-dop251/goja + Hanzo Base/SQLite) — no Next.js/Remix, no Prisma, no Postgres. This replaces the standalone esign pod.

  • goja/bundle.js — the ported domain: documents, recipients, fields, the signing flow/state machine, audit trail and completion. Exposes globalThis.handle({route,method,params,body,tenant}). It carries LOGIC only.
  • embed.go / go.mod — a std-lib-only Go module (github.com/hanzoai/sign, Bundle()) that cloud imports to go:embed the bundle.
  • goja/README.md — the host contract. It runs on the reusable hanzoai/cloud/clients/gojabase RW-Base host: persistence (globalThis.__db, per-tenant SQLite, one txn per dispatch) + __newId/__now come from gojabase; the PDF/PKI seal primitives (globalThis.__pdf: pdfcpu render + x509/PKCS#7 sign) are injected by clients/sign via gojabase Config.HostFns. Only the crypto/PDF primitive is Go; the flow + seal orchestration stay here in JS.

Edit a server-side rule? Mirror it in goja/bundle.js (the cloud path) as well as the Remix/tRPC handlers.