| 1 | # Prisma Website: Vite |
| 2 | |
| 3 | Deploys a real Vite application with `Prisma.Website.Vite`. |
| 4 | |
| 5 | A React counter and a button that fetches `/example.json`. Vite builds a browser-only SPA; no backend or database is needed. |
| 6 | |
| 7 | ## Infrastructure |
| 8 | |
| 9 | `alchemy.run.ts` uses `Prisma.providers()` and `Alchemy.localState()`. |
| 10 | The helper uses the project root by default and creates a Prisma project with |
| 11 | `createDatabase: false` for live deployments. No Docker daemon, registry, |
| 12 | other cloud provider, or Postgres database is required. |
| 13 | |
| 14 | The workspace supplies `alchemy` and `@alchemy.run/frontend-frameworks` through |
| 15 | `workspace:*` dependencies. `@vercel/nft` is installed for Prisma artifact tracing. |
| 16 | Install dependencies from the repository root before |
| 17 | running commands in this directory. Authenticate Prisma using the Alchemy profile |
| 18 | you intend to deploy with. |
| 19 | |
| 20 | ## Deploy |
| 21 | |
| 22 | ```sh |
| 23 | bun run deploy --profile testing |
| 24 | ``` |
| 25 | |
| 26 | The stack returns `url`. Framework configuration, application sources, and public |
| 27 | assets are included in this example; the Website helper owns the deployment adapter. |
| 28 | |
| 29 | ## Develop |
| 30 | |
| 31 | ```sh |
| 32 | bun run dev |
| 33 | ``` |
| 34 | |
| 35 | This runs the local framework dev server without provisioning a Prisma project. |
| 36 | |
| 37 | ## Verify |
| 38 | |
| 39 | ```sh |
| 40 | ALCHEMY_PROFILE=testing bun test test/integ.test.ts |
| 41 | ``` |
| 42 | |
| 43 | The integration suite destroys previous stack state, deploys the actual app, |
| 44 | requests its page, verifies the static JSON asset, and destroys the stack. |
| 45 | Set `NO_DESTROY=1` only when intentionally keeping the deployment for inspection. |
| 46 | |
| 47 | For browser validation, open the returned URL. Click **count: 0**; it becomes **count: 1**. Click **Load greeting** and check that the greeting appears below the button. |
| 48 | Every app also serves `/example.json` with a framework label and greeting. |
| 49 | |
| 50 | ## Destroy |
| 51 | |
| 52 | ```sh |
| 53 | bun run destroy --profile testing |
| 54 | ``` |