Pennywise

Add chit JSON export and import

1 min read

Summary

Added bounded versioned JSON export and atomic append-only import for chit funds with nested installments, full-account and per-chit export actions, frontend preview, and raw archive submission.

Decisions

  • Use a nested versioned JSON archive that omits ownership and derived fields.
  • Preserve BOM-stripped raw JSON text for submission so backend lexical money validation rejects exponent notation and over-precision.
  • Use batched parent and installment inserts inside one transaction while re-imports intentionally create fresh duplicates.

Learnings

  • Browser JSON parsing can normalize numeric syntax before transport, so parsed preview data must remain separate from the submitted archive text.