Skip to content

feat: use Prisma Composer for deployments - #52

Open
AmanVarshney01 wants to merge 15 commits into
mainfrom
codex/use-prisma-composer
Open

feat: use Prisma Composer for deployments#52
AmanVarshney01 wants to merge 15 commits into
mainfrom
codex/use-prisma-composer

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Aug 10, 2026

Copy link
Copy Markdown
Member

Important

Implementation PR — do not merge yet

This PR is ready for review, but it must not be merged or released yet. The confirmed incompatibility is Next.js deployed with pnpm's default isolated layout: its standalone artifact contains pnpm symlinks that the current Composer archive pipeline does not reliably preserve, including targets longer than the USTAR 100-byte linkname field.

The closed prisma/composer#219 is not a dependency. We are intentionally not carrying its duplicate Compute provider/archive implementation forward. Before merge, update the generated @prisma/composer package pins to the first release containing the Alchemy migration and rerun the deployment matrix.

Resulting create-prisma DX

  1. Choose a project name, framework, database provider, and package manager.
  2. Composer files are always generated. There is no Composer enablement prompt or flag.
  3. PostgreSQL always includes a Composer-managed Prisma Postgres database. There is no Prisma Postgres prompt or flag.
  4. Prisma Client and a deterministic initial migration are generated automatically after dependency installation.
  5. The only Composer-specific prompt is Deploy to Prisma now?
  6. Deploying builds the app, deploys the Composer graph, applies migrations with prisma migrate deploy, and seeds automatically.
  7. When deployment is skipped, the selected package manager receives a clear deploy command such as pnpm run deploy.

Summary

  • require Node.js 24 LTS and fail at CLI startup with a clear compatibility message before command parsing or project changes
  • make Prisma Composer part of every generated template with no Composer feature flag or template allowlist
  • replace prisma.compute.ts with Composer deployment
  • remove the create-db provisioning path and temporary claim database flow
  • remove --database-url; PostgreSQL is always Composer-managed, while other providers read DATABASE_URL from the environment
  • remove schema preset, generate, migrate/seed, and Prisma Postgres CLI options
  • always scaffold the starter schema and generate Prisma Client plus an initial migration
  • run the full generated deploy script for immediate deployment so migration and seed are part of the same user-visible operation
  • use prisma migrate deploy in cloud deployment; never run prisma migrate dev against the deployed database
  • never persist a generated or deployed database URL to .env
  • reject explicit external-database deployment before scaffolding when DATABASE_URL is missing
  • route Composer deployment through @prisma/cli@next, which renders the structured deployment summary directly
  • keep normal immediate deployment concise behind one spinner; --verbose streams the complete build, Composer, migration, and seed output
  • remove each temporary Prisma Postgres migration connection using the real con_… connection-id shape
  • support npm, pnpm, Yarn, and Bun with native package-manager commands and layouts
  • remove Deno instructions and Deno-only template handling
  • use native Prisma CLI commands such as pnpm exec prisma and bunx --bun prisma, never ./node_modules/.bin/prisma
  • include SvelteKit through adapter-node plus Vite SSR dependency handling, without a custom post-build bundle
  • give Next.js, SvelteKit, Astro, Nuxt, and TanStack Start one minimal shared visual system and consistent users screen
  • keep Hono, Elysia, NestJS, and Turborepo API-only while standardizing their root status response

Authentication through the consolidated CLI

Deployment now runs through the package-manager-native @prisma/cli@next composer deploy command. create-prisma reuses the active stored OAuth workspace or PRISMA_SERVICE_TOKEN, opens auth login when an interactive user is signed out, and gives headless runs exact login/deploy-later guidance. It never reads credential files or handles token values itself.

Live Bun deployment verification

On 2026-08-13, the exact preview flow from bunx create-prisma@pr52 was tested with TanStack Start, PostgreSQL, Bun, dependency installation, and immediate deployment. Browser authentication completed successfully through the consolidated CLI. The unmodified preview then stopped before Composer at CLI.CONFIG_UNREADABLE: composer deploy evaluated the stable ORM prisma.config.ts, whose strict env("DATABASE_URL") cannot succeed before Composer provisions Prisma Postgres.

A diagnostic-only rerun removed that file from unified-CLI discovery and aligned the app-side Composer packages with the 0.6.0-dev.16 version embedded by @prisma/cli@next. That deployed successfully through Bun, provisioned Prisma Postgres, applied the initial migration, seeded Alice and Bob, and returned HTTP 200 from https://o8ocmg8tllnxck3nvifvtpna.ewr.prisma.build. The first rerun also exposed the conn_ vs real con_ connection-id bug; after the parser fix, a second live migration/seed run removed its temporary connection and left no create-prisma-deploy-* connection.

Neither diagnostic bypass is generated or included in this PR. The config coexistence and Composer-version alignment must be fixed in their owning packages before merge.

Confirmed Composer compatibility issue

Next.js + pnpm is the reproduced failure; this PR does not claim that every framework/package-manager combination is broken. The defect is in artifact assembly/archiving rather than Next.js itself, so another combination could also be affected when its deploy artifact retains similar symlinks. No equivalent failure has been confirmed for SvelteKit, Nuxt, Astro, TanStack Start, Hono, Elysia, or NestJS. The full cloud deployment matrix remains a required verification after the fixed Composer release.

No package-manager workarounds

This change does not generate a hoisted linker configuration, dereference dependency symlinks, copy node_modules, or add a SvelteKit post-build bundle. Next.js + pnpm must deploy from its native output; the fix belongs in the Composer/Alchemy artifact pipeline.

