Skip to content
CADCAMFUN
Docs

Documentation

Technology stack

Versions and responsibilities taken from workspace manifests and runtime configuration.

Runtime and service framework

The root manifest selects bun@1.4.4 as the package manager. Bun installs the workspaces, runs bun:test, type checks with the built-in bun check, serves the sidecar, provides SQLite and password hashing APIs, and compiles the sidecar binary. Desktop frontend development uses Vite, and native packaging uses Rust and Tauri.

Application services use effect@4.0.0-rc.112. The same exact release is declared across the workspaces that depend on Effect, including the API, database, core, desktop, workflow, and sidecar. Root overrides align the node platform packages to that release. Effect supplies typed errors, schemas, service context, layers, concurrency, and HTTP APIs.

The code uses the v4 service form Context.Service and HTTP modules under effect/unstable. Version-matched documentation is installed at packages/db/node_modules/effect/ai-docs/src/. Keep dependency upgrades coordinated across consumers.

Database and contracts

Persistence uses drizzle-orm@1.0.0-beta.22 with bun:sqlite. Database migration generation uses the matching drizzle-kit release. The schema is TypeScript; generated migration directories contain the SQL and migration metadata used during upgrades.

Effect HttpApi defines the HTTP contract. The workspace code generator compiles that contract to Promise and Effect client outputs. Zod is also present in API and AI dependencies for integrations that require it; it does not replace HttpApi's boundary schemas.

Desktop and graphics

The desktop uses solid-js ^1.9.0, @solidjs/router ^0.15.0, vite ^7.0.0, and Tailwind CSS 3. The workbench uses Kobalte controls, Lucide icons, Monaco editing, and Chart.js where the corresponding features need them.

The viewport uses three ^0.180.0. Core geometry is separate from rendering; three-csg-ts and occt-import-js 0.0.23 support additional desktop geometry/import paths. Tauri v2 supplies native API access, dialogs, shell operations, logging, OS integration, and updater integration through installed plugins.

AI runtime

@cadcamfun/ai pins @nikcli-ai/sdk-next 1.428.0 and ai 7.0.127. Direct model adapters include Anthropic, OpenAI, OpenAI-compatible providers, and the AI SDK gateway. The sidecar selects the embedded nikcli host by default or the direct host through CADCAMFUN_AI_HOST.

Application tools and action schemas sit above provider transport. Changing a provider does not create a second action catalogue. Model connectivity, credentials, cancellation, and session behavior are documented in the AI reference.

Mobile and documentation

The mobile manifest uses Expo ~57.0.27, React 19.2.3, React Native 0.86.3, and Expo Router ~57.0.25. Its custom companion transport is a native module. NativeWind, Reanimated, Gesture Handler, SecureStore, and local authentication support the mobile application.

This site uses Astro ^5.14.1 with the Cloudflare adapter, MDX and Tailwind integrations. Documentation pages are prerendered; assistant, Markdown, Studio fallback, and artifact routes run on the server. The local Studio API runs in Bun because it uses bun:sqlite.

Type checking uses Bun's built-in checker, bun check, which reads each workspace's tsconfig.json and reports the same diagnostics as tsc. The manifest ranges describe allowed dependency versions; the lockfile records the installed resolution.

The documentation site uses Astro 5 with the Cloudflare adapter, MDX, and Tailwind (packages/web/package.json). The desktop webview reaches native code through @tauri-apps/api v2.

What runs in each environment

EnvironmentCode it runsRelevant limitation
Bun sidecarEffect server/services, Drizzle, bun:sqlite, provider clients, workflow and history orchestration.A browser or Cloudflare Worker cannot directly substitute for Bun's SQLite runtime.
Desktop webviewSolidJS state and interaction, core geometry, Three.js, API client.Native operations require Tauri commands; browser preview supplies a different integration environment.
Rust shellTauri lifecycle, native window/menu/tray, secure commands, updater.A successful Vite build does not build or validate the native application bundle.
Expo applicationReact Native screens and native companion transport.Expo Go lacks the custom pinning module; JavaScript export does not produce a native installer.
Cloudflare documentation WorkerServer routes for Markdown, assistant requests, and guide artifacts.It has no implicit access to a local sidecar or SQLite file; bindings and backend configuration are explicit.
Local Studio processBun HTTP server and direct read access through selected Drizzle tables.The configured existing database and account session are independent from desktop discovery.

Use the build artifact corresponding to the environment being tested. Frontend output, a compiled sidecar, migration resources, an exported mobile bundle, and signed native installers are distinct outputs even when one command coordinates several stages.

Pinned versions

LayerTechnologyVersion (from package manifests)
Package manager / runtimeBun1.4.4 (packageManager)
Service frameworkEffect4.0.0-rc.112 (all workspaces, with platform-bun and opentelemetry at the same version)
Databasedrizzle-orm / drizzle-kit, bun:sqlite1.0.0-beta.22
Desktop shellTauri2 (Rust crates and @tauri-apps/* ^2)
Desktop UISolidJS, @solidjs/router, Kobalte^1.9.0, ^0.15.0, ^0.13.0
3Dthree.js, three-csg-ts^0.180.0, ^3.2.0
STEP importocct-import-js0.0.23
Code editormonaco-editor^0.57.0
BundlerVite^7.0.0
AIai (Vercel AI SDK), @ai-sdk/anthropic, openai, gateway, openai-compatible, @nikcli-ai/sdk-next7.0.127, 4.0.71, 4.0.83, 4.0.103, 3.0.62, 1.428.0
Validation (AI tools)zod^4.1.8
TelemetryOpenTelemetry SDK + OTLP/HTTP exportersapi 1.9.1, sdk 2.12.0, exporters 0.223.0
MobileExpo, React Native, React~57, 0.86.3, 19.2.3
DocsAstro, Tailwind, Cloudflare adapter, wrangler^5.14.1, ^3.4.17, ^12.0.0, 4.103.0
Type checkingBun bun check, TypeScript (editor support only)1.4.4, ^5.9.0
Monorepo tasksturbo^2.11.7

Rust crates in the desktop shell

CrateUsed for
tauri (tray-icon, macos-private-api)Windows, tray, IPC
tauri-plugin-shellLaunching the sidecar binary
tauri-plugin-dialog, -fs, -openerFile pickers, file access, opening paths and URLs
tauri-plugin-updaterSigned in-app updates
tauri-plugin-log, -osLogging, platform detection
tauri-plugin-single-instance, -window-stateOne running app; restore window geometry (desktop targets)
tauri-plugin-liquid-glass (optional)macOS glass effect with a vibrancy fallback
tokio, serde, thiserror, getrandom, logAsync supervision, IPC payloads, typed errors, launch tokens

Why these choices

  • Bun runs the tests, the scripts and the sidecar, and compiles the sidecar into one native binary, so the desktop ships without a separate JavaScript runtime.
  • Effect gives every service typed errors, scoped resources (the database handle and child processes are released on shutdown) and one HttpApi definition used by server, clients, generated SDKs and the API reference.
  • SQLite keeps each installation self-contained: one file plus a WAL, backed up before each schema upgrade.
  • Tauri uses the system webview and a small Rust shell, which owns the sidecar process, native menus, the updater and the keychain.
  • three.js renders the viewport; the same library draws the 3D previews on these documentation pages.

In 3D

The stack by dependency depth Drag to orbit · scroll to zoom · right-drag to pan
All 13 workspace packages from their package.json files; each line is a workspace:* dependency (17 in total). Rows are dependency depth: packages with no workspace dependencies at the front, the sidecar, which depends on 8 of them, at the back. Orange boxes are apps. core is the base the rest builds on.