VoyceBook Logo
voycebook
Home/Documentation/VoyceBook Document OS Architecture & Data Model

Architecture

VoyceBook Document OS Architecture & Data Model

⏱️ 7 min read•Last updated: 2026-10-15•Verified for 2026 Regulations

Technical overview of how VoyceBook unifies proposals, contracts, invoices, and payments in a single immutable event-driven document graph.

The Core Philosophy: A Document is a Graph, Not a Row

Traditional ERPs store proposals, contracts, and invoices in isolated relational tables. When an invoice is paid or disputed, tracing back to the original proposal requires querying audit logs across disparate services.

VoyceBook models business documents as connected nodes on a directed acyclic graph (DAG). Each document transition—from proposal acceptance to contract signing and invoice dispatch—is recorded as an immutable event with cryptographic provenance.

Document Lifecycle & State Transitions

Every document advances through deterministic states backed by a distributed finite state machine (FSM). State changes trigger automated notifications across WhatsApp and Email and sync to external accounting connectors.

Document TypeInitial StateTerminal StateTriggering Event
ProposalDRAFTACCEPTED / REJECTEDClient digital approval via portal
ContractDRAFT_SENTEXECUTEDDual cryptographic e-signatures sealed
InvoiceISSUEDPAID / WRITTEN_OFFBank payment reconciliation or gateway webhook
PaymentPENDINGSETTLEDUPI / NEFT / RTGS settlement confirmation

Event Schema Specification

All mutations emit strongly-typed CloudEvents over our internal messaging fabric. Below is a sample payload emitted when an invoice is settled:

JSONVoyceBook Spec
{
  "specversion": "1.0",
  "type": "com.voycebook.document.invoice.settled",
  "source": "/workspaces/ws_01H8X9/invoices/inv_9842",
  "id": "evt_01H9A8Z1",
  "time": "2026-10-20T10:14:00Z",
  "datacontenttype": "application/json",
  "data": {
    "invoiceId": "inv_9842",
    "invoiceNumber": "INV-2026-084",
    "clientId": "cust_481",
    "amountPaid": 85000.00,
    "gstAmount": 15300.00,
    "paymentMode": "UPI_AUTO_COLLECT",
    "utr": "428910482910",
    "timelineDurationDays": 14
  }
}