Validation

  • built CLI exits before command parsing on Node.js 22.14.0 and runs normally on Node.js 24.19.0

  • bun run check

  • bun run typecheck

  • bun run test — 98 passing tests and 1,381 assertions

  • bun run build

  • verified published @prisma/cli@next (8.0.0-rc.1) through npm, pnpm, Yarn, and Bun package runners

  • verified signed-out browser/headless auth behavior and the generated Postgres setup error envelope against the published CLI

  • automated 72-variant render matrix: 9 templates × 4 package managers × Prisma Postgres/external database

  • audited all 19 inline review threads plus the outside-diff cancellation finding against the current branch

  • package-manager command tests for npm, pnpm, Yarn, and Bun

  • generated, installed, generated Prisma artifacts for, and production-built all nine Bun + SQLite starters: Next.js, SvelteKit, Astro, Nuxt, TanStack Start, Hono, Elysia, NestJS, and Turborepo

  • visually verified the seeded starter UI at 1280px desktop and 390px mobile with no console errors or horizontal overflow

  • verified all five generated page starters receive the byte-identical shared stylesheet

  • installed real Hono + Bun + PostgreSQL scaffold successfully generated Prisma Client and prisma/migrations/00000000000000_init/migration.sql

  • verified the PostgreSQL scaffold writes no .env file

  • verified explicit external-database deployment without DATABASE_URL exits before creating a project

  • verified CLI help exposes no --database-url, schema preset, generate, migrate, seed, or Prisma Postgres option

Before merge

  1. Make @prisma/cli composer deploy coexist with the stable ORM prisma.config.ts used by these templates; it must not evaluate and reject that file before Composer can provision the database.
  2. Publish aligned Composer and Prisma Cloud packages that support the consolidated CLI credential SPI; @prisma/cli@next currently embeds Composer 0.6.0-dev.16 while generated apps use 0.6.0.
  3. Land long symlink target/PAX support in the Alchemy Prisma archive writer.
  4. Migrate Composer to the official Alchemy Prisma provider.
  5. Publish the corresponding Composer packages and update the versions in this PR.
  6. Rerun the full 9-framework × 4-package-manager cloud deployment matrix and verify every public deployment URL.

Replace legacy Compute config generation with default Composer graphs for supported templates. Support npm, pnpm, Yarn, and Bun, including Composer-managed Prisma Postgres deployment and migration and seed handoff.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Summary by CodeRabbit

  • New Features

    • Added Prisma Composer deployment support across supported frameworks, including Svelte.
    • Generated projects can provision Prisma Postgres or connect to an existing database.
    • Added deployment scripts with automatic database connection handling.
    • Migrations and seed data run after deployment when Composer provisions the database.
    • Generated starter projects consistently include the sample User model, API, and seeded data.
  • Documentation

    • Updated setup and deployment guides with Composer configuration, database, topology, and redeployment instructions.
    • Replaced previous Compute deployment guidance and configuration references.

Walkthrough

The create flow now uses Prisma Composer for deployment. It collects Composer context, scaffolds Composer application graph files, configures Composer dependencies, provisions or binds databases, and runs Composer deploy scripts. Prisma migrations and seeding run after Composer provisions Prisma Postgres. Template output, package scripts, telemetry, and documentation now refer to Composer and remove Prisma Compute paths.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the primary change from Prisma Compute to Prisma Composer deployments.
Description check ✅ Passed The description is detailed and directly explains the Composer deployment changes, objectives, known limitations, and validation.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/use-prisma-composer
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/use-prisma-composer

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

PR preview published

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 154: Update the Composer deployment documentation sentence in README.md
to stop recommending the retired prisma-compute skill; recommend the Prisma
Composer skill only if the add-on installs one, otherwise remove the sentence
entirely.
- Line 100: Update README.md lines 100-100 to state that Composer files are
generated only for supported Composer-enabled templates using npm, pnpm, Yarn,
or Bun. In templates/create/astro/README.md.hbs lines 24-26, wrap the Composer
file list in the existing composer conditional so it is omitted for Deno
scaffolding.

In `@src/commands/create.ts`:
- Around line 61-63: Clarify the distinct roles of the Composer context fields
in the options type near useComposerPostgres: rename composerContext to
composerScaffoldContext while keeping composerDeployContext unchanged, and
update all references to the renamed field so scaffolding and deployment
behavior remain separate.
- Around line 502-538: Update the post-deployment database wiring in the
successful branch of the composer deployment flow so failures from
resolveComposerPostgresDatabaseUrl do not reach the outer catch or return stage
composer_deploy failure. Catch URL resolution errors, record a warning in
prismaResult.warningSection, add the package-manager-specific db:migrate and
db:seed commands to prismaResult.nextSteps, and continue to the existing deploy
next-step handling; preserve executePrismaMigrationAndSeed behavior when URL
resolution succeeds.

In `@src/constants/dependencies.ts`:
- Around line 85-99: Update the root Composer dependency target in the
composerTemplates block to include dotenv when template is "turborepo", ensuring
it is declared in the repository root package.json dependencies while preserving
existing dependencies and target-specific configuration.

In `@src/tasks/deploy-with-composer.ts`:
- Around line 106-112: Update the error-detail selection in the deploy result
handling around getErrorMessage so a failed parsed CLI response with neither
error.summary nor error.message uses a meaningful fallback instead of undefined.
Preserve the existing stderr fallback for non-parsed or invalid-output failures.
- Line 17: Update the PRISMA_PLATFORM_CLI constant to use an exact tested
`@prisma/cli` version instead of the latest tag, preserving the JSON contract
expected by the database list and connection create parsers.

In `@src/tasks/setup-prisma.ts`:
- Around line 753-768: Update executePrismaMigrationAndSeed to accept the
caller’s didGenerateClient state and forward it unchanged to
migrateAndSeedIfRequested instead of hardcoding true; update its callers,
including executePrismaSetupContext, to pass the actual client-generation result
so migration and seeding are skipped with the intended warning when generation
failed.

In `@src/templates/render-create-template.ts`:
- Around line 94-113: Replace the text-based matching and insertion in
mergePnpmComposerOverrides with YAML parsing and serialization, using the
project’s existing YAML library if available. Read and update only the overrides
mapping, preserving other sections such as catalog and packageExtensions, and
merge package names regardless of quoting style so existing keys are not
duplicated. Remove the regex-based presence check and line-splicing approach
while retaining the function’s current output behavior for missing overrides.
- Around line 101-103: Update the missingOverrides mapping in
render-create-template to serialize the version value as a quoted YAML string,
matching the existing JSON.stringify treatment of packageName. Preserve the
generated key and version content while ensuring values such as 4.0 remain
strings.

In `@templates/create/hono/module.ts.hbs`:
- Around line 5-17: Add dotenv to the Composer dependency target’s dependency
list or map, alongside the existing dotenv entry, so Composer installations
include it when composerPostgres is disabled. Update the Composer dependency
configuration rather than changing the module template import.

