Pascal is an open-source, local-first 3D building editor built with React Three Fiber and WebGPU, utilizing a Turborepo monorepo architecture. The system is designed for high-performance architectural modeling, featuring specialized systems for generating geometry for walls, slabs, ceilings, and roofs using three-bvh-csg for Boolean operations. State management is handled via Zustand, using a flat dictionary of nodes (Record<id, Node>) to represent hierarchical structures like Sites, Buildings, and Levels. To optimize performance, the editor employs a "dirty node" pattern: when a node is updated, it is marked as dirty in a Zustand store, and specialized React systems detect this flag during the render loop (useFrame) to recompute geometry via a scene registry. The platform is highly extensible through a plugin system that allows developers to contribute new node kinds and UI panels. Additionally, the editor supports AI integration through the Model Context Protocol (MCP), enabling agents to interact with scene tools and resources. Users can deploy the editor via a Next.js application or run a persistent local installation using Node.js 22.13+ via the @pascal-app/cli, which manages a local SQLite database at ~/.pascal/data/pascal.db.

Read original