The client of ClassCAD's account backend, for web pages: sign-in (email and password, Google, GitHub), the
account, plans and checkout, and the engine keys an account's plan allows. classcad.ch and buerligons.io are
built with it.
npm install @buerli.io/backend
import { AuthForm, useBackend, fetchEngineKey } from '@buerli.io/backend'
function Account() {
const isSignedIn = useBackend(b => b.user.isSignedIn)
return isSignedIn ? <p>Signed in.</p> : <AuthForm />
}
// once signed in: a key for ClassCAD in this page, as the account's plan allows
const { key } = await fetchEngineKey({ appType: 'wasm', client: 'my-page' })
It talks to the backend of the address it is served on: the live one, or the develop backend on localhost and
the staging sites. React 18 or 19.
It is developed in buerli (packages/backend), with a version of
its own.