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.
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/.
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.
After the first production deploy:
- Open
https://basekit.ras.shand confirm the worker installs a mesh without console errors. - Change the footprint and verify the triangle count changes before inspecting the updated model.
- Export one STL and one 3MF, then load both in a slicer or mesh checker.
- 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.
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.