1# Cloudflare Website: Foldkit
2
3Deploys a [Foldkit](https://foldkit.dev) app to Cloudflare Workers with
4`Cloudflare.Website.Foldkit` — no `main` entry, build command, or
5Wrangler configuration. Foldkit apps are client-only Vite projects:
6Alchemy runs Vite with the project's own `vite.config.ts` and serves
7the client build as static assets — no Worker code runs at request
8time.
9
10- `src/main.ts` holds the Elm-architecture model/update/view; the page
11 renders a `card` view function (`src/components/Card.ts`) written in
12 plain TypeScript with `foldkit/html`.
13- Tailwind CSS v4 is wired through `@tailwindcss/vite` in the project's
14 own `vite.config.ts`, alongside `@foldkit/vite-plugin`.
15- Unmatched paths serve `index.html` (SPA fallback) by default, so deep
16 links boot the app and Foldkit routes on the client.
17
18## Deploy
19
20```sh
21bun install
22bun run deploy
23```
24
25Unchanged sources skip the Vite build entirely on subsequent deploys —
26the input files are content-hashed (scoped by `memo.include`).
27
28## Local development
29
30```sh
31bun run dev
32```
33
34`alchemy dev` runs Vite's own dev server — Foldkit's HMR and devtools
35wiring work unchanged.
36
37## Destroy
38
39```sh
40bun run destroy
41```