This is a Lakebed capsule. Build the app inside this directory using the Lakebed v0 contract.
server/index.ts: schema, queries, and mutations.client/index.tsx: Preact UI entrypoint.shared/: pure TypeScript shared by client and server.
Run locally:
lakebed devDeploy:
lakebed deployInspect local state while lakebed dev is running:
lakebed db list --port 3000
lakebed db dump --port 3000
lakebed logs --port 3000- Use
lakebed/serveronly fromserver/index.ts. - Use
lakebed/clientonly fromclient/index.tsx. - Do not import npm packages from app code.
- Do not use Node built-ins in app code.
- Use Tailwind classes directly in JSX.
- Do not add a CSS, PostCSS, or Tailwind build pipeline.
- Use auth through
ctx.authon the server anduseAuth()on the client. - Read server-only environment variables through
ctx.env; define them in.env.lakebed.server. - Add Google sign-in with
<SignInWithGoogle />orsignInWithGoogle()fromlakebed/client. - Keep
shared/free of DOM, Node, env, and Lakebed runtime imports.
- One server entry.
- One client entry.
- Guest auth locally, with built-in Google sign-in through Shoo.
- No file storage.
- No outbound fetch in anonymous deploys. Claim the deploy before using server-side fetch.
- Non-empty
.env.lakebed.serverfiles sync only after a deploy is claimed. - Local state resets when
lakebed devrestarts.