1# AWS Website: Foldkit
2
3Deploys a [Foldkit](https://foldkit.dev) app to AWS with
4`AWS.Website.Foldkit` — the client build in S3 behind a CloudFront
5distribution, no CloudFormation templates. Foldkit apps are client-only
6Vite projects, so the deployment is assets-only and never creates a
7server function.
8
9- `src/main.ts` holds the Elm-architecture model/update/view; the page
10 renders a `card` view function (`src/components/Card.ts`) written in
11 plain TypeScript with `foldkit/html`.
12- Tailwind CSS v4 is wired through `@tailwindcss/vite` in the project's
13 own `vite.config.ts`, alongside `@foldkit/vite-plugin`.
14- Unmatched paths serve `index.html` (`spa` defaults on), so deep links
15 boot the app and Foldkit routes on the client.
16
17The integration package must be installed in the project (it is loaded
18dynamically at deploy time):
19
20```sh
21bun add -d @alchemy.run/frontend-frameworks
22```
23
24## Deploy
25
26```sh
27bun install
28bun run deploy
29```
30
31Unchanged sources skip the Vite build entirely on subsequent deploys —
32the input files are content-hashed (scoped by `memo.include`).
33
34## Local development
35
36```sh
37bun run dev
38```
39
40`alchemy dev` runs Vite's own dev server — Foldkit's HMR and devtools
41wiring work unchanged — and no AWS resources are created.
42
43## Destroy
44
45```sh
46bun run destroy
47```