Skip to content
eizedevPublic

About

The pivot report people build themselves, and your apps, scripts and AI clients reuse it. Drag fields into tables and charts, a million rows in the browser, export to Excel. One JSON view feeds React, a web component, the CLI, REST and MCP. MIT.

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

469 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

pivotkit

The pivot report people build themselves.
Your apps, scripts and AI clients reuse it.

pivotkit looks good, handles a million rows in the browser, and people get started without reading a manual first. Put it into the app you have, open it filtered from your dashboards, and let your own server feed it live data per person.

Table and chart side by side: the average temperature of six cities by month as a colour scale, and a line per city

Try pivotkit · Documentation · Comparison · Releases · Discussions

CI MIT

What pivotkit does

Someone builds a report by dragging fields. pivotkit keeps it as a view: plain JSON that cannot run code. Every part of pivotkit reads the same view, so the numbers stay the same wherever the report shows up.

One view, every output: people drag fields, pivotkit keeps the report as one view in plain JSON, and the same view feeds the report in your app, the Excel, CSV and HTML exports, the command line and CI, the REST service and the MCP server
  • For the people who read the data. Rows, columns, values and filters by drag and drop. Shares of a total, differences, running totals and ranks, top N, dates grouped by year, quarter or weekday: the feature list has them all. Table and chart side by side: a click on a number, or a double click on a bar or point, shows the rows behind it. The Excel export keeps layout and colour scales.
  • With their own file. Where the app allows it, people drop an Excel workbook, a CSV, TSV, text or JSON file onto the report. A preview shows what was read: pick the sheet, check each column's type. The file stays in the browser.
  • In your app. The React component, also in PowerShell Universal, or the web component <pivot-report> for pages without React, such as Angular or PHP. People answer new questions themselves, so you build fewer fixed reports.
  • From your server. One container runs the REST service and the MCP server. They read the sources you configure, check who signed in, through your OAuth sign-in provider or tokens you issue, and show each person only what the policy allows.
  • With AI clients. Claude, VS Code and other MCP clients build the same reports. The model gets rows only where the policy shows them: what reaches an AI model.

Drop in your own file

No upload. Where your app allows it, people drag a file onto the report, check a preview and work with the data a moment later.

A file dropped onto the report opens a preview, where people pick the sheet and check each column's type; Load data then shows the file's columns as fields, and Undo goes back to the app's data
  • Workbooks with several sheets: pick one, hidden sheets are marked. A saved view remembers its sheet.
  • German and English numbers and dates. A postcode such as 01067 stays text, and a value like 1,234 asks what it means.
  • Large files show their progress and can be cancelled. Excel files need the pivotkit-xlsx plugin.

Load your own data

Built into the app you already have

A dashboard shows the big picture. pivotkit answers the next question. A click on a bar in your own chart opens the report already filtered, and people drag on from there.

A click on a bar in your own dashboard sets the filter Region = North in the view, and the pivot report shows North only, ready for people to drag on

A few lines in your chart's click handler set the filter. A link can carry the same view, with its fields and filters. Open the report from your dashboard · Share and link views

Live data from your server

The report can read its rows from pivotkit-server itself. Your page hands it a short-lived token. The server checks who is asking, applies the policy and reads the source. Scripts and AI clients ask the same server and get the same numbers.

The report on your page or on the server's viewer page, a script and an AI client all ask pivotkit-server; it checks who is asking, applies the policy to rows and fields, and reads your sources: files, HTTP APIs or your own code

A live link opens the report with its filters on the server's viewer page, which signs the person in. Live rows (server) and the viewer page (rest.browser.viewer) are off by default. Live rows in the browser · Server in 5 minutes

Make it yours

pivotkit takes on your company's look and name instead of showing its own.

Your --pk- CSS tokens style the table and chart in light and dark, the HTML report and print, and the Excel export alike; the server's branding settings put your name, icon and links on its pages
  • Your design. Every colour, font, size, corner, focus ring and duration is a --pk-* CSS token. The chart, the HTML report, print and the Excel export take the same tokens. The report follows data-theme on your page or the system setting. Theming
  • Your words. English and German built in. Replace any text, or add your own language. Localisation
  • Your name. The REST service and the MCP server show your name and link your own documentation or none; the MCP server and its page show your icon: your own name and links. The view files the report writes can point to your own copy of the schema (schemaUrl).

