Go to file
Paul Trowbridge 8f94296ad2 Pin Perspective at 5.2.0 exact; drop non-functional viewer-d3fc
docs/perspective.md claimed the 4.5.1-core + 4.4.1-d3fc pair was "deliberate
and necessary — the only combination that keeps both" inline WASM bundling and
d3fc charts, and said do NOT fix it to 4.4.1. That was wrong: it does not keep
charts.

Loading viewer-d3fc@4.4.1 against a 4.5.x viewer throws
`get_static_config is not a function`, once per chart plugin — the newer viewer
calls a registration method the older plugins don't implement. Confirmed in the
running deployment: no chart type except Datagrid works. So the choice was never
"both"; it is inline bundling XOR charts, and dataflow was carrying mixed-version
complexity to buy charts it did not have.

- pin client/viewer/viewer-datagrid/server exact at 5.2.0 (was ^4.5.1 carets).
  The explicit `server` pin is required: client declares it as "" (an empty
  range) which npm resolves to latest, and a mismatched server WASM fails to
  link with `psp_opfs_load ... requires a callable`. That took pf_app down on
  2026-08-10. Five packages to pin, not four.
- drop the viewer-d3fc import. Restoring charts would require a coherent 4.4.1
  suite, which has no /inline export — trading bundled WASM for runtime fetching,
  to regain a feature no code path selects by name.

Verified: build succeeds; the entry chunk and the Pivot chunk it lazy-imports
contain zero CDN URLs and zero runtime `new URL(...perspective-server...)`
constructions; the app loads with every non-localhost request aborted, with no
console errors. dataflow's exact API surface — plugin.save/restore/draw,
view.set_depth, viewer.restore with plugin_config — behaves identically on
4.5.2 and 5.2.0.

NOT verified: the pivot rendering end-to-end, which is behind authentication.
Worth a manual click-through before merging.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBt3EtKaP9D2mmWJ6Q4bov
2026-08-17 21:37:44 -04:00
api Discover feed fields from real data; fix the sync window 2026-08-02 02:50:03 -04:00
database List override and transformed keys as source fields; show record id 2026-07-26 23:10:01 -04:00
docs Pin Perspective at 5.2.0 exact; drop non-functional viewer-d3fc 2026-08-17 21:37:44 -04:00
examples Consolidate documentation into docs/ and cut the duplication 2026-07-26 21:55:58 -04:00
ui Pin Perspective at 5.2.0 exact; drop non-functional viewer-d3fc 2026-08-17 21:37:44 -04:00
.env.example Add SimpleFIN Bridge sync as an alternative to CSV import 2026-08-01 12:47:04 -04:00
.gitignore Pin Perspective at 5.2.0 exact; drop non-functional viewer-d3fc 2026-08-17 21:37:44 -04:00
CLAUDE.md Update the docs for the reworked UI 2026-08-07 23:04:15 -04:00
dataflow.service Add unified deploy.sh and systemd service unit 2026-04-05 15:53:02 -04:00
manage.py Discover feed fields from real data; fix the sync window 2026-08-02 02:50:03 -04:00
package-lock.json Track package-lock.json for both the API and the UI 2026-07-26 21:54:10 -04:00
package.json Remove obsolete deploy scripts, migration helpers, and unused UI assets 2026-07-26 13:15:46 -04:00
README.md Consolidate documentation into docs/ and cut the duplication 2026-07-26 21:55:58 -04:00

Dataflow

A simple data transformation tool for importing, cleaning, and standardizing data from various sources.

Point it at a messy CSV — bank transactions, product lists, anything repetitive — and it will deduplicate on import, pull structure out with regex rules, map the extracted values to clean output, and serve the result through a web UI and REST API.

How it works

  1. Sources define where data comes from and which fields make a record unique
  2. Rules extract information with regex (extract or replace mode) — e.g. pull the merchant out of a transaction description
  3. Mappings turn extracted values into clean output — "DISCOUNT DRUG MART 32" → {"vendor": "Discount Drug Mart", "category": "Healthcare"}
  4. Records are then queryable, pivotable, and exportable

Each record keeps three layers: data (raw import), transformed (rule and mapping output), and overrides (manual edits). Reads merge them in that order, so re-running the rules never clobbers something you typed by hand.

Stack

PostgreSQL with JSONB storage, a Node.js/Express API, and a React SPA served from public/. HTTP Basic auth, configured in .env.

Getting started

Requires PostgreSQL 12+, Node.js 18+, and Python 3.

npm install
python3 manage.py     # interactive setup: .env, database, schema, functions, UI, service

The UI is then at http://localhost:3020 and the API at http://localhost:3020/api (port set by API_PORT in .env).

For a walkthrough that creates a source, adds rules and mappings, and imports the sample CSV in examples/, see docs/getting-started.md.

Documentation

docs/getting-started.md Tutorial — build a working pipeline from scratch with curl
docs/spec.md Full reference — architecture, schema, data flow, API, manage.py
docs/ui.md Frontend: React + Vite build, key packages
docs/perspective.md Pivot table: pinned versions and API reference

Project structure

dataflow/
├── manage.py           # interactive setup / deploy / uninstall
├── database/           # schema.sql + one .sql file per API route
├── api/                # Express server, routes, auth middleware
├── ui/                 # React source (built to public/)
├── public/             # built UI, served as static files
├── docs/
└── examples/           # sample CSV for the tutorial

Both the API routes and the SQL are organized one file per resource, so api/routes/rules.js and database/rules.sql are the two halves of the same feature.

database/*.sql is the source of truth for every database function — never edit one directly in the database, or the next redeploy will silently revert it.

License

MIT