CSV export

A custom component that gathers the rows of one table the viewer is allowed to see (up to 5,000, newest first) and offers them as a CSV file that opens in any spreadsheet. Pick the columns or let it use every field. The template adds it with an Export page for the role you choose.

CSV export: the Export page, added to Relay, on desktopCSV export: the Export page, added to Relay, on a phone

What it adds to your app

Component CsvExport (props: title, entity, columns). An Export page.

Pages

  • /export Export (‹page_role›)

Components

  • CsvExport Download the rows of a table the viewer may see as a CSV file, with a preview of the first rows

Set it up

It merges into the contract of an app you already have. Nothing is overwritten: a name you already use is refused until you pass a prefix.

  1. Pick the project

    Use the button above, or ask your coding agent with the Appbricx MCP server connected (quickstart).

  2. Point it at your tables and roles

    Leave out the ones with defaults; a wrong one is refused with the options your app has.

    ParamWhat it isExample
    entityThe table the Export page offers as CSV.order
    page_roleThe role the Export page is for. Optional.staff
  3. Preview, then apply to dev

    A dry run shows the diff and the check report; applying it changes your dev environment only.

  4. Deploy

    When dev looks right, deploy. Production gets a snapshot first, so you can roll back.

Use it with your coding agent

The agent reads the template, runs a dry run, shows you the diff and applies it.

Prompt
Add the CSV export template (slug "csv-export") to my Appbricx project. Read it with get_template, run use_template with dry_run first and show me the diff, then apply it. Ask me where it attaches if you can't tell from my contract (entity: table to export; page_role: who sees the export page).
MCP call
{
  "tool": "use_template",
  "arguments": {
    "slug": "csv-export",
    "project_id": "<your project id>",
    "params": {
      "entity": "order",
      "page_role": "staff"
    },
    "dry_run": true
  }
}
CLI
appbricx templates use csv-export --param entity=order --param page_role=staff --dry-run

Your agent adds it. Appbricx runs it.