Skip to content

Latest commit

聽

History

History
37 lines (23 loc) 路 2.11 KB

File metadata and controls

37 lines (23 loc) 路 2.11 KB

Deployment guide

BaseKit is a static Vite app. It needs no backend, database, runtime secrets, server functions, or cross-origin isolation headers. Geometry, fonts, the Manifold WASM module, and STL/3MF generation all run in the browser.

Cloudflare Pages

Create a Pages project from the richardsolomou/basekit GitHub repository with these settings:

Setting Value
Production branch main
Build command pnpm build
Output directory dist
Root directory /

Set NODE_VERSION=24 in the build environment. pnpm reads its version from the packageManager field in package.json.

Pages creates a preview deployment for pull requests and a production deployment for main. No runtime environment variables are required. Configure VITE_POSTHOG_PROJECT_TOKEN, VITE_POSTHOG_HOST, POSTHOG_PROJECT_ID, POSTHOG_HOST, and the encrypted POSTHOG_API_KEY in the Pages build environment to enable telemetry and upload browser source maps; the personal API key is used only while building and is not included in dist/.

Custom domain

Add basekit.ras.sh under the Pages project's Custom domains settings. If Cloudflare manages the ras.sh zone, it creates the DNS record. Otherwise, add the CNAME target Cloudflare provides at the authoritative DNS provider.

Production verification

After the first production deploy:

  1. Open https://basekit.ras.sh and confirm the worker installs a mesh without console errors.
  2. Change the footprint and verify the triangle count changes before inspecting the updated model.
  3. Export one STL and one 3MF, then load both in a slicer or mesh checker.
  4. Confirm the favicon, BaseKit title, font, and Manifold WASM asset load from the custom domain.

The export check matters because the preview uses a lighter mesh while downloads rebuild circular geometry at a 1碌m chord tolerance.

Workers Static Assets

wrangler.jsonc describes the same dist/ directory for Workers Static Assets. Keep it aligned with the Pages build even when Pages is the production deployment path.