In `@templates/create/next/README.md.hbs`:
- Around line 22-24: Make Composer files conditional in all four README
templates: wrap the listed Composer entries in {{`#if` composer}} blocks in
templates/create/next/README.md.hbs (22-24), templates/create/nuxt/README.md.hbs
(24-26), templates/create/tanstack-start/README.md.hbs (23-25), and
templates/create/turborepo/README.md.hbs (31-33). In the Turborepo template,
also correct the service.ts path as specified by the review.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d99abb9f-c7d7-4895-bbda-f236d472b84a

📥 Commits

Reviewing files that changed from the base of the PR and between a917311 and e18cf1c.

📒 Files selected for processing (64)
  • README.md
  • src/commands/create.ts
  • src/constants/dependencies.ts
  • src/tasks/deploy-to-compute.ts
  • src/tasks/deploy-with-composer.ts
  • src/tasks/install.ts
  • src/tasks/setup-addons.ts
  • src/tasks/setup-prisma.ts
  • src/telemetry/create.ts
  • src/templates/render-create-template.ts
  • src/types.ts
  • templates/create/astro/README.md.hbs
  • templates/create/astro/module.ts.hbs
  • templates/create/astro/prisma-composer.config.ts.hbs
  • templates/create/astro/prisma.compute.ts.hbs
  • templates/create/astro/service.ts.hbs
  • templates/create/astro/src/lib/prisma.ts.hbs
  • templates/create/elysia/README.md.hbs
  • templates/create/elysia/module.ts.hbs
  • templates/create/elysia/package.json.hbs
  • templates/create/elysia/prisma-composer.config.ts.hbs
  • templates/create/elysia/prisma.compute.ts.hbs
  • templates/create/elysia/service.ts.hbs
  • templates/create/elysia/src/lib/prisma.ts.hbs
  • templates/create/hono/README.md.hbs
  • templates/create/hono/module.ts.hbs
  • templates/create/hono/package.json.hbs
  • templates/create/hono/prisma-composer.config.ts.hbs
  • templates/create/hono/prisma.compute.ts.hbs
  • templates/create/hono/service.ts.hbs
  • templates/create/hono/src/lib/prisma.ts.hbs
  • templates/create/nest/README.md.hbs
  • templates/create/nest/module.ts.hbs
  • templates/create/nest/package.json.hbs
  • templates/create/nest/prisma-composer.config.ts.hbs
  • templates/create/nest/prisma.compute.ts.hbs
  • templates/create/nest/src/lib/prisma.ts.hbs
  • templates/create/nest/src/service.ts.hbs
  • templates/create/next/README.md.hbs
  • templates/create/next/module.ts.hbs
  • templates/create/next/prisma-composer.config.ts.hbs
  • templates/create/next/prisma.compute.ts.hbs
  • templates/create/next/service.ts.hbs
  • templates/create/next/src/lib/prisma.ts.hbs
  • templates/create/nuxt/README.md.hbs
  • templates/create/nuxt/module.ts.hbs
  • templates/create/nuxt/prisma-composer.config.ts.hbs
  • templates/create/nuxt/prisma.compute.ts.hbs
  • templates/create/nuxt/server/utils/prisma.ts.hbs
  • templates/create/nuxt/service.ts.hbs
  • templates/create/svelte/README.md.hbs
  • templates/create/tanstack-start/README.md.hbs
  • templates/create/tanstack-start/module.ts.hbs
  • templates/create/tanstack-start/prisma-composer.config.ts.hbs
  • templates/create/tanstack-start/prisma.compute.ts.hbs
  • templates/create/tanstack-start/service.ts.hbs
  • templates/create/tanstack-start/src/lib/prisma.server.ts.hbs
  • templates/create/turborepo/README.md.hbs
  • templates/create/turborepo/apps/api/package.json.hbs
  • templates/create/turborepo/apps/api/src/index.ts.hbs
  • templates/create/turborepo/apps/api/src/service.ts.hbs
  • templates/create/turborepo/module.ts.hbs
  • templates/create/turborepo/prisma-composer.config.ts.hbs
  • templates/create/turborepo/prisma.compute.ts.hbs
💤 Files with no reviewable changes (10)
  • templates/create/nest/prisma.compute.ts.hbs
  • templates/create/hono/prisma.compute.ts.hbs
  • templates/create/astro/prisma.compute.ts.hbs
  • templates/create/nuxt/prisma.compute.ts.hbs
  • templates/create/turborepo/prisma.compute.ts.hbs
  • templates/create/next/prisma.compute.ts.hbs
  • templates/create/elysia/prisma.compute.ts.hbs
  • templates/create/tanstack-start/prisma.compute.ts.hbs
  • templates/create/svelte/README.md.hbs
  • src/tasks/deploy-to-compute.ts

Comment thread README.md
Comment thread README.md Outdated
Comment thread src/commands/create.ts Outdated
Comment thread src/commands/create.ts
Comment thread src/constants/dependencies.ts Outdated
Comment thread src/tasks/setup-prisma.ts Outdated
Comment thread src/templates/render-create-template.ts
Comment thread src/templates/render-create-template.ts Outdated
Comment thread templates/create/hono/module.ts.hbs
Comment thread templates/create/next/README.md.hbs
Generated package scripts already resolve local binaries through the package manager PATH, so emit prisma commands instead of hard-coded node_modules paths. Use bunx with the Bun runtime only for create-prisma internal execution.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Include Svelte in the Composer template matrix, make the starter schema and Prisma Client generation unconditional, and default PostgreSQL projects to Composer-managed Prisma Postgres. Keep migrate and seed tied to deployment while supporting both immediate and delayed deploys across npm, pnpm, Yarn, and Bun.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (7)
templates/create/tanstack-start/README.md.hbs (1)

43-45: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

The generated READMEs do not document the database change performed by deploy. When composerPostgres is enabled, getComposerDeployScriptMap appends composer:database:setup to the deploy script. That step migrates and seeds the Composer-managed database. Both READMEs present deploy as a deployment command only, so a reader cannot tell that it changes the remote schema.

  • templates/create/tanstack-start/README.md.hbs#L43-L45: add a sentence under the composerPostgres branch stating that deploy also migrates and seeds the Composer-managed database.
  • templates/create/turborepo/README.md.hbs#L43-L45: add the same sentence under the composerPostgres branch.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/create/tanstack-start/README.md.hbs` around lines 43 - 45, Update
