Skip to content

[FEATURE] Generate CSV/PDF of Dashboard Metrics #475

@codeZe-us

Description

@codeZe-us

Create a backend API route that generates a downloadable CSV or PDF report summarizing the dashboard's financial metrics over a requested date range.

Contribution Guide

  • PRs go to the dev branch, not main
  • Please application must explain a short specific approach to this task
  • PR description must clearly describe what you built and changed
  • Link your PR to the correct issue number

Implementation Guidelines

  • Key files: src/app/api/v1/dashboard/export/route.ts, src/server/utils/export.utils.ts
  • Create a GET method accepting ?format=csv (or pdf) and date range parameters.
  • Aggregate the metrics from the DB and use a library like json2csv or pdfmake to generate the file buffer.
  • Set proper Content-Disposition headers to trigger a file download in the browser.

Expectations

  • What done looks like: Hitting the endpoint initiates an immediate file download in the browser containing accurate financial summaries for the specified dates.
  • Discord for questions: codeze_us

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions