PXCharts 4.0 Ships a Self-Hosted Multidimensional Table with 25 Field Types, 8 Views, and a Hand-Rolled Formula Engine
Teams that cannot or will not put sensitive operational data on a commercial SaaS now have a feature-comparable alternative they can run on their own infrastructure. The formula engine and automation guardrails are documented in enough detail to serve as a reference architecture for anyone building collaborative data tools.
PXCharts 4.0 bundles 25 field types — from text and selects to relations, rollups, and AI-generated columns — with eight live views (table, kanban, Gantt, calendar, gallery, form, hierarchy, chart) that all read and write the same underlying data. A hand-written formula engine supports 32 Excel-aligned functions and uses row-level incremental recalculation, dropping a 20,000-row edit from 86 ms to 0.006 ms. An automation engine with three triggers and seven actions (including webhooks, WeCom/DingTalk bots, and AI generation) includes an explicit guard against self-triggering infinite loops.
Real-time collaboration runs over a single WebSocket process colocated with the Next.js REST API, using a room model with presence. Writes go through SELECT … FOR UPDATE row locks inside transactions to prevent concurrent overwrites. The AI suite goes beyond a chat sidebar: an AI field type accepts prompt templates that reference other columns for batch generation, plus one-sentence table creation and natural-language filtering.
Thirty-two industry templates ship as fully editable projects, not static screenshots. The whole stack — Next.js 14, React 18, TypeScript 5, PostgreSQL with JSONB, Zustand, and the ws library — is open-source and designed for a single-port, single-process deployment that small teams can start with PM2.
PXCharts treats AI as a field-level primitive rather than a sidebar chatbot, which means AI output becomes a first-class column that other views, formulas, and automations can consume directly.
The decision to store an entire table's records in a single JSONB column simplifies reads dramatically but makes the FOR UPDATE row lock essential — it's a trade-off that works for small-to-medium tables but would need re-architecting at very high concurrency.
Broadcasting a pre-serialized JSON string to all room members instead of serializing per-client is a small optimization that compounds meaningfully in collaborative editing, where patch messages fire on every keystroke.
The automation engine's dead-loop guard is a single `continue` statement that checks value equality before applying an update — a reminder that production workflow engines often hinge on one well-placed line of defensive code.
Colocating the WebSocket server with the Next.js process eliminates cross-origin and deployment complexity at the cost of coupling; for a self-hosted tool aimed at small teams, that's a pragmatic choice that removes entire categories of operational friction.