the composerPostgres branch in templates/create/tanstack-start/README.md.hbs
lines 43-45 and templates/create/turborepo/README.md.hbs lines 43-45 to state
that the deploy command also migrates and seeds the Composer-managed database.
src/constants/dependencies.ts (1)

34-44: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Reuse the exported deployable-template set.

composerTemplates duplicates COMPOSER_DEPLOYABLE_TEMPLATES in src/types.ts (Lines 86-96). Both lists are identical today. If a future template is added to only one list, dependency wiring and deploy gating disagree without a type error: the create flow deploys a project that never received @prisma/composer, or it installs Composer packages that are never used.

Import the existing set here.

♻️ Proposed refactor
-const composerTemplates = new Set<CreateTemplate>([
-  "hono",
-  "elysia",
-  "nest",
-  "next",
-  "astro",
-  "nuxt",
-  "svelte",
-  "tanstack-start",
-  "turborepo",
-]);
+import { COMPOSER_DEPLOYABLE_TEMPLATES } from "../types";
+
+const composerTemplates = COMPOSER_DEPLOYABLE_TEMPLATES;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/constants/dependencies.ts` around lines 34 - 44, Remove the duplicated
composerTemplates set and import the exported COMPOSER_DEPLOYABLE_TEMPLATES from
types.ts instead. Update any references in this file to use the imported set,
preserving the existing deployable-template membership.
templates/create/tanstack-start/src/routes/index.tsx.hbs (1)

6-30: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Widen the bootstrap error guard beyond P2021.

The Composer flow deploys the service first and runs composer:database:setup afterwards. Between those two steps the service is live while the schema does not exist and the database may still be unreachable. isBootstrapQueryError matches only P2021 (table does not exist). A connection error (P1001) or a missing schema (P1010, P1017) propagates and the home route returns a 500 instead of the prepared empty state at Lines 66-70.

🐛 Proposed fix
+const BOOTSTRAP_ERROR_CODES = new Set(["P2021", "P1001", "P1010", "P1017"]);
+
 function isBootstrapQueryError(error: unknown): error is { code?: string } {
   return (
     typeof error === "object" &&
     error !== null &&
     "code" in error &&
-    (error as { code?: string }).code === "P2021"
+    BOOTSTRAP_ERROR_CODES.has((error as { code?: string }).code ?? "")
   );
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/create/tanstack-start/src/routes/index.tsx.hbs` around lines 6 -
30, Expand isBootstrapQueryError to recognize Prisma bootstrap failures P2021,
P1001, P1010, and P1017, while preserving the existing type guard and undefined
fallback in listUsers. Allow only these codes to return the prepared empty
state; continue propagating all other errors.
templates/create/turborepo/apps/api/src/index.ts.hbs (2)

10-20: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Log Composer database URL resolution errors.

The catch block continues without setting DATABASE_URL. Prisma then fails later with DATABASE_URL is required, which hides the Composer configuration error. Log the caught error or rethrow it with context.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/create/turborepo/apps/api/src/index.ts.hbs` around lines 10 - 20,
Update the Composer database URL resolution catch block near the conditional
composerDatabaseUrl setup to log the caught error or rethrow it with clear
Composer configuration context before leaving the block; preserve the existing
undefined fallback behavior only if the error is logged.

63-74: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Use the Composer port before PORT

service.port() is the authoritative Composer port. If PORT contains a different valid value, line 74 binds the server to the wrong port. Resolve composerPort before parsedPort in the Composer branch; keep PORT as the local fallback.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/create/turborepo/apps/api/src/index.ts.hbs` around lines 63 - 74,
The port selection expression should prioritize the authoritative composerPort
over parsedPort when the Composer branch is enabled. Update the fallback order
near service.port() so a valid PORT value is used only when composerPort is
unavailable, while retaining the existing 3000 default and validation behavior.
src/types.ts (1)

62-63: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the removed CLI options.

prismaPostgres, generate, migrateAndSeed, and schemaPreset are no longer CLI options. trpc-cli rejects their flags as unknown options. Add migration guidance for these flags to CHANGELOG.md and README.md.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/types.ts` around lines 62 - 63, Document the removal of the
prismaPostgres, generate, migrateAndSeed, and schemaPreset CLI options in
CHANGELOG.md and README.md, including migration guidance for users whose
commands still pass these flags. Do not add them back to the schema near
databaseUrl or install; update only the user-facing documentation.
templates/create/astro/README.md.hbs (1)

40-46: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document the first Composer Postgres deployment. When composerPostgres is enabled, the first deploy provisions the database and runs the deployment-managed migration and seed flow. The current text calls deploy a later-change action and directs users to run db:migrate and db:seed before Composer has provisioned a database.

  • templates/create/astro/README.md.hbs#L40-L46: state that the first deploy provisions, migrates, and seeds Prisma Postgres.
  • templates/create/astro/src/pages/index.astro.hbs#L46-L52: conditionally direct Composer Postgres users to run deploy first.
  • templates/create/elysia/README.md.hbs#L35-L41: state that the first deploy provisions, migrates, and seeds Prisma Postgres.
  • templates/create/hono/README.md.hbs#L35-L41: state that the first deploy provisions, migrates, and seeds Prisma Postgres.
  • templates/create/nest/README.md.hbs#L35-L41: state that the first deploy provisions, migrates, and seeds Prisma Postgres.
  • templates/create/next/README.md.hbs#L38-L44: state that the first deploy provisions, migrates, and seeds Prisma Postgres.
  • templates/create/next/src/app/page.tsx.hbs#L37-L43: conditionally direct Composer Postgres users to run deploy first.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@templates/create/astro/README.md.hbs` around lines 40 - 46, Update the
Composer Postgres guidance in templates/create/astro/README.md.hbs (lines
40-46), templates/create/elysia/README.md.hbs (lines 35-41),
templates/create/hono/README.md.hbs (lines 35-41),
templates/create/nest/README.md.hbs (lines 35-41), and
templates/create/next/README.md.hbs (lines 38-44) so the first deploy provisions
Prisma Postgres and runs the managed migration and seed flow, rather than
describing deploy only for later changes. In
templates/create/astro/src/pages/index.astro.hbs (lines 46-52) and
templates/create/next/src/app/page.tsx.hbs (lines 37-43), conditionally direct
composerPostgres users to run deploy first while preserving the existing
guidance for other database configurations.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/tasks/deploy-with-composer.ts`:
- Around line 200-205: Update the composer:database:setup command in the deploy
command construction to select the runtime from context.packageManager instead
of hardcoding node, using bun for Bun projects so the setup script remains
executable in both environments.

In `@src/templates/render-create-template.ts`:
- Around line 101-107: Update the overrides handling around
document.get("overrides", true) to replace a scalar node whose value is null
with document.createNode({}) before calling isMap. Preserve the existing error
for non-null, non-mapping overrides and continue using the resulting mapping for
subsequent updates.

In `@src/templates/shared.ts`:
- Around line 52-63: Generated CLI commands fail on Windows because
package-manager shims require a shell. In src/templates/shared.ts:52-63,
preserve the existing helper command generation and ensure its consumers use
shell execution; in templates/shared/setup-composer-postgres.mjs.hbs:25-34,
update runPlatformCli’s spawnSync options to enable shell execution, and in
templates/shared/setup-composer-postgres.mjs.hbs:101-106, make the same change
to runPrisma.

In `@templates/shared/setup-composer-postgres.mjs.hbs`:
- Around line 128-156: Move the existing try/finally cleanup scope to
immediately after the connection is created so missing databaseUrl errors still
remove the temporary connection via runPlatformCli. Update the cleanup branch
around connectionId to emit a warning when the ID is unavailable, clearly
indicating that the temporary connection could not be removed.
- Around line 35-45: Update runPlatformCli to wrap JSON.parse(result.stdout) in
error handling and throw a redacted error using the existing secret-redaction
path when parsing fails. Extend redactSecrets to also detect and redact
credentials embedded in bare database URLs such as
postgres://user:password@host/db, while preserving its existing NAME=value
handling.
- Around line 134-139: Update the migration setup flow around runPrisma so
Composer-managed databases never invoke "migrate dev". Use "migrate deploy" when
committed migrations exist, and replace the no-migrations branch with an
explicit initial-setup path or an actionable error; do not add "db push
--skip-generate" as a general fallback. Keep the subsequent runPrisma(["db",
"seed"], databaseUrl) behavior unchanged.

---

Outside diff comments:
In `@src/constants/dependencies.ts`:
- Around line 34-44: Remove the duplicated composerTemplates set and import the
exported COMPOSER_DEPLOYABLE_TEMPLATES from types.ts instead. Update any
references in this file to use the imported set, preserving the existing
deployable-template membership.

In `@src/types.ts`:
- Around line 62-63: Document the removal of the prismaPostgres, generate,
migrateAndSeed, and schemaPreset CLI options in CHANGELOG.md and README.md,
including migration guidance for users whose commands still pass these flags. Do
not add them back to the schema near databaseUrl or install; update only the
user-facing documentation.

In `@templates/create/astro/README.md.hbs`:
- Around line 40-46: Update the Composer Postgres guidance in
templates/create/astro/README.md.hbs (lines 40-46),
templates/create/elysia/README.md.hbs (lines 35-41),
templates/create/hono/README.md.hbs (lines 35-41),
templates/create/nest/README.md.hbs (lines 35-41), and
templates/create/next/README.md.hbs (lines 38-44) so the first deploy provisions
Prisma Postgres and runs the managed migration and seed flow, rather than
describing deploy only for later changes. In
templates/create/astro/src/pages/index.astro.hbs (lines 46-52) and
templates/create/next/src/app/page.tsx.hbs (lines 37-43), conditionally direct
composerPostgres users to run deploy first while preserving the existing
guidance for other database configurations.

In `@templates/create/tanstack-start/README.md.hbs`:
- Around line 43-45: Update the composerPostgres branch in
templates/create/tanstack-start/README.md.hbs lines 43-45 and
templates/create/turborepo/README.md.hbs lines 43-45 to state that the deploy
command also migrates and seeds the Composer-managed database.

In `@templates/create/tanstack-start/src/routes/index.tsx.hbs`:
- Around line 6-30: Expand isBootstrapQueryError to recognize Prisma bootstrap
failures P2021, P1001, P1010, and P1017, while preserving the existing type
guard and undefined fallback in listUsers. Allow only these codes to return the
prepared empty state; continue propagating all other errors.

In `@templates/create/turborepo/apps/api/src/index.ts.hbs`:
- Around line 10-20: Update the Composer database URL resolution catch block
near the conditional composerDatabaseUrl setup to log the caught error or
rethrow it with clear Composer configuration context before leaving the block;
preserve the existing undefined fallback behavior only if the error is logged.
- Around line 63-74: The port selection expression should prioritize the
authoritative composerPort over parsedPort when the Composer branch is enabled.
Update the fallback order near service.port() so a valid PORT value is used only
when composerPort is unavailable, while retaining the existing 3000 default and
validation behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d53077f9-75a6-4696-8dcf-664950b5f892

📥 Commits

Reviewing files that changed from the base of the PR and between daae14d and d03856e.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (60)
  • README.md
  • package.json
  • src/commands/create.ts
  • src/constants/dependencies.ts
  • src/index.ts
  • src/tasks/deploy-with-composer.ts
  • src/tasks/setup-prisma.ts
  • src/telemetry/create.ts
  • src/templates/render-create-template.ts
  • src/templates/shared.ts
  • src/types.ts
  • templates/create/astro/README.md.hbs
  • templates/create/astro/prisma/schema.prisma.hbs
  • templates/create/astro/prisma/seed.ts.hbs
  • templates/create/astro/src/pages/api/users.ts.hbs
  • templates/create/astro/src/pages/index.astro.hbs
  • templates/create/elysia/README.md.hbs
  • templates/create/elysia/prisma/schema.prisma.hbs
  • templates/create/elysia/prisma/seed.ts.hbs
  • templates/create/elysia/src/index.ts.hbs
  • templates/create/hono/README.md.hbs
  • templates/create/hono/prisma/schema.prisma.hbs
  • templates/create/hono/prisma/seed.ts.hbs
  • templates/create/hono/src/index.ts.hbs
  • templates/create/nest/README.md.hbs
  • templates/create/nest/prisma/schema.prisma.hbs
  • templates/create/nest/prisma/seed.ts.hbs
  • templates/create/nest/src/app.module.ts.hbs
  • templates/create/nest/src/users.controller.ts.hbs
  • templates/create/nest/src/users.service.ts.hbs
  • templates/create/next/README.md.hbs
  • templates/create/next/prisma/schema.prisma.hbs
  • templates/create/next/prisma/seed.ts.hbs
  • templates/create/next/src/app/page.tsx.hbs
  • templates/create/nuxt/README.md.hbs
  • templates/create/nuxt/app/pages/index.vue.hbs
  • templates/create/nuxt/prisma/schema.prisma.hbs
  • templates/create/nuxt/prisma/seed.ts.hbs
  • templates/create/nuxt/server/api/users.get.ts.hbs
  • templates/create/svelte/README.md.hbs
  • templates/create/svelte/module.ts.hbs
  • templates/create/svelte/package.json.hbs
  • templates/create/svelte/prisma-composer.config.ts.hbs
  • templates/create/svelte/prisma/schema.prisma.hbs
  • templates/create/svelte/prisma/seed.ts.hbs
  • templates/create/svelte/service.ts.hbs
  • templates/create/svelte/src/lib/server/prisma.ts.hbs
  • templates/create/svelte/src/routes/+page.server.ts.hbs
  • templates/create/svelte/src/routes/+page.svelte.hbs
  • templates/create/svelte/svelte.config.js
  • templates/create/svelte/svelte.config.js.hbs
  • templates/create/tanstack-start/README.md.hbs
  • templates/create/tanstack-start/prisma/schema.prisma.hbs
  • templates/create/tanstack-start/prisma/seed.ts.hbs
  • templates/create/tanstack-start/src/routes/index.tsx.hbs
  • templates/create/turborepo/README.md.hbs
  • templates/create/turborepo/apps/api/src/index.ts.hbs
  • templates/create/turborepo/packages/db/prisma/schema.prisma.hbs
  • templates/create/turborepo/packages/db/prisma/seed.ts.hbs
  • templates/shared/setup-composer-postgres.mjs.hbs
💤 Files with no reviewable changes (24)
  • templates/create/svelte/svelte.config.js
  • templates/create/nest/src/users.controller.ts.hbs
  • templates/create/tanstack-start/prisma/schema.prisma.hbs
  • templates/create/svelte/src/routes/+page.svelte.hbs
  • templates/create/nest/prisma/seed.ts.hbs
  • templates/create/turborepo/packages/db/prisma/seed.ts.hbs
  • templates/create/hono/prisma/schema.prisma.hbs
  • templates/create/hono/prisma/seed.ts.hbs
  • templates/create/svelte/prisma/seed.ts.hbs
  • templates/create/astro/prisma/schema.prisma.hbs
  • templates/create/next/prisma/seed.ts.hbs
  • templates/create/nuxt/server/api/users.get.ts.hbs
  • templates/create/svelte/prisma/schema.prisma.hbs
  • templates/create/next/prisma/schema.prisma.hbs
  • src/index.ts
  • templates/create/tanstack-start/prisma/seed.ts.hbs
  • templates/create/nuxt/prisma/seed.ts.hbs
  • templates/create/nest/prisma/schema.prisma.hbs
  • templates/create/nest/src/users.service.ts.hbs
  • templates/create/astro/prisma/seed.ts.hbs
  • templates/create/elysia/prisma/schema.prisma.hbs
  • templates/create/nuxt/prisma/schema.prisma.hbs
  • templates/create/turborepo/packages/db/prisma/schema.prisma.hbs
  • templates/create/elysia/prisma/seed.ts.hbs

Comment thread src/tasks/deploy-with-composer.ts
Comment thread src/templates/render-create-template.ts
Comment thread src/templates/shared.ts
Comment thread templates/shared/setup-composer-postgres.mjs.hbs Outdated
Comment thread templates/shared/setup-composer-postgres.mjs.hbs
Comment thread templates/shared/setup-composer-postgres.mjs.hbs
Always scaffold the Composer graph, dependencies, build artifacts, and deploy scripts for every template. Remove Deno support instead of maintaining a separate non-Composer runtime path.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/commands/create.ts (1)

443-531: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Restore a deploy next step after cancellation.

Line 445 disables local Prisma Postgres setup before Composer deployment succeeds. If executeComposerDeployContext returns cancelled, Lines 483-490 continue without adding deploy to prismaResult.nextSteps. The generated project then has no provisioned database and no migration or seed execution path in the completion output.

Add a cancellation branch that reports the cancellation and adds the package-manager-specific deploy command. For Composer Postgres projects, that command provisions the database and runs composer:database:setup.

Proposed fix
       if (!result.ok && !result.cancelled) {
         return {
           ok: false,
           stage: "composer_deploy",
           error: result.error,
         };
       }
+      if (result.cancelled) {
+        prismaResult.warningSection += "\n\n- Composer deployment was cancelled.";
+        prismaResult.nextSteps.push(
+          `- ${getRunScriptCommand(context.prismaSetupContext.packageManager, "deploy")}`,
+        );
+      }
       if (result.ok) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/commands/create.ts` around lines 443 - 531, In the composer deployment
flow around executeComposerDeployContext, handle result.cancelled before
continuing: report the cancellation and append the package-manager-specific
deploy command to prismaResult.nextSteps. Preserve the existing successful
deployment behavior, and ensure Composer Postgres projects use the deploy
command that provisions the database and runs composer:database:setup.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/commands/create.ts`:
- Around line 443-531: In the composer deployment flow around
executeComposerDeployContext, handle result.cancelled before continuing: report
the cancellation and append the package-manager-specific deploy command to
prismaResult.nextSteps. Preserve the existing successful deployment behavior,
and ensure Composer Postgres projects use the deploy command that provisions the
database and runs composer:database:setup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b6b580d5-b256-4ce0-8bfb-a5b2929af0c9

📥 Commits

Reviewing files that changed from the base of the PR and between d03856e and 462ed93.

📒 Files selected for processing (99)
  • README.md
  • src/commands/create.ts
  • src/constants/dependencies.ts
  • src/tasks/deploy-with-composer.ts
  • src/tasks/install.ts
  • src/tasks/setup-prisma.ts
  • src/templates/render-create-template.ts
  • src/templates/shared.ts
  • src/types.ts
  • src/utils/package-manager.ts
  • src/utils/runtime.ts
  • templates/create/astro/README.md.hbs
  • templates/create/astro/deno.json.hbs
  • templates/create/astro/module.ts.hbs
  • templates/create/astro/prisma-composer.config.ts.hbs
  • templates/create/astro/prisma/schema.prisma.hbs
  • templates/create/astro/prisma/seed.ts.hbs
  • templates/create/astro/service.ts.hbs
  • templates/create/astro/src/lib/prisma.ts.hbs
  • templates/create/elysia/README.md.hbs
  • templates/create/elysia/deno.json.hbs
  • templates/create/elysia/module.ts.hbs
  • templates/create/elysia/package.json.hbs
  • templates/create/elysia/prisma-composer.config.ts.hbs
  • templates/create/elysia/prisma/schema.prisma.hbs
  • templates/create/elysia/prisma/seed.ts.hbs
  • templates/create/elysia/service.ts.hbs
  • templates/create/elysia/src/index.ts.hbs
  • templates/create/elysia/src/lib/prisma.ts.hbs
  • templates/create/hono/README.md.hbs
  • templates/create/hono/deno.json.hbs
  • templates/create/hono/module.ts.hbs
  • templates/create/hono/package.json.hbs
  • templates/create/hono/prisma-composer.config.ts.hbs
  • templates/create/hono/prisma/schema.prisma.hbs
  • templates/create/hono/prisma/seed.ts.hbs
  • templates/create/hono/service.ts.hbs
  • templates/create/hono/src/index.ts.hbs
  • templates/create/hono/src/lib/prisma.ts.hbs
  • templates/create/nest/README.md.hbs
  • templates/create/nest/deno.json.hbs
  • templates/create/nest/module.ts.hbs
  • templates/create/nest/package.json.hbs
  • templates/create/nest/prisma-composer.config.ts.hbs
  • templates/create/nest/prisma/schema.prisma.hbs
  • templates/create/nest/prisma/seed.ts.hbs
  • templates/create/nest/src/app.module.ts.hbs
  • templates/create/nest/src/lib/prisma.ts.hbs
  • templates/create/nest/src/main.ts.hbs
  • templates/create/nest/src/prisma.service.ts.hbs
  • templates/create/nest/src/service.ts.hbs
  • templates/create/nest/src/users.controller.ts.hbs
  • templates/create/nest/src/users.service.ts.hbs
  • templates/create/next/README.md.hbs
  • templates/create/next/deno.json.hbs
  • templates/create/next/module.ts.hbs
  • templates/create/next/prisma-composer.config.ts.hbs
  • templates/create/next/prisma/schema.prisma.hbs
  • templates/create/next/prisma/seed.ts.hbs
  • templates/create/next/service.ts.hbs
  • templates/create/next/src/lib/prisma.ts.hbs
  • templates/create/nuxt/README.md.hbs
  • templates/create/nuxt/deno.json.hbs
  • templates/create/nuxt/module.ts.hbs
  • templates/create/nuxt/prisma-composer.config.ts.hbs
  • templates/create/nuxt/prisma/schema.prisma.hbs
  • templates/create/nuxt/prisma/seed.ts.hbs
  • templates/create/nuxt/server/utils/prisma.ts.hbs
  • templates/create/nuxt/service.ts.hbs
  • templates/create/svelte/README.md.hbs
  • templates/create/svelte/deno.json.hbs
  • templates/create/svelte/module.ts.hbs
  • templates/create/svelte/package.json.hbs
  • templates/create/svelte/prisma-composer.config.ts.hbs
  • templates/create/svelte/prisma/schema.prisma.hbs
  • templates/create/svelte/prisma/seed.ts.hbs
  • templates/create/svelte/service.ts.hbs
  • templates/create/svelte/src/lib/server/prisma.ts.hbs
  • templates/create/svelte/svelte.config.js.hbs
  • templates/create/tanstack-start/README.md.hbs
  • templates/create/tanstack-start/deno.json.hbs
  • templates/create/tanstack-start/module.ts.hbs
  • templates/create/tanstack-start/prisma-composer.config.ts.hbs
  • templates/create/tanstack-start/prisma/schema.prisma.hbs
  • templates/create/tanstack-start/prisma/seed.ts.hbs
  • templates/create/tanstack-start/service.ts.hbs
  • templates/create/tanstack-start/src/lib/prisma.server.ts.hbs
  • templates/create/turborepo/README.md.hbs
  • templates/create/turborepo/apps/api/package.json.hbs
  • templates/create/turborepo/apps/api/src/index.ts.hbs
  • templates/create/turborepo/apps/api/src/service.ts.hbs
  • templates/create/turborepo/deno.json.hbs
  • templates/create/turborepo/module.ts.hbs
  • templates/create/turborepo/package.json.hbs
  • templates/create/turborepo/packages/db/package.json.hbs
  • templates/create/turborepo/packages/db/prisma/schema.prisma.hbs
  • templates/create/turborepo/packages/db/prisma/seed.ts.hbs
  • templates/create/turborepo/packages/db/src/client.ts.hbs
  • templates/create/turborepo/prisma-composer.config.ts.hbs
💤 Files with no reviewable changes (58)
  • templates/create/turborepo/package.json.hbs
  • templates/create/tanstack-start/deno.json.hbs
  • templates/create/astro/deno.json.hbs
  • templates/create/elysia/deno.json.hbs
  • templates/create/turborepo/packages/db/package.json.hbs
  • templates/create/hono/service.ts.hbs
  • templates/create/next/deno.json.hbs
  • templates/create/turborepo/deno.json.hbs
  • templates/create/hono/deno.json.hbs
  • templates/create/nuxt/deno.json.hbs
  • templates/create/nest/deno.json.hbs
  • templates/create/nuxt/README.md.hbs
  • templates/create/turborepo/prisma-composer.config.ts.hbs
  • templates/create/hono/README.md.hbs
  • templates/create/elysia/prisma-composer.config.ts.hbs
  • templates/create/elysia/module.ts.hbs
  • templates/create/next/README.md.hbs
  • templates/create/elysia/service.ts.hbs
  • templates/create/turborepo/packages/db/prisma/schema.prisma.hbs
  • templates/create/next/module.ts.hbs
  • templates/create/nuxt/prisma-composer.config.ts.hbs
  • templates/create/svelte/svelte.config.js.hbs
  • templates/create/tanstack-start/prisma/schema.prisma.hbs
  • templates/create/turborepo/README.md.hbs
  • templates/create/nest/prisma-composer.config.ts.hbs
  • templates/create/nest/README.md.hbs
  • templates/create/astro/prisma-composer.config.ts.hbs
  • templates/create/hono/prisma/schema.prisma.hbs
  • templates/create/turborepo/apps/api/src/service.ts.hbs
  • templates/create/astro/prisma/schema.prisma.hbs
  • templates/create/nuxt/service.ts.hbs
  • templates/create/svelte/service.ts.hbs
  • templates/create/svelte/prisma-composer.config.ts.hbs
  • templates/create/nuxt/prisma/schema.prisma.hbs
  • templates/create/next/service.ts.hbs
  • templates/create/turborepo/module.ts.hbs
  • templates/create/elysia/prisma/schema.prisma.hbs
  • templates/create/tanstack-start/service.ts.hbs
  • templates/create/next/prisma-composer.config.ts.hbs
  • templates/create/nest/src/service.ts.hbs
  • templates/create/nuxt/module.ts.hbs
  • templates/create/hono/prisma-composer.config.ts.hbs
  • templates/create/elysia/README.md.hbs
  • templates/create/nest/prisma/schema.prisma.hbs
  • templates/create/svelte/README.md.hbs
  • templates/create/astro/README.md.hbs
  • templates/create/hono/module.ts.hbs
  • templates/create/astro/module.ts.hbs
  • templates/create/tanstack-start/README.md.hbs
  • templates/create/tanstack-start/prisma-composer.config.ts.hbs
  • templates/create/next/prisma/schema.prisma.hbs
  • templates/create/tanstack-start/module.ts.hbs
  • templates/create/svelte/module.ts.hbs
  • src/tasks/setup-prisma.ts
  • templates/create/astro/service.ts.hbs
  • templates/create/svelte/deno.json.hbs
  • templates/create/svelte/prisma/schema.prisma.hbs
  • templates/create/nest/module.ts.hbs

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@templates/create/nest/package.json.hbs`:
- Line 10: Update the build script’s esbuild arguments to use JSON-escaped
double quotes for both NestJS wildcard patterns, replacing the literal
single-quoted --external values. Preserve the existing patterns and other build
options, and validate the generated script on Windows.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 36360dbe-62c6-4c5e-95ed-b1a712e4147e

