Skip to content

Add Export and Download Functionality for Group Expense Reports (CSV/JSON) #388

Description

@Cjay-Cyber-2

Description — what to implement and the why/impact.

Users and small communities often need to audit, archive, or import their shared expense data into accounting tools. This issue adds CSV and JSON export functionality for group dashboards, allowing users to download structured transaction histories with a single click.

Context & Requirements — background, constraints, design references, edge cases; grounded in the actual repo (real files, stack, conventions).

Implement an export utility that formats group expenses and settlements into clean CSV strings and JSON blobs, triggering browser downloads securely. Place the export action inside the group settings or dashboard header component using neobrutalist button styling.

Acceptance Criteria — a checklist ("- [ ] ...") of specific, testable conditions that define "done".

  • Create export utility functions in src/lib/ for CSV and JSON formats.
  • Add an export dropdown or button component in group views (src/components/groups/).
  • Ensure special characters and currency values are correctly escaped in CSV outputs.
  • Pass npm run typecheck and npm test.

Implementation Guidance — likely files/modules to touch (use real paths from the repo context) and a suggested approach, without over-prescribing.

  • Reference src/lib/types.ts for group and expense data structures.
  • Add unit tests for CSV serialization and escaping rules.

Testing & Validation — how the contributor should prove it works (tests to add/run, manual checks, screenshots for UI).

  • Unit test the CSV generator with sample expense items.
  • Verify browser file download triggering in supported environments.

Submission Guidelines — must open a PR that includes "Closes #"; assignment is required before starting; follow the repo's existing style and conventions.


Wave complexity: Medium

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions