feat: add Prisma provider#416
Open
AmanVarshney01 wants to merge 123 commits into
Open
Conversation
86a9960 to
f2087fb
Compare
sam-goodwin
reviewed
May 25, 2026
Contributor
|
Are you planning on adding an effect-native ComputeApp Platform and Bindings? One that works like Cloudflare Workers or Lambda Function? |
f2087fb to
c3af6c7
Compare
Author
Interesting didn’t know about this. I’ll get back to you on this in a bit. |
c3af6c7 to
0952b7a
Compare
sam-goodwin
reviewed
Jun 1, 2026
sam-goodwin
reviewed
Jun 1, 2026
sam-goodwin
reviewed
Jun 1, 2026
sam-goodwin
reviewed
Jun 5, 2026
# Conflicts: # bun.lock
…rovider # Conflicts: # .oxfmtrc.json # bun.lock # packages/alchemy/package.json
…PI surface - rework ConnectionBinding to the single binding convention (alchemy-run#690): combined tag/callable + Binding.Host dispatch inside ConnectionBindingLive, drop Binding.Policy machinery and its Providers registrations - replace the removed Build/Command helper (alchemy-run#673) with a local spawner-based runBuildCommand in ComputeBuild - update shape-typed class forms to the id-only + .make(props, impl) Platform API - add the /v1/apps, /v1/deployments, and build-logs surface to the client, operation helpers, and route-parity tests (96-route coverage) - add ScmInstallation.connected/connectedAt, the connected list filter, and connectScmInstallation for the new SCM connect endpoint; unreleased routes are allowlisted until they ship to the production OpenAPI doc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prisma provider
This PR introduces the first production-grade Prisma provider for Alchemy.
It adds declarative resources for Prisma Postgres and Prisma Compute, aligns the provider with the current Prisma Management API, and supports both framework applications and Effect-native services. Resources reconcile from observed API state, recover safely from interrupted deployments, and avoid persisting Prisma credentials as plaintext.
Quick start
Provider surface
ProjectDatabase/PostgresBranchConnectionAppDeploymentComputeEnvironmentVariableCustomDomainSourceRepositoryThe provider also includes Management API operations, deployment log helpers, connection helpers, and runtime bindings for Prisma Compute, AWS Lambda, and Cloudflare Workers.
Prisma Postgres
Connection values remain typed Alchemy outputs and secret values are redacted. Applications can receive the conventional Prisma environment variables without manually extracting credentials:
A specific connection URL can also be selected explicitly:
Framework applications on Prisma Compute
Computeaccepts an explicit build contract orbuild: "auto". Automatic build detection supports Bun applications and common frameworks including Next.js, Nuxt, Astro, TanStack Start, and NestJS.Effect-native Compute
Effect applications can be deployed directly without introducing a separate server framework. Runtime database access is provided through a typed binding:
Local development and migrations
Database resources can configure
@prisma/devfor local development. Production migrations can use the direct database URL while the deployed application receives the pooled URL:The checked-in TanStack Start example includes transactional Prisma Next migrations, excludes production seed data, and keeps migration credentials separate from runtime credentials.
Production deployment lifecycle
A Compute update follows a fail-closed deployment sequence:
Failed or ambiguous operations preserve the last healthy deployment. Terminally failed deployments are never restarted or selected as rollback targets. A previous deployment is removed only after the replacement is fully promoted and healthy.
Additional hardening includes:
Management API compatibility
The implementation is synchronized with the current
prisma/pdp-control-planeManagement API:/v1/appsand/v1/deploymentsroutes200versus201behaviorExamples
Verification
bun tsc -b200404