| 1 | # AWS Website: React Router |
| 2 | |
| 3 | Deploys a [React Router](https://reactrouter.com) v7 (framework mode) |
| 4 | app to AWS with `AWS.Website.ReactRouter` — no adapter setup and no |
| 5 | CloudFormation templates. The SSR server runs on a streaming Lambda |
| 6 | Function URL; client assets deploy to S3 behind a CloudFront |
| 7 | distribution. |
| 8 | |
| 9 | - `app/routes/home.tsx` is server-rendered in the Lambda on every |
| 10 | request; its loader reads the `GREETING` environment value declared in |
| 11 | `alchemy.run.ts` from `process.env`. |
| 12 | - `app/components/Card.tsx` is a React component styled with Tailwind |
| 13 | utilities (wired through `@tailwindcss/vite` in `vite.config.ts`). |
| 14 | - Everything under `public/` deploys as static assets. |
| 15 | |
| 16 | The integration package must be installed in the project (it is loaded |
| 17 | dynamically at deploy time): |
| 18 | |
| 19 | ```sh |
| 20 | bun add -d @alchemy.run/frontend-frameworks |
| 21 | ``` |
| 22 | |
| 23 | ## Deploy |
| 24 | |
| 25 | ```sh |
| 26 | bun run deploy |
| 27 | ``` |
| 28 | |
| 29 | Unchanged sources skip the React Router build entirely on subsequent |
| 30 | deploys — the input files are content-hashed (scoped by `memo.include`). |
| 31 | |
| 32 | ## Destroy |
| 33 | |
| 34 | ```sh |
| 35 | bun run destroy |
| 36 | ``` |