| 1 | # Railway Website: Foldkit |
| 2 | |
| 3 | Deploys a [Foldkit](https://foldkit.dev) site to Railway with |
| 4 | `Railway.Website.Foldkit` — no adapter setup in the project config. |
| 5 | |
| 6 | Alchemy generates a Dockerfile and uploads the SPA; Railway builds and serves it. |
| 7 | Foldkit apps are client-only Vite projects, so the deploy is assets-only. |
| 8 | |
| 9 | - `src/main.ts` holds the Elm-architecture model/update/view. |
| 10 | - `src/components/Card.ts` is a view function styled with Tailwind utilities. |
| 11 | - Unmatched paths serve `index.html` so deep links boot the app. |
| 12 | |
| 13 | ```ts |
| 14 | const site = yield* Railway.Website.Foldkit("Foldkit"); |
| 15 | ``` |
| 16 | |
| 17 | The integration package must be installed in the project (it is loaded |
| 18 | dynamically at deploy time): |
| 19 | |
| 20 | ```sh |
| 21 | bun add -d @alchemy.run/frontend-frameworks |
| 22 | ``` |
| 23 | |
| 24 | ## Deploy |
| 25 | |
| 26 | ```sh |
| 27 | bun run deploy |
| 28 | ``` |
| 29 | |
| 30 | Unchanged sources skip the build entirely on subsequent deploys — the |
| 31 | input files are content-hashed (scoped by `memo.include`). |
| 32 | |
| 33 | ## Dev |
| 34 | |
| 35 | ```sh |
| 36 | bun run dev |
| 37 | ``` |
| 38 | |
| 39 | `alchemy dev` runs the framework's own dev server (HMR included) and |
| 40 | no cloud resources are created. |
| 41 | |
| 42 | ## Destroy |
| 43 | |
| 44 | ```sh |
| 45 | bun run destroy |
| 46 | ``` |