t3-code-android-nightly/.repos/alchemy-effect/examples/prisma-website-nextjs
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00
..
app chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
public chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
test chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
.gitignore chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
alchemy.run.ts chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
next.config.mjs chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
package.json chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
postcss.config.mjs chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
README.md chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
tsconfig.json chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
tsconfig.next.json chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00

Prisma Website: Next.js

Deploys a real Next.js application with Prisma.Website.Nextjs.

An App Router page reads GREETING on each request. A client component increments a counter and calls /api/hello without a database.

Infrastructure

alchemy.run.ts uses Prisma.providers() and Alchemy.localState(). The helper uses the project root by default and creates a Prisma project with createDatabase: false for live deployments. No Docker daemon, registry, other cloud provider, or Postgres database is required.

The workspace supplies alchemy and @alchemy.run/frontend-frameworks through workspace:* dependencies. @vercel/nft is installed for Prisma artifact tracing. Install dependencies from the repository root before running commands in this directory. Authenticate Prisma using the Alchemy profile you intend to deploy with.

Deploy

bun run deploy --profile testing

The stack returns url. Framework configuration, application sources, and public assets are included in this example; the Website helper owns the deployment adapter.

Develop

bun run dev

This runs the local framework dev server without provisioning a Prisma project.

Verify

ALCHEMY_PROFILE=testing bun test test/integ.test.ts

The integration suite destroys previous stack state, deploys the actual app, requests its page, dynamic endpoint, verifies the static JSON asset, and destroys the stack. Set NO_DESTROY=1 only when intentionally keeping the deployment for inspection.

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. Every app also serves /example.json with a framework label and greeting.

Destroy

bun run destroy --profile testing