The Problem
Designing 3‑D architecture diagrams usually requires a graphics‑heavy UI and custom data pipelines. Teams often cobble together ad‑hoc WebGL code, ending up with fragile, un‑testable demos that are hard to embed in existing portals.
What This Does
iCraft ships a browser‑based editor plus ready‑made React and Vue demos that expose a thin API for controlling scene objects. Core UI lives in demos/react/index.tsx, which aggregates 19 component imports (e.g., addon, animation, camerabar, serverstatus). Each demo (e.g., demos/react/addon/index.tsx) renders a self‑contained scene and showcases a single feature. The Vue counterpart lives under demos/vue/src/. Documentation and example markdown files under docs/ and blog/ describe the public API and usage patterns.
How It Is Wired
Execution starts at a Vite entry point such as demos/react/oilrefinery/src/main.tsx. Vite (config in demos/react/oilrefinery/vite.config.ts) bundles the app and mounts the root component from demos/react/index.tsx.
demos/react/index.tsximports 19 child modules – the most‑connected node in the import graph (instability = 1). It does no upstream imports, so changes here have the widest blast radius.- Each child demo (e.g.,
demos/react/addon/index.tsx,demos/react/serverstatus/StatusCard.tsx) imports shared helpers fromdemos/react/serverstatus/utils.tsordemos/react/refinery/utils.ts. The utilities are leaf nodes (instability ≈ 0), safe to modify. - The Vue demo follows a similar pattern:
demos/vue/src/main.jsloadsApp.vue, which composesHelloWorld.vue. No circular dependencies were detected.
Because the code base consists mainly of UI components, there is no database or external service interaction. The only side‑effects are DOM updates and loading of static assets (e.g., .iplayer files in public/). The import graph is shallow: the root index imports components, each component imports at most two utility modules, and those utilities import nothing else.
How To Use It
# clone the repo
git clone https://github.com/moses-y/icraft.git
cd icraft
# install React demo dependencies (lockfile missing – see Code Health)
cd demos/react/oilrefinery
npm install # or pnpm install if preferred
# start the Vite dev server (script defined in package.json)
npm run dev # typically launches http://localhost:5173
The Vue demo follows the same steps in demos/vue/. No environment variables or secret keys are required; all assets are bundled from the public/ folder.
Real‑World Use
A monitoring dashboard can embed the iCraft player component (player-react.README.md describes the Web component) and drive element states through the exposed API. For example, a backend service posts JSON to a WebSocket that the player listens to, updating server status colors in real time without a page reload.
Code Health & Issues
- High – Duplicated code blocks – 139 repeated 6‑line fragments across 18 demo files (e.g.,
demos/react/addon/index.tsx,demos/react/locale/index.tsx). - High – No test suite – 36 source files, 0 test files.
- High – Missing lockfile –
demos/react/oilrefinery/package.jsonhas nopackage-lock.json/pnpm-lock.yaml. - High – No CI pipeline – repository lacks
.github/workflowsor other CI config. - Medium – No Dependabot/Renovate – manifests present but no auto‑update bot.
- Medium – Large binaries in repo –
public/videos/iCraftEditor.mov(65 MB) and several > 60 MB.gif/.iplayerassets. - Low – Missing repo conventions – no
.editorconfig,.gitattributes, or formatter config.
All findings stem from deterministic static analysis; no additional issues are inferred.
The Bottom Line
iCraft provides a functional collection of React/Vue demos for 3‑D architecture visualization with clear component boundaries, but the code base suffers from duplicated UI logic, absent testing/CI, and unmanaged binary assets. It suits teams that need a quick visual prototype and are prepared to refactor the demos into a maintainable library. Adding tests, a lockfile, and CI will be essential before adopting it in a production pipeline.