This document defines the base protocol for biz-in-a-box.
biz-in-a-box is an append-only, hash-chained journal format for entity records.
journal.ndjson)Each entry MUST include:
id (string; globally unique, ULID recommended)time (ISO-8601 UTC event timestamp)recorded_at (ISO-8601 UTC write timestamp)labels (string[])description (string)attachments (array)created_by (actor id)prev_hash (64-char lowercase hex SHA-256)hash (64-char lowercase hex SHA-256)If labels contains financial, entry MUST include:
debits: [{ account: string, amount: number }]credits: [{ account: string, amount: number }]Constraint:
sum(debits.amount) == sum(credits.amount)Base system labels:
financialcorrection (requires supersedes)transfer (requires from, to)historicalimportedopening-balanceprev_hash: 0000000000000000000000000000000000000000000000000000000000000000hashCanonicalization (v0.3):
Base validator enforces:
id, time)financial balance checkscorrection requires supersedestransfer requires from + torecorded_at - time > 7 days, require historical or imported labelRequired repository files:
journal.ndjsonentity.yamlaccounts.yamllabels.yamlaccess.yamlvalidate.jsOptional but recommended:
snapshots/FORK.mdverticals/specVersionexpected_prev_hash)idempotency_key)