Skip to content

Development

Prerequisites

  • Node 20+ and pnpm 9 (corepack enable provides it).
  • An AWS account only if you want to deploy — the canvas itself runs fully offline in the browser.

Setup

Terminal window
pnpm install
pnpm dev:app # canvas app → http://localhost:5173
pnpm dev:web # marketing site → http://localhost:4321
pnpm dev:docs # docs → http://localhost:4322
pnpm test # engine + API unit tests
pnpm typecheck # all packages

The app boots with apps/app/public/config.json (dev placeholders). If the config can’t be loaded it runs in local-only mode (drawing, autosave to IndexedDB, all exports work; cloud sync and sign-in are disabled) — the app never hard-depends on the backend.

API locally

Terminal window
# In services/api: run the router against fakes (unit tests) or deploy dev:
cd infra
npx cdk deploy -c env=dev --all
# Then point the app at the deployed API:
VITE_DEV_API_PROXY=https://api.dev.frond.cntnus.app pnpm --filter @frond/app dev

The Lambda can also run with AUTH_DISABLED=true and the dev-<sub> token convention for local integration testing (never enabled in deployed environments).

Conventions

  • TypeScript strict everywhere; pnpm typecheck in CI before synth.
  • The engine must stay framework-free; DOM use is limited to canvas/pointer APIs, all behind the FrondEngine facade.
  • Nothing may hardcode a domain, account ID, or region — everything flows through configuration (see Configuration).
  • Conventional Commits; main deploys to dev automatically.