See it

HTML report
Ready to print or save as PDF
The HTML report of the export: chart, table, source, filters and time
Export
Excel, CSV, chart image, copy
The Export menu: Excel, CSV, HTML report, chart image, print or PDF, copy, source data
Drill-down
Click a value to see its rows
The rows behind one value: a click on Dubai in February 2025 opens them beside the table
Charts
Average, trend and target lines
A line chart of monthly revenue with its average, trend and a target

Open a picture to see it full size. Every feature: feature list. Side by side with other pivot components, with a source and date for each cell: comparison.

Start here

Good to know

  • The report reads only what you give it: rows from your app, a file a person drops, which stays on the page, or a source on your own pivotkit-server.
  • It is measured up to 1,000,000 rows in the browser, on one Apple M4 machine: the first table takes 1 to 2.5 s, and the page waits meanwhile. A filter or a field then takes about 0.1 s. For more rows, aggregate on the server first. Measured performance
  • Charts: bars, stacked and horizontal bars, lines, area, pie, donut, heatmap, bars with lines, treemap.
  • It is not access control. Whoever sees the report can read every row the app passes. The server's policy decides what reaches a person or a model. Security · Security policy
  • pivotkit sends nothing home: network requests. The report runs in Chrome and Edge from 111, Firefox from 113 and Safari from 16.4: browser support. The engine, the command line and the services run in Node 24 or later. What works with pivotkit

Note

pivotkit is 0.x. A minor release (0.y to 0.y+1) can break things. Each break is marked Breaking in the changelog, and Upgrading says what to do. Versioning has the full promise.

Packages

pivotkit-node is internal: the command line and the server share it.

Example

The report builder in React. Try it in the playground:

import { PivotReport } from "pivotkit-react";
import "pivotkit-react/styles.css";

<PivotReport data={rows} defaultView={{ rows: ["Region"], values: [{ field: "Sales", agg: "sum" }] }} onViewChange={save} />

The web component and the engine without UI: Embed pivotkit.

The command line, on example files it writes itself:

npx pivotkit-cli example                 # sales.csv and two views
npx pivotkit-cli render sales.pivotkit.json --data sales.csv -o sales.html
npx pivotkit-cli render sales.csv --rows Region --values sum:Revenue -o by-region.html   # no view file

The REST service and the MCP server in a container, with example data. The server makes a token at its first start. Step by step: server in 5 minutes.

docker run -d --name pivotkit -p 127.0.0.1:3333:3333 \
  -v pivotkit:/var/lib/pivotkit ghcr.io/eizedev/pivotkit:0.7.1
curl -H "Authorization: Bearer $(docker exec pivotkit pivotkit-server token show admin)" \
  http://127.0.0.1:3333/api/v1/sources

The package READMEs are short npm pages that link to the documentation.

Development

Start with these:

npm ci
npm run lint
npm run types
npm test
npm run playground   # http://localhost:5173

Releases and changelogs

Each package has releases of its own. The GitHub releases list them with their notes. Each package keeps a CHANGELOG.md: core, react, element, xlsx, report, node, cli, server, mcp. Before you update, read Upgrading. Versioning says which releases may break things.

Questions and help

  • Questions, ideas and what you built with pivotkit: Discussions.
  • Bugs and concrete feature requests: issues.
  • Security problems: report them privately.

License

MIT. pivotkit draws its charts with Apache ECharts, licensed Apache-2.0.

The icon, header and social preview in assets/ and docs/assets/icon.svg come from eizedev/brand. Their licence is CC BY 4.0.

The screenshots of the weather show data by Open-Meteo.com (CC BY 4.0). It contains modified Copernicus Climate Change Service information 2023 (ERA5) and 2019 (ERA5-Land), and ECMWF IFS data. The other screenshots show generated sample sales data. The playground's real data sets keep the licences of their sources. examples/playground/data/SOURCES.md lists them.

About

The pivot report people build themselves, and your apps, scripts and AI clients reuse it. Drag fields into tables and charts, a million rows in the browser, export to Excel. One JSON view feeds React, a web component, the CLI, REST and MCP. MIT.

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

3 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages