{"slug": "i-tested-the-entire-prisma-platform-on-my-project-the-good-what-broke-and-the", "title": "I Tested the Entire Prisma Platform on My Project: The Good, What Broke, and the Cloud Bill", "summary": "A solo developer ran the Sellary digital-commerce platform on Prisma Postgres and Prisma Compute in an isolated staging lab, with an AI coding agent performing setup, to test whether the full Prisma platform could run the app end-to-end. The experiment kept production untouched by using separate database credentials, test-mode Razorpay keys and dummy CI secrets, and found that a naive `prisma migrate deploy` against a clean database would have left 32 of 36 tables missing, requiring a generated baseline SQL script. The writeup also flagged a Windows PowerShell BOM issue that breaks PostgreSQL imports and covers latency, pricing and the resulting cloud bill.", "body_md": "A few months ago, I wrote an article titled [*“I Reduced Prisma Database Operations by 60% Without Upgrading My Database”*](https://medium.com/@amanbind898/i-reduced-prisma-database-operations-by-60-without-upgrading-my-database-d4101e7b191d). In that post, I shared how profiling slow queries with `EXPLAIN ANALYZE` helped us cut database operations on my project, **Sellary** ([sellary.in](https://sellary.in))—a digital commerce platform for Indian creators.\n\nShortly after publishing it, Martin Janse van Rensburg from the Prisma team reached out with an intriguing challenge:\n\n*\"Since you already use Prisma ORM, would you be up for a follow-up running Sellary on the whole Prisma platform, adding [Prisma Postgres](https://www.prisma.io/postgres) and [Prisma Compute](https://www.prisma.io/compute), with an AI agent doing the setup?\"*\n\nMartin offered two months of trial credits and asked for an honest, unfiltered take: setup experience, developer experience, latency, pricing, and what broke along the way.\n\nAs a solo developer running an independent project, my rule is simple: **you never risk customer data or production uptime on an infrastructure experiment.** Sellary currently runs in production on Next.js 16 (App Router), Prisma ORM 6, and Supabase Postgres with Vercel hosting—and our hosting bill is currently **$0/month**.\n\nSo we established a strict ground rule: **Zero risk to production.** To us, \"zero risk\" meant far more than just creating a git branch. We set three strict rules to keep our production data 100% safe:\n\n**1. Completely Separate Database Credentials:**\n\nThe staging application only ever connected to a freshly provisioned Prisma Postgres database in Singapore (`sellary-staging-db`). Production Supabase connection strings (` SUPABASE_DATABASE_URL` / `SUPABASE_DIRECT_URL`) were never injected into the experiment's GitHub Secrets or staging environment. If a query went rogue, it had zero network access to production tables.\n\n**2. Sandbox External Services:**\n\nSellary handles real money via Razorpay. For staging, payment gateways were strictly bound to test-mode keys (`rzp_test_...`), and webhook secrets were dummy-scoped. A complete checkout could be executed in staging without touching live payment rails or triggering creator payouts.\n\n**3. Using Dummy Secrets in GitHub Actions:**\n\nNext.js App Router analyzes routes at build time. To prevent production secrets from being needed on GitHub Actions runners (or logged in build traces), we injected mock credentials and used `SKIP_ENV_VALIDATION=1` during the CI build step, keeping production secrets completely air-gapped from the build pipeline.\n\nWe created an isolated staging lab on a dedicated git branch (`experiment/prisma-infrastructure`), equipped an AI coding agent with official Prisma skills, and evaluated whether [Prisma Postgres](https://www.prisma.io/postgres) and [Prisma Compute](https://www.prisma.io/compute) could run Sellary end-to-end.\n\nHere is an honest breakdown of what worked, the friction points we hit, and the economics.\n\nSellary isn't a simple demo app. Our database schema contains **36 models, 28 enums, and over 1,400 lines in `schema.prisma`**, alongside raw SQL queries with PostgreSQL-specific features like `FILTER (WHERE ...)` and `ON CONFLICT DO UPDATE`.\n\nBecause the project had evolved rapidly during early development, our migration history was behind our schema. If we had naively run `prisma migrate deploy` against a clean database, **32 out of our 36 tables would have been completely missing.**\n\nRather than trying to guess, we used Prisma's migration engine to generate a clean baseline SQL script:\n\n```\nnpx prisma migrate diff --from-empty --to-schema-datamodel prisma/schema.prisma --script > prisma/baseline.sql\n```\n\n**The Windows Catch:** If you run this in PowerShell on Windows, default redirection emits UTF-8 with a Byte Order Mark (`EF BB BF`). PostgreSQL's query engine rejects this with a syntax error at byte 0. We stripped the BOM using an explicit UTF-8 encoding stream before applying it.\n\nOnce applied to our Singapore staging database (`ap-southeast-1`), we verified parity:\n\n```\nnpx prisma migrate diff --from-schema-datamodel prisma/schema.prisma --to-url \"$DATABASE_URL\"\n# Output: No difference detected.\n```\n\nAll 36 models, indexes, and relations mapped cleanly with zero application query rewrites.\n\n[Prisma Compute](https://www.prisma.io/compute) runs containerized workloads powered by Bun. We configured Next.js 16 for standalone output (`output: 'standalone'` in `next.config.ts`) and defined our micro-container service using Prisma Composer in `service.ts` and `module.ts`:\n\n``` python\nimport nextjs from '@prisma/composer/nextjs';\nimport { compute } from '@prisma/composer-prisma-cloud';\n\nexport default compute({\n  name: 'web',\n  deps: {},\n  build: nextjs({ module: import.meta.url, appDir: '.' }),\n});\n```\n\nWe then set up GitHub Actions using `prisma/cloud-deploy-action@v1` to build and deploy on every push to our staging branch.\n\nThat is where we encountered the real-world friction.\n\nWhen bridging bleeding-edge developer tools with an existing codebase, edge cases happen. Here are the three specific hurdles we encountered:\n\n`prisma deploy module.ts`). In GitHub Actions, `prisma/cloud-deploy-action` checks if `node_modules/.bin/prisma` exists. Because `npm ci` installs Prisma 6, the action executed the local binary—which lacks the `deploy` verb—causing the CI runner to halt.`build-command`:\n\n```\n  build-command: >-\n    npm run build &&\n    rm -f node_modules/.bin/prisma node_modules/.bin/prisma.cmd\n```\n\nNext.js builds cleanly with Prisma 6, unlinks the local binary, and allows the deployment step to fall back to the bundled Prisma 8 Compute CLI via Bunx.\n\n`$prismaConfig: 1` Marker Trap\n`prisma.config.ts` by checking for an internal marker: `value[\"$prismaConfig\"] === 1`. In a hybrid repo on Prisma 6, importing `definePrismaConfig` from `@prisma/cli-engine` breaks local commands like `npx prisma generate`.\n\n```\n  function definePrismaConfig<T extends Record<string, any>>(config: T) {\n    return Object.freeze({ ...config, $prismaConfig: 1 });\n  }\n\n  const isComposerCommand =\n    process.argv.some((arg) => arg === 'deploy' || arg === 'dev') ||\n    Boolean(process.env.PRISMA_COMPOSER || process.env.PRISMA_DEPLOY);\n\n  export default isComposerCommand\n    ? definePrismaConfig({\n        composer: composer({\n          extensions: [prismaCloud({ region: 'ap-southeast-1' }), nodeBuild(), nextjsBuild()],\n          state: prismaState(),\n        }),\n      })\n    : {};\n```\n\nStandard ORM commands receive `{}` (so Prisma 6's strict validator doesn't crash), while Compute commands get the valid marker.\n\n`next build` static page generation. Missing live staging secrets in the build runner halted CI.`SKIP_ENV_VALIDATION=1`, converted SDK constructors to lazy getters, and wrapped static ISR queries in build fallbacks.\nOnce deployed to our staging URL in Singapore (`sin.prisma.build`), we ran a complete acceptance test:\n\n`User` model on `sellary_sid` JWT cookie through Edge middleware.`₹10`), verifying database persistence in the `Product` table.`/product/test`) to verify that the page loads real data from the database properly on **The Numbers:**\n\n`POST /api/v1/ping` with `prisma.creatorProfile.updateMany`.\nEverything functioned smoothly with zero application query modifications.\n\nNow, let's talk about the cloud bill and [Prisma's pricing structure](https://www.prisma.io/pricing).\n\nPrisma offers a **Free plan ($0/month)** that includes **200,000 database operations, 2 GB of storage, and 1,000,000 Compute requests a month** with no credit card required. For teams needing more capacity and backups, the Starter plan costs **$10.00 / month** and includes custom spend limits. \n\nThe Starter plan features:\n\nThe Catch for Independent Projects:\n\nAdditional database operations on paid plans cost **$8.00 per 1,000,000 operations**.\n\nIn my previous article, I showed how eliminating N+1 queries cut our operations by 60%. In an operations-metered cloud model, **query optimization is directly linked to your cloud bill.**\n\nIf you have 24/7 background crons (e.g., an analytics flush running every 15 minutes = 2,880 runs/month, or hourly settlement tasks), unbatched queries can chew through your operation allowance before real users even visit your site.\n\nThis naturally brings up the concern of surprise bills. Fortunately, **every paid plan allows you to set a hard spend limit in the Prisma Console.** You choose the exact ceiling, and your monthly bill cannot exceed that number. This completely eliminates the fear of runaway overage charges.\n\nStill, on Supabase Free, database operations are unmetered (pooled and connection-throttled), and Vercel Hobby covers our frontend traffic with zero overage risk. For an independent project funded out of pocket, **$0/month with zero surprise bill risk** remains our baseline.\n\nTesting [Prisma Compute](https://www.prisma.io/compute) and [Prisma Postgres](https://www.prisma.io/postgres) gave us high confidence that the unified Prisma platform can run a real, full-stack Next.js 16 application end-to-end. The branch-bound database isolation and fast container initialization are fantastic for staging workflows.\n\n**Our Path Forward:**\n\n**Suggestions for the Prisma Team:**\n\n`install-command: none` to cleanly skip dependency installation.\nHuge thanks to Martin Janse van Rensburg and the Prisma team for providing trial credits, asking for an unfiltered evaluation, and supporting builders.", "url": "https://wpnews.pro/news/i-tested-the-entire-prisma-platform-on-my-project-the-good-what-broke-and-the", "canonical_source": "https://dev.to/amanbind898/i-tested-the-entire-prisma-platform-on-my-project-the-good-what-broke-and-the-cloud-bill-4gje", "published_at": "2026-11-20 18:09:19+00:00", "updated_at": "2026-11-20 18:14:14.948386+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools"], "entities": ["Prisma", "Sellary", "Prisma Postgres", "Prisma Compute", "Supabase", "Vercel", "Razorpay", "Martin Janse van Rensburg"], "also_reported_by": [], "takeaway": "A schema with 36 models and 1,400 lines of schema.prisma had drifted from its migration history, so a clean deploy would have created only 4 of 36 tables; generating a baseline with `prisma migrate diff --from-empty --to-schema-datamodel` and stripping the PowerShell UTF-8 BOM fixed it.", "recommendation": {"advice": "Before pointing a staging deploy at a fresh database, generate a baseline migration with `prisma migrate diff --from-empty` and strip the UTF-8 BOM from PowerShell output, or most tables will silently go missing.", "playbook": "production-ops", "playbook_url": "https://wpnews.pro/playbooks/production-ops"}, "alternates": {"html": "https://wpnews.pro/news/i-tested-the-entire-prisma-platform-on-my-project-the-good-what-broke-and-the", "markdown": "https://wpnews.pro/news/i-tested-the-entire-prisma-platform-on-my-project-the-good-what-broke-and-the.md", "text": "https://wpnews.pro/news/i-tested-the-entire-prisma-platform-on-my-project-the-good-what-broke-and-the.txt", "jsonld": "https://wpnews.pro/news/i-tested-the-entire-prisma-platform-on-my-project-the-good-what-broke-and-the.jsonld"}}