📥 Commits

Reviewing files that changed from the base of the PR and between 462ed93 and 2a6886c.

📒 Files selected for processing (7)
  • src/constants/dependencies.ts
  • templates/create/elysia/src/index.ts.hbs
  • templates/create/nest/package.json.hbs
  • templates/create/svelte/README.md.hbs
  • templates/create/svelte/package.json.hbs
  • templates/create/svelte/service.ts.hbs
  • templates/create/svelte/vite.config.ts

Comment thread templates/create/nest/package.json.hbs Outdated
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Remove the create-db and database URL CLI paths so PostgreSQL is always managed by the generated Composer graph.

Generate an initial migration locally, run migrate deploy and seed as part of deployment, and cover every template and package manager with automated tests.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Use the selected runtime for Bun, support package-manager command shims on Windows, redact database URLs, and always clean up temporary connections.

Also normalize empty pnpm override maps and cover the behavior with tests.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Give page-based templates one minimal shared visual system and keep API-only templates consistent with a small root status response.

Validate every generated framework build and cover the shared output in the template matrix.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Clarify scaffold state versus immediate deployment and stop recommending the Compute-specific skill for Composer deployments.

Expand regression coverage for generated dependencies and pnpm override merging.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 11, 2026
@AmanVarshney01

Copy link
Copy Markdown
Member Author

Review-comment audit

Rechecked all 19 inline threads plus the outside-diff cancellation finding against the current branch.

Changes made in f3bfe9b:

  • renamed composerContext to composerScaffoldContext so scaffold state and immediate-deploy state cannot be confused
  • removed the automatic prisma-compute skill recommendation for Composer deployments; the Compute skill remains manually selectable
  • added regression coverage for direct dotenv dependencies and pnpm override edge cases

Verified without further code changes:

  • Deno documentation finding is stale: Deno support is gone and the 72-case matrix asserts no deno.json
  • all 36 external-database framework/package-manager combinations declare dotenv; generated Hono + Yarn installs and loads module.ts
  • Composer CLI and pinned Platform CLI command syntax match the generated commands
  • cancellation restores the package-manager-specific deploy next step
  • Platform CLI fallback errors, JSON parsing, URL redaction, temporary connection cleanup, and migrate deploy remain present
  • pnpm null/existing/catalog override cases now have explicit tests
  • Nest wildcard externals are JSON-escaped and Windows CLI spawning uses shell: process.platform === "win32"; no Windows runner exists in this PR, so this was verified from the generated command rather than claimed as a Windows execution

The old post-deploy URL-resolution finding no longer maps to the current architecture: immediate deployment intentionally executes build, Composer deployment, migration, and seed as one requested operation. A migration or seed failure therefore remains an overall deploy failure instead of being reported as success.

Validation: bun run check, bun run typecheck, bun run build, and 86 tests / 1,077 assertions all pass.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Route Composer deployment and Postgres setup through @prisma/cli@next so stored browser sessions and service tokens use the official authentication path.

Open browser login for an interactive missing session, fail headless runs with exact recovery commands, adopt the postgres command namespace and structured result envelope, and remove the private deployment-result side channel.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Hide successful immediate-deploy output behind a spinner while preserving full output with --verbose. Recognize the Platform API con_ connection id shape so temporary migration connections are removed.

Signed-off-by: Aman Varshney <amanvarshney.work@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant