Architecture and C++ development notes for the retained CAD engine. Applicable terms remain in LICENSE and cpp/LICENSE-chili-wasm.txt.
SolidFrame uses an npm workspace monorepo under packages/ with an interface-driven, pluggable backend architecture:
web ──> builder ──> app ──> core
──> i18n ──> core
──> three ──> core
──> ui ──> core + element
──> wasm ──> core
──> storage ──> core
element ──> core
core— Abstract interfaces (IShape,IShapeFactory), math (XYZ,Matrix4,Plane), document model, reactive data (Observable,Binding,PubSub),Result<T,E>, transactions/undo/redo, commands, serialization, plugin system, service container, UI abstractionswasm— ConcreteShapeFactorycalling into OCCT via Emscripten bindingsthree— Three.js viewport, camera controller, visual objects, highlighter, outline pass, gizmo, mesh exportelement— Custom reactive DOM elements (radio groups, expanders, data converters)ui— Application chrome: main window, ribbon/toolbar, property panels, project tree, dialogs, toast, status barapp— ConcreteApplication, body node classes, command implementations,CommandService,HotkeyServicebuilder—AppBuilderwith a fluent.useIndexedDB().useWasmOcc().useThree().useUI().build()chain and default ribbon layouti18n— Locale data (en, zh-cn, pt-br)storage— IndexedDB persistence layerweb— Entry point: callsAppBuilder, shows loading screen, parses URL parameters
- Frontend: TypeScript, Three.js (0.184)
- 3D Kernel: OpenCascade 8.0.0 (OCCT) compiled to WebAssembly via Emscripten
- Bundler: Rspack 2
- Linting & Formatting: Biome (TypeScript), clang-format (C++)
- Testing: Rstest + Happy-DOM
- Package Manager: npm workspaces
- Node.js
- npm
-
Clone the repository
git clone https://github.com/nazeeh111/SolidFrame.git cd SolidFrame -
Install dependencies
npm ci
Start the development server:
npm run dev # Launches at http://localhost:8080Build the application:
npm run buildThe prebuilt WASM module is included in the repository. If you want to build it from source:
-
Set up WebAssembly dependencies (one-time setup):
npm run setup:wasm
-
Build the WebAssembly module:
npm run build:wasm
npm run test # Run all tests (Rstest + Happy-DOM)
npm run testc # Tests with coverage
npm run check # Biome lint + auto-fix
npm run format # Biome + clang-format across all filesYou can also deploy with Docker:
docker compose up -d # Builds and serves the app at http://localhost:8080- TypeScript: Biome for linting and formatting — 4-space indent, 110-char line width, double quotes, semicolons always
- C++: clang-format with WebKit style
- Interfaces prefixed with
I(IShape,ICommand) camelCasefunctions/variables,PascalCaseclasses,UPPER_SNAKE_CASEconstants- Type-only imports:
import type { IFoo } from "..." - Pre-commit hooks via simple-git-hooks + lint-staged