StabilityNexus / StabilityNexus/Chainvoice
[FEATURE]: Bulk Export Multiple Invoices (CSV / JSON / PDF) with Single File & Separate Files Option
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10
- Forks
- 47
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 4
Description
Problem
Currently, Chainvoice supports exporting a single invoice at a time (CSV/JSON/PDF from the invoice detail drawer), implemented in #136 and shipped in PR #138. There is no way to bulk export multiple invoices at once from the main invoices list page.
Businesses using Chainvoice need bulk export capabilities for:
- Exporting monthly/quarterly invoice batches for accounting software (QuickBooks, Xero, Wave)
- Tax filing and audits requiring all invoices in a period
- Data reconciliation across multiple transactions
- Bookkeeping automation pipelines
Exporting invoices one by one when dealing with dozens or hundreds of records is impractical and defeats the purpose of a decentralized, automated invoicing platform.
Discord thread: https://discord.com/channels/995968619034984528/1328282666335993856/1480964370069717063
The first PR (#138) has since been merged, and this issue is the agreed follow-up for part 2.
Proposed Solution
Add bulk export support on the Sent Invoices and Received Invoices list pages, allowing users to select multiple invoices and export them in CSV, JSON, or PDF format.
Export Formats
| Format | Description |
|---|---|
| CSV | All selected invoices in a single .csv file, one row per invoice |
| JSON | Array of invoice objects exported as a single .json file |
Selected invoices as a multi-page .pdf (one invoice per page) |
User Choice: Single File vs. Separate Files
Users should be able to decide how their invoices are packaged on export:
Option A — All in One File (default)
- CSV: single file, one row per invoice
- JSON: single file, array of all selected invoice objects
- PDF: single multi-page PDF, one invoice per page
Option B — Separate Files per Invoice
- Each selected invoice is exported as its own individual file
- Files are bundled and downloaded as a
.ziparchive - Naming convention:
invoice-<id>-<date>.csv / .json / .pdf
A simple toggle or radio group in the export modal (e.g. "Export as: Single file / Separate files (ZIP)") can handle this UX cleanly.
Implementation Approach
- Add checkboxes to each invoice row on the list page for selection
- Add a toolbar that appears when invoices are selected, with an
Export Selectedbutton (matching the pattern already introduced in PR #138) - Extend existing utilities from PR #138:
frontend/src/utils/generateInvoiceCSV.js— accept array of invoicesfrontend/src/utils/generateInvoiceJSON.js— accept array of invoicesfrontend/src/utils/generateInvoicePDF.js— batch multi-page PDF generationfrontend/src/utils/invoiceExportHelpers.js— add ZIP bundling helper for separate-file option
- Use
Blob+URL.createObjectURL()for client-side downloads (no backend needed) - Use a lightweight ZIP library (e.g.
jszip) for the separate-files option - Only already-decrypted (visible) invoice data is exported — no additional Lit Protocol calls needed
- Show success/error toasts consistent with the export UX introduced in PR #138
Why This Matters
- Natural follow-up to single invoice export (#136 / PR #138) — completes the full export experience
- No smart contract changes required — purely frontend
- Essential for businesses handling multiple invoices per period
- Low risk, high user value
Additional Context
- This issue is the direct follow-up agreed upon in the Discord conversation above
- Single invoice export (CSV / JSON / PDF) was implemented in issue #136 and merged in PR #138
- Existing utilities to extend:
frontend/src/utils/generateInvoicePDF.jsfrontend/src/utils/generateInvoiceCSV.jsfrontend/src/utils/generateInvoiceJSON.jsfrontend/src/utils/invoiceExportHelpers.js
- Invoice data is already decrypted and available in component state on the Sent/Received list pages (
frontend/src/page/SentInvoice.jsx,frontend/src/page/ReceivedInvoice.jsx) - Discord thread (maintainer approval): https://discord.com/channels/995968619034984528/1328282666335993856/1480964370069717063
- Related issue: https://github.com/StabilityNexus/Chainvoice/issues/136
- Merged PR (single invoice export, prerequisite): https://github.com/StabilityNexus/Chainvoice/pull/138
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading frontend/src/utils/generateInvoiceCSV.js, generateInvoiceJSON.js, generateInvoicePDF.js, invoiceExportHelpers.js, and the invoice list pages frontend/src/page/SentInvoice.jsx and frontend/src/page/ReceivedInvoice.jsx. Trace the existing single-invoice export flow from PR #138, then define selection and packaging behavior for CSV, JSON, PDF, and separate-file ZIP exports; done means both list pages support the requested formats and packaging options with consistent success/error toasts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100