Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Dec 22, 2025

Summary by CodeRabbit

  • Chores

    • Upgraded Prisma-related packages to v7 and @pothos/plugin-prisma to v4.14.1 across examples and generators; added a changelog entry.
    • Bumped generator dependencies to align with Prisma v7.
    • Added a test helper dependency in one example.
  • Documentation

    • Added a new Package Upgrade Skill guide.
    • Removed the previous Package Upgrade Playbook.
  • Behavior

    • Prisma templates and generated configs adopt the new config format, change config file extension, and adjust datasource/migrations settings.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
baseplate-project-builder-web Ready Ready Preview, Comment Dec 22, 2025 0:46am

@changeset-bot
Copy link

changeset-bot bot commented Dec 22, 2025

🦋 Changeset detected

Latest commit: 44217f8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@baseplate-dev/fastify-generators Patch
@baseplate-dev/project-builder-server Patch
@baseplate-dev/plugin-auth Patch
@baseplate-dev/plugin-queue Patch
@baseplate-dev/plugin-storage Patch
@baseplate-dev/project-builder-cli Patch
@baseplate-dev/project-builder-common Patch
@baseplate-dev/project-builder-test Patch
@baseplate-dev/project-builder-web Patch
@baseplate-dev/create-project Patch
@baseplate-dev/code-morph Patch
@baseplate-dev/core-generators Patch
@baseplate-dev/project-builder-lib Patch
@baseplate-dev/react-generators Patch
@baseplate-dev/sync Patch
@baseplate-dev/tools Patch
@baseplate-dev/ui-components Patch
@baseplate-dev/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Dec 22, 2025

Walkthrough

Upgrades Prisma packages to v7, updates fastify generator pins and templates to emit prisma.config.ts via defineConfig(...), removes the url field from generated Prisma datasource blocks and writer API, renames config filenames from .mts.ts, adds a Package Upgrade skill doc, and deletes the legacy playbook.

Changes

Cohort / File(s) Summary
Changelog
\.changeset/upgrade-prisma-7.md
Adds a changeset recording Prisma package upgrades to v7 and @pothos/plugin-prisma bump to v4.14.1.
Docs & Playbook
\.claude/skills/package-upgrade/SKILL.md, PACKAGE-UPGRADE-PLAYBOOK.md
Adds a new Package Upgrade skill doc and removes the legacy Package Upgrade Playbook.
Example app package manifests
examples/blog-with-auth/apps/backend/package.json, examples/todo-with-auth0/apps/backend/package.json, examples/todo-with-auth0/apps/backend/.baseplate-snapshot/diffs/package.json.diff
Bumps prisma, @prisma/client, @prisma/adapter-pg to 7.2.0 and @pothos/plugin-prisma to 4.14.1; snapshot diff also shows sentry-testkit addition.
Example Prisma schemas
examples/blog-with-auth/apps/backend/prisma/schema.prisma, examples/todo-with-auth0/apps/backend/prisma/schema.prisma
Removes the explicit url = env("DATABASE_URL") line from the datasource block.
Fastify generator constants & deps
packages/fastify-generators/src/constants/fastify-packages.ts, packages/fastify-generators/package.json
Updates pinned Prisma-related package versions (including @prisma/internals) to v7.2.0 and plugin to 4.14.1.
Prisma generator templates / extractor
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts, packages/fastify-generators/src/generators/prisma/prisma/extractor.json, packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts
Switches Prisma config template filenames from .mts.ts; template now exports defineConfig({...}), adds schema/migrations/datasource fields and uses prisma/config imports.
Prisma schema writer & API
packages/fastify-generators/src/writers/prisma-schema/schema.ts
Removes url from PrismaDatasourceBlockOptions and from createPrismaSchemaDatasourceBlock signature/output (public API changed).
Example app metadata / config renames
examples/blog-with-auth/apps/backend/.templates-info.json, examples/blog-with-auth/apps/backend/baseplate/file-id-map.json, examples/blog-with-auth/apps/backend/eslint.config.js, examples/blog-with-auth/apps/backend/prisma.config.ts, examples/todo-with-auth0/apps/backend/.templates-info.json, examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json, examples/todo-with-auth0/apps/backend/eslint.config.js, examples/todo-with-auth0/apps/backend/prisma.config.ts
Renames template keys and mappings from prisma.config.mtsprisma.config.ts; updates ESLint TS default project files; replaces plain-object Prisma config exports with defineConfig(...) including explicit schema/migrations/datasource fields and process.env usage.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review the public API change in packages/fastify-generators/src/writers/prisma-schema/schema.ts (removal of PrismaDatasourceBlockOptions.url) and update all generator call sites.
  • Verify generator template rename (.mts.ts) and extractor.json path updates have no remaining .mts references.
  • Confirm example prisma.config.ts files compile (imports from prisma/config, defineConfig) and that runtime consumption of DATABASE_URL works.
  • Check version pin consistency across fastify-packages.ts, packages/fastify-generators/package.json, and example manifests.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: upgrading Prisma to version 7.2.0, which is reflected across all modified files including package.json updates, configuration changes, and generator templates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kingston/eng-935-upgrade-to-prisma-7

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@socket-security
Copy link

socket-security bot commented Dec 22, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​prisma/​internals@​6.17.1 ⏵ 7.2.099 +51007698 +1100
Updated@​prisma/​adapter-pg@​6.17.1 ⏵ 7.2.0100 +11008398 +1100
Updated@​prisma/​client@​6.17.1 ⏵ 7.2.099 +51008598100
Updated@​pothos/​plugin-prisma@​4.12.0 ⏵ 4.14.199 +1100100 +194 +4100
Updatedprisma@​6.17.1 ⏵ 7.2.0941009798 +1100

View full report

@socket-security
Copy link

socket-security bot commented Dec 22, 2025

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Telemetry collection: npm @prisma/studio-core

Note: This code implements a Prisma/Postgres HTTP client that by default sends your database schema (decoded from embedded Base64) and every raw SQL query (with parameters and the API key) to a remote accelerator service at accelerate[.]prisma-data[.]net. On first execution it issues an HTTPS PUT to /schema carrying your schema, then a POST to /graphql carrying queryRaw arguments. Unless the host or fetch function is explicitly overridden, all schema and query data (and the Bearer token API key) are transmitted externally, creating a significant privacy and supply-chain risk.

From: examples/blog-with-auth/pnpm-lock.yamlnpm/[email protected]npm/@prisma/[email protected]

ℹ Read more on: This package | This alert | What is telemetry?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Most telemetry comes with settings to disable it. Consider disabling telemetry if you do not want to be tracked.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@prisma/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn Medium
Low adoption: npm @prisma/studio-core

Location: Package overview

From: examples/blog-with-auth/pnpm-lock.yamlnpm/[email protected]npm/@prisma/[email protected]

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@prisma/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.claude/skills/package-upgrade/SKILL.md (2)

15-15: Consider using more formal phrasing.

The phrase "get injected" could be replaced with "are injected" for a more formal tone in documentation.

🔎 Suggested fix
-2. **Generator constants** - Defines versions that get injected into generated projects
+2. **Generator constants** - Defines versions that are injected into generated projects

172-172: Consider hyphenating compound adjective.

"Batch Related Updates" should be hyphenated as "Batch-Related Updates" when used as a compound adjective modifying "Updates".

🔎 Suggested fix
-1. **Batch Related Updates** - Group related packages together (e.g., React ecosystem, Vite ecosystem)
+1. **Batch-Related Updates** - Group related packages together (e.g., React ecosystem, Vite ecosystem)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6828918 and 2ba7393.

⛔ Files ignored due to path filters (4)
  • examples/blog-with-auth/apps/backend/baseplate/generated/package.json is excluded by !**/generated/**, !**/generated/**
  • examples/blog-with-auth/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • examples/todo-with-auth0/apps/backend/baseplate/generated/package.json is excluded by !**/generated/**, !**/generated/**
  • examples/todo-with-auth0/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • .changeset/upgrade-prisma-7.md
  • .claude/skills/package-upgrade/SKILL.md
  • PACKAGE-UPGRADE-PLAYBOOK.md
  • examples/blog-with-auth/apps/backend/package.json
  • examples/todo-with-auth0/apps/backend/package.json
  • packages/fastify-generators/src/constants/fastify-packages.ts
💤 Files with no reviewable changes (1)
  • PACKAGE-UPGRADE-PLAYBOOK.md
🧰 Additional context used
📓 Path-based instructions (4)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

Add a new Changeset in the .changeset/ directory for new features or changes, with format 'package-name': patch and description of the feature or change

Files:

  • .changeset/upgrade-prisma-7.md
examples/blog-with-auth/**/package.json

📄 CodeRabbit inference engine (examples/blog-with-auth/CLAUDE.md)

examples/blog-with-auth/**/package.json: Enforce pnpm 10+ as the package manager
Use ESM only with "type": "module" in package.json

Files:

  • examples/blog-with-auth/apps/backend/package.json
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx}: Use TypeScript with strict type checking enabled
Always include return types on top-level functions including React components (React.ReactElement)
Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)
If a particular interface or type is not exported, change the file so it is exported
If caught on a typing loop where forcing the any type is necessary, do not iterate too much - leave the typing as broken and let the user fix it

If target code is not easily testable, refactor it to be more testable (e.g., export types or functions)

**/*.{ts,tsx}: Import components from '@baseplate-dev/ui-components' package for UI development (e.g., Button, Input, Card, Dialog, etc.)
Use form components with React Hook Form controller variants (InputField, TextareaField, SelectField, CheckboxField, SwitchField, ComboboxField, MultiComboboxField, ColorPickerField, DatePickerField, DateTimePickerField)
Use SidebarLayout, Card, Breadcrumb, NavigationMenu, and NavigationTabs components for consistent layout structure from @baseplate-dev/ui-components
Use Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal dialogs and confirmation interactions
Always use compareStrings from @baseplate-dev/utils instead of String.prototype.localeCompare() for code generation, file sorting, and internal data structures
If a particular interface or type is not exported, modify the file to export it
Use TsCodeFragment for composable code pieces and TsCodeUtils for manipulating fragments when generating TypeScript code
Create generators using createGenerator with configuration via descriptor schema (Zod), organizing into one or more tasks created with createGeneratorTask
Tasks should have run (initialization) and build (code generation) phases, export and consume providers, and may be organized into phases for ordered execution
Use provider scopes to control visibility and prevent collisions be...

Files:

  • packages/fastify-generators/src/constants/fastify-packages.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx,js}: Node 16 module resolution - include file extensions in imports (.js)
Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
Order functions such that functions are placed below the variables/functions they use
Prefer using nullish coalescing operator (??) instead of logical or (||), enforced via ESLint rule
Prefer barrel exports e.g. export * from './foo.js' instead of individual named exports
Use console.info/warn/error instead of console.log

Files:

  • packages/fastify-generators/src/constants/fastify-packages.ts
🧠 Learnings (3)
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/package.json : Enforce pnpm 10+ as the package manager

Applied to files:

  • examples/blog-with-auth/apps/backend/package.json
  • examples/todo-with-auth0/apps/backend/package.json
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Use pnpm 10+ as the package manager (enforced)

Applied to files:

  • examples/blog-with-auth/apps/backend/package.json
  • examples/todo-with-auth0/apps/backend/package.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to .changeset/*.md : Add a new Changeset in the `.changeset/` directory for new features or changes, with format `'package-name': patch` and description of the feature or change

Applied to files:

  • .claude/skills/package-upgrade/SKILL.md
🪛 LanguageTool
.claude/skills/package-upgrade/SKILL.md

[style] ~15-~15: The verb “get” can be informal. Consider replacing it with a form of “to be”.
Context: ...tor constants** - Defines versions that get injected into generated projects Both locations...

(GET_USED_ARE_USED)


[grammar] ~172-~172: Use a hyphen to join words.
Context: ...mentation ## Best Practices 1. Batch Related Updates - Group related packag...

(QB_NEW_EN_HYPHEN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Verify Sync (blog-with-auth)
  • GitHub Check: Verify Sync (todo-with-auth0)
  • GitHub Check: Lint
  • GitHub Check: Test E2E
  • GitHub Check: test
🔇 Additional comments (3)
examples/todo-with-auth0/apps/backend/package.json (1)

47-47: LGTM! Version updates are consistent with generator constants.

The Prisma-related package versions correctly match the updated constants in packages/fastify-generators/src/constants/fastify-packages.ts.

Also applies to: 53-54, 101-101

.changeset/upgrade-prisma-7.md (1)

1-10: LGTM! Changeset correctly documents the Prisma upgrade.

The changeset follows the proper format and accurately lists all upgraded packages with their version changes.

examples/blog-with-auth/apps/backend/package.json (1)

42-42: LGTM! Version updates are consistent with generator constants.

The Prisma-related package versions correctly match the updated constants in packages/fastify-generators/src/constants/fastify-packages.ts.

Also applies to: 48-49, 83-83

'@pothos/plugin-simple-objects': '4.1.3',
'@pothos/plugin-relay': '4.6.2',
'@pothos/plugin-prisma': '4.12.0',
'@pothos/plugin-prisma': '4.14.1',
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Update @pothos/plugin-prisma version and add Prisma 7 configuration requirements.

Version 4.14.1 does not exist in npm; the latest is 4.12.0. @pothos/plugin-prisma 4.13.0+ requires the dmmf option when configuring the Prisma plugin for Prisma 7 compatibility, since Prisma 7 no longer exposes DMMF data on client internals—import getDatamodel from generated Pothos types and pass it to the prisma config.

Verify these migration steps:

  • Move datasource URL from schema to prisma.config.ts and pass either adapter for direct connection or accelerateUrl to PrismaClient constructor
  • Remove automatic seed script execution; explicitly run prisma generate
  • Check for @Map attributes on enums—a breaking change in v7 requires code updates before upgrading

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2ba7393 and 7564b39.

⛔ Files ignored due to path filters (9)
  • examples/blog-with-auth/apps/backend/baseplate/generated/prisma/schema.prisma is excluded by !**/generated/**, !**/generated/**
  • examples/blog-with-auth/apps/backend/src/generated/prisma/client.ts is excluded by !**/generated/**, !**/generated/**
  • examples/todo-with-auth0/apps/backend/baseplate/generated/prisma/schema.prisma is excluded by !**/generated/**, !**/generated/**
  • examples/todo-with-auth0/apps/backend/src/generated/prisma/client.ts is excluded by !**/generated/**, !**/generated/**
  • tests/simple/apps/backend/baseplate/generated/package.json is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/apps/backend/baseplate/generated/prisma/schema.prisma is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/apps/backend/package.json is excluded by !tests/**
  • tests/simple/apps/backend/prisma/schema.prisma is excluded by !tests/**
  • tests/simple/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !tests/**
📒 Files selected for processing (5)
  • examples/blog-with-auth/apps/backend/prisma/schema.prisma
  • examples/todo-with-auth0/apps/backend/.baseplate-snapshot/diffs/package.json.diff
  • examples/todo-with-auth0/apps/backend/prisma/schema.prisma
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
  • packages/fastify-generators/src/writers/prisma-schema/schema.ts
💤 Files with no reviewable changes (4)
  • packages/fastify-generators/src/writers/prisma-schema/schema.ts
  • examples/todo-with-auth0/apps/backend/prisma/schema.prisma
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
  • examples/blog-with-auth/apps/backend/prisma/schema.prisma
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Use pnpm 10+ as the package manager (enforced)

Applied to files:

  • examples/todo-with-auth0/apps/backend/.baseplate-snapshot/diffs/package.json.diff
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Verify Sync (todo-with-auth0)
  • GitHub Check: Verify Sync (blog-with-auth)
  • GitHub Check: test
  • GitHub Check: Lint
  • GitHub Check: Test E2E
🔇 Additional comments (1)
examples/todo-with-auth0/apps/backend/.baseplate-snapshot/diffs/package.json.diff (1)

10-10: The version sentry-testkit@^6.2.2 is valid and has no known security issues.

The package exists and is actively maintained. If this addition is intentional (e.g., part of testing infrastructure updates), it's appropriate. However, clarify whether this belongs in the scope of the Prisma upgrade PR, or if it should be a separate change.

"prettier": "3.6.2",
"prettier-plugin-packagejson": "2.5.19",
"prisma": "6.17.1",
"prisma": "7.2.0",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Find the diff file and examine its context
echo "=== Checking the diff file ==="
find . -path "*/.baseplate-snapshot/diffs/package.json.diff" -type f | head -5

# Check for package.json files in the backend directory
echo -e "\n=== Finding package.json files ==="
find . -path "*todo-with-auth0/apps/backend*" -name "package.json" -type f

# Look for prisma.config.ts files
echo -e "\n=== Checking for prisma.config.ts files ==="
find . -path "*todo-with-auth0/apps/backend*" -name "prisma.config.ts" -type f

# Check git status around this change
echo -e "\n=== Git files in backend directory ==="
git ls-files | grep -i "todo-with-auth0/apps/backend" | grep -E "(package\.json|prisma\.config\.ts|schema\.prisma)" | head -10

Repository: halfdomelabs/baseplate

Length of output: 696


Create prisma.config.ts and move DATABASE_URL from schema.prisma — critical for Prisma 7.2.0.

Upgrading to Prisma v7 requires several mandatory configuration changes that appear to be missing:

  1. Create prisma.config.ts — Starting with Prisma ORM v7, a prisma.config.ts file is automatically created, and the database connection URL is now configured in this file instead of in the schema.prisma file. This file does not currently exist in the project.

  2. Move DATABASE_URL — The datasource property url is no longer supported in schema files; move connection URLs to prisma.config.ts and pass either adapter for a direct database connection or accelerateUrl to the PrismaClient constructor.

  3. Configure database adapter — @prisma/adapter-pg + pg is now the default combo for PostgreSQL. Verify this adapter is installed and properly instantiated in PrismaClient.

  4. Update scripts — Migrate dev and db push no longer run prisma generate automatically; you must run prisma generate explicitly.

  5. Verify related packages — Ensure @prisma/client and other Prisma-related packages (@pothos/plugin-prisma) are also upgraded to compatible v7 versions.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7564b39 and b3a6031.

⛔ Files ignored due to path filters (12)
  • examples/blog-with-auth/apps/backend/baseplate/generated/eslint.config.js is excluded by !**/generated/**, !**/generated/**
  • examples/blog-with-auth/apps/backend/baseplate/generated/prisma.config.ts is excluded by !**/generated/**, !**/generated/**
  • examples/todo-with-auth0/apps/backend/baseplate/generated/eslint.config.js is excluded by !**/generated/**, !**/generated/**
  • examples/todo-with-auth0/apps/backend/baseplate/generated/prisma.config.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/prisma/prisma/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/prisma/prisma/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • tests/simple/apps/backend/baseplate/file-id-map.json is excluded by !tests/**
  • tests/simple/apps/backend/baseplate/generated/eslint.config.js is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/apps/backend/baseplate/generated/prisma.config.ts is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/apps/backend/eslint.config.js is excluded by !tests/**
  • tests/simple/apps/backend/prisma.config.ts is excluded by !tests/**
📒 Files selected for processing (12)
  • examples/blog-with-auth/apps/backend/.templates-info.json
  • examples/blog-with-auth/apps/backend/baseplate/file-id-map.json
  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/blog-with-auth/apps/backend/prisma.config.ts
  • examples/todo-with-auth0/apps/backend/.templates-info.json
  • examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json
  • examples/todo-with-auth0/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
  • packages/fastify-generators/package.json
  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
🧰 Additional context used
📓 Path-based instructions (6)
examples/blog-with-auth/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (examples/blog-with-auth/CLAUDE.md)

examples/blog-with-auth/**/*.{ts,tsx,js,jsx}: Always use .js extensions in import statements, even for TypeScript files (e.g., import { getSystemInfo } from '@src/system-info.js';)
Follow ESM module resolution with TypeScript's NodeNext setting
Add JSDocs to all exported functions, interfaces, and classes with documentation of the function, its parameters, return value, and all fields

Files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
  • examples/blog-with-auth/apps/backend/eslint.config.js
examples/blog-with-auth/**/*.{ts,tsx}

📄 CodeRabbit inference engine (examples/blog-with-auth/CLAUDE.md)

examples/blog-with-auth/**/*.{ts,tsx}: Use import type for type-only imports in TypeScript
Always specify explicit return types for functions in TypeScript

Files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx}: Use TypeScript with strict type checking enabled
Always include return types on top-level functions including React components (React.ReactElement)
Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)
If a particular interface or type is not exported, change the file so it is exported
If caught on a typing loop where forcing the any type is necessary, do not iterate too much - leave the typing as broken and let the user fix it

If target code is not easily testable, refactor it to be more testable (e.g., export types or functions)

**/*.{ts,tsx}: Import components from '@baseplate-dev/ui-components' package for UI development (e.g., Button, Input, Card, Dialog, etc.)
Use form components with React Hook Form controller variants (InputField, TextareaField, SelectField, CheckboxField, SwitchField, ComboboxField, MultiComboboxField, ColorPickerField, DatePickerField, DateTimePickerField)
Use SidebarLayout, Card, Breadcrumb, NavigationMenu, and NavigationTabs components for consistent layout structure from @baseplate-dev/ui-components
Use Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal dialogs and confirmation interactions
Always use compareStrings from @baseplate-dev/utils instead of String.prototype.localeCompare() for code generation, file sorting, and internal data structures
If a particular interface or type is not exported, modify the file to export it
Use TsCodeFragment for composable code pieces and TsCodeUtils for manipulating fragments when generating TypeScript code
Create generators using createGenerator with configuration via descriptor schema (Zod), organizing into one or more tasks created with createGeneratorTask
Tasks should have run (initialization) and build (code generation) phases, export and consume providers, and may be organized into phases for ordered execution
Use provider scopes to control visibility and prevent collisions be...

Files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx,js}: Node 16 module resolution - include file extensions in imports (.js)
Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
Order functions such that functions are placed below the variables/functions they use
Prefer using nullish coalescing operator (??) instead of logical or (||), enforced via ESLint rule
Prefer barrel exports e.g. export * from './foo.js' instead of individual named exports
Use console.info/warn/error instead of console.log

Files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
  • examples/blog-with-auth/apps/backend/eslint.config.js
  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts
  • examples/todo-with-auth0/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
examples/todo-with-auth0/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (examples/todo-with-auth0/CLAUDE.md)

Always use .js extensions in import statements, even for TypeScript files. Example: import { getSystemInfo } from '@src/system-info.js';

Files:

  • examples/todo-with-auth0/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
examples/todo-with-auth0/**/*.{ts,tsx}

📄 CodeRabbit inference engine (examples/todo-with-auth0/CLAUDE.md)

examples/todo-with-auth0/**/*.{ts,tsx}: Use import type for type-only imports
Always specify explicit return types for functions
Add JSDocs to all exported functions, interfaces, and classes with documentation of the function, its parameters, return value, and all fields

Files:

  • examples/todo-with-auth0/apps/backend/prisma.config.ts
🧠 Learnings (30)
📚 Learning: 2025-11-24T19:45:27.654Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-11-24T19:45:27.654Z
Learning: Applies to +(*.tsx|packages/project-builder-web/**/*.tsx|packages/ui-components/**/*.tsx) : Use ShadCN-based components from `baseplate-dev/ui-components` instead of creating custom components

Applied to files:

  • packages/fastify-generators/package.json
  • examples/blog-with-auth/apps/backend/baseplate/file-id-map.json
  • examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : Import components from 'baseplate-dev/ui-components' package for UI development (e.g., Button, Input, Card, Dialog, etc.)

Applied to files:

  • packages/fastify-generators/package.json
  • examples/blog-with-auth/apps/backend/baseplate/file-id-map.json
  • examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : Create generators using `createGenerator` with configuration via descriptor schema (Zod), organizing into one or more tasks created with `createGeneratorTask`

Applied to files:

  • examples/blog-with-auth/apps/backend/baseplate/file-id-map.json
  • examples/todo-with-auth0/apps/backend/.templates-info.json
  • examples/blog-with-auth/apps/backend/.templates-info.json
  • examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Follow task-based architecture for generators, use provider scopes for explicit wiring, leverage TypeScript rendering system for code generation, organize complex generation with Task Phases, and use Dynamic Tasks for data-driven generation

Applied to files:

  • examples/blog-with-auth/apps/backend/baseplate/file-id-map.json
  • examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : Always use `compareStrings` from `baseplate-dev/utils` instead of `String.prototype.localeCompare()` for code generation, file sorting, and internal data structures

Applied to files:

  • examples/blog-with-auth/apps/backend/baseplate/file-id-map.json
  • examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : Use Dynamic Tasks for data-driven generation where code generation is driven by data

Applied to files:

  • examples/blog-with-auth/apps/backend/baseplate/file-id-map.json
  • examples/todo-with-auth0/apps/backend/.templates-info.json
  • examples/blog-with-auth/apps/backend/.templates-info.json
  • examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{ts,tsx} : Add JSDocs to all exported functions, interfaces, and classes with documentation of the function, its parameters, return value, and all fields

Applied to files:

  • examples/todo-with-auth0/apps/backend/.templates-info.json
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{ts,tsx} : Use `import type` for type-only imports

Applied to files:

  • examples/todo-with-auth0/apps/backend/.templates-info.json
  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-07-07T18:24:17.522Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 592
File: plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-required-user-id.ts:1-2
Timestamp: 2025-07-07T18:24:17.522Z
Learning: Files under templates/** directories can use `// ts-nocheck` because they are templates meant for code generation, not direct type checking.

Applied to files:

  • examples/todo-with-auth0/apps/backend/.templates-info.json
  • examples/blog-with-auth/apps/backend/.templates-info.json
  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/*.{ts,tsx} : Use `import type` for type-only imports in TypeScript

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{unit,int}.test.ts : Import test functions explicitly from 'vitest' instead of using globals. Example: `import { describe, expect, it } from 'vitest';`

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/tsconfig.json : Use `NodeNext` module resolution in TypeScript configuration

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-06-11T18:31:22.247Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
📚 Learning: 2025-04-21T06:32:22.476Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "src/*": ["src/*"] to "src/*": ["./src/*"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
  • examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json
📚 Learning: 2025-11-24T19:45:01.582Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-11-24T19:45:01.582Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:45:01.582Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-11-24T19:45:01.582Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (`src/` is the alias for `src/`)

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
📚 Learning: 2025-04-21T06:32:22.476Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "src/*": ["src/*"] to "src/*": ["./src/*"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
  • examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json
📚 Learning: 2025-07-16T17:15:56.714Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 613
File: packages/react-generators/src/generators/core/react-components/templates/components/ui/circular-progress/circular-progress.tsx:0-0
Timestamp: 2025-07-16T17:15:56.714Z
Learning: For imports starting with `$` (template aliases), do not require `.js` extensions as these are resolved differently during the generation process, unlike regular file imports which require explicit `.js` extensions under Node 16 module resolution.

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, modify the file to export it

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:45:01.582Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-11-24T19:45:01.582Z
Learning: Applies to **/*.{ts,tsx,js} : Node 16 module resolution - include file extensions in imports (`.js`)

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
📚 Learning: 2025-07-14T12:02:36.595Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 609
File: packages/ui-components/src/components/badge/badge-with-icon.stories.tsx:3-3
Timestamp: 2025-07-14T12:02:36.595Z
Learning: For TypeScript/TSX files: `#src/` is the new path alias standard for `src/` directory imports, replacing the previous `src/` convention.

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/tsconfig.json : Use strict type checking in TypeScript configuration

Applied to files:

  • examples/blog-with-auth/apps/backend/.templates-info.json
  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/*.{ts,tsx,js,jsx} : Always use .js extensions in import statements, even for TypeScript files (e.g., `import { getSystemInfo } from 'src/system-info.js';`)

Applied to files:

  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/*.{ts,tsx,js,jsx} : Follow ESM module resolution with TypeScript's `NodeNext` setting

Applied to files:

  • examples/blog-with-auth/apps/backend/eslint.config.js
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/tsconfig.json : Enable `isolatedModules` in TypeScript configuration

Applied to files:

  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : Run `pnpm lint:affected` and `pnpm typecheck` before committing changes

Applied to files:

  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
📚 Learning: 2025-11-24T19:45:01.582Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-11-24T19:45:01.582Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript with strict type checking enabled

Applied to files:

  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
📚 Learning: 2025-11-24T19:45:19.136Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-11-24T19:45:19.136Z
Learning: Applies to **/*.unit.test.{ts,tsx} : Unit tests are colocated with source files using `.unit.test.ts` suffix

Applied to files:

  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{unit,int}.test.ts : Use `.unit.test.ts` or `.int.test.ts` suffixes for test files in TypeScript

Applied to files:

  • examples/blog-with-auth/apps/backend/eslint.config.js
  • examples/todo-with-auth0/apps/backend/eslint.config.js
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{ts,tsx,js,jsx} : Always use .js extensions in import statements, even for TypeScript files. Example: `import { getSystemInfo } from 'src/system-info.js';`

Applied to files:

  • examples/todo-with-auth0/apps/backend/eslint.config.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Lint Examples (todo-with-auth0)
  • GitHub Check: Verify Sync (todo-with-auth0)
  • GitHub Check: Verify Sync (blog-with-auth)
  • GitHub Check: test
  • GitHub Check: Lint
  • GitHub Check: Test E2E
🔇 Additional comments (8)
examples/blog-with-auth/apps/backend/baseplate/file-id-map.json (1)

76-76: LGTM!

Mapping correctly updated to reference prisma.config.ts instead of prisma.config.mts, consistent with the broader migration in this PR.

packages/fastify-generators/src/generators/prisma/prisma/extractor.json (1)

29-30: LGTM!

Template paths correctly updated to reference prisma.config.ts, aligning with the migration from .mts to .ts extension across the codebase.

examples/blog-with-auth/apps/backend/.templates-info.json (1)

14-18: LGTM!

Template entry correctly renamed to prisma.config.ts, consistent with the file rename across the repository.

examples/todo-with-auth0/apps/backend/.templates-info.json (1)

14-18: LGTM!

Template entry correctly renamed to prisma.config.ts, maintaining consistency with the file rename pattern across the repository.

examples/blog-with-auth/apps/backend/prisma.config.ts (1)

1-19: The Prisma v7 configuration API is correct. The use of defineConfig() and env() from 'prisma/config' matches the standard Prisma v7 pattern.

However, the environment loading approach deviates from the Prisma v7 standard. In Prisma ORM v7, the generated prisma.config.ts file includes import 'dotenv/config' by default, rather than using loadEnvFile() from node:process with a conditional existsSync check. When using prisma.config.ts, environment variables need to be loaded explicitly—consider aligning with the documented approach for consistency.

examples/todo-with-auth0/apps/backend/baseplate/file-id-map.json (1)

111-111: LGTM!

The file path update from prisma.config.mts to prisma.config.ts aligns with the Prisma 7 upgrade and is consistent with changes across the PR.

packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts (1)

1-21: LGTM!

The template structure correctly mirrors the example configuration files. The @ts-nocheck directive is appropriate for a template with placeholders like TPL_SEED_COMMAND, and the template will generate the same structure seen in the example files.

examples/todo-with-auth0/apps/backend/prisma.config.ts (1)

3-3: No issues found. The Prisma 7.2.0 APIs are correctly implemented and follow the official configuration standards.

Comment on lines 37 to 41
const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [
'prisma.config.mts',
'prisma.config.ts',
'vitest.config.ts',
'vitest.config.ts',
]; /* TPL_DEFAULT_PROJECT_FILES:END */
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove duplicate vitest.config.ts entry.

Lines 39-40 contain duplicate entries of 'vitest.config.ts' in the TS_DEFAULT_PROJECT_FILES array.

🔎 Proposed fix
 const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [
   'prisma.config.ts',
   'vitest.config.ts',
-  'vitest.config.ts',
 ]; /* TPL_DEFAULT_PROJECT_FILES:END */
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [
'prisma.config.mts',
'prisma.config.ts',
'vitest.config.ts',
'vitest.config.ts',
]; /* TPL_DEFAULT_PROJECT_FILES:END */
const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [
'prisma.config.ts',
'vitest.config.ts',
]; /* TPL_DEFAULT_PROJECT_FILES:END */
🤖 Prompt for AI Agents
In examples/blog-with-auth/apps/backend/eslint.config.js around lines 37 to 41,
the TS_DEFAULT_PROJECT_FILES array contains a duplicated 'vitest.config.ts'
entry; remove the duplicate so the array lists each filename only once (e.g.,
keep one 'vitest.config.ts' and the other entries unchanged) to ensure the
project files array has unique entries.

Comment on lines 37 to 41
const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [
'prisma.config.mts',
'prisma.config.ts',
'vitest.config.ts',
'vitest.config.ts',
]; /* TPL_DEFAULT_PROJECT_FILES:END */
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove duplicate vitest.config.ts entry.

Lines 39-40 contain duplicate entries of 'vitest.config.ts' in the TS_DEFAULT_PROJECT_FILES array.

🔎 Proposed fix
 const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [
   'prisma.config.ts',
   'vitest.config.ts',
-  'vitest.config.ts',
 ]; /* TPL_DEFAULT_PROJECT_FILES:END */
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [
'prisma.config.mts',
'prisma.config.ts',
'vitest.config.ts',
'vitest.config.ts',
]; /* TPL_DEFAULT_PROJECT_FILES:END */
const TS_DEFAULT_PROJECT_FILES = /* TPL_DEFAULT_PROJECT_FILES:START */ [
'prisma.config.ts',
'vitest.config.ts',
]; /* TPL_DEFAULT_PROJECT_FILES:END */
🤖 Prompt for AI Agents
In examples/todo-with-auth0/apps/backend/eslint.config.js around lines 37 to 41,
the TS_DEFAULT_PROJECT_FILES array contains a duplicate 'vitest.config.ts'
entry; remove the duplicated 'vitest.config.ts' so each file appears only once
(leave 'prisma.config.ts' and one 'vitest.config.ts').

"@baseplate-dev/sync": "workspace:*",
"@baseplate-dev/utils": "workspace:*",
"@prisma/internals": "6.17.1",
"@prisma/internals": "7.2.0",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Verify Prisma/internals version and address breaking changes before upgrade.

Prisma 7.2.0 is released and stable, but this major version introduces significant breaking changes and unresolved security concerns that require attention:

Breaking Changes:
Environment variables are not loaded by default in Prisma 7.0.0; developers must explicitly load them when calling the Prisma CLI. Additionally, as of Prisma 7, driver adapters are required, and Prisma Config is now the default place for configuring database URL, schema location, and migrations.

Security Concerns:
Prisma 7 depends on hono <=4.10.2, which has multiple high-severity vulnerabilities including body limit middleware bypass, improper authorization, and CORS bypass. This was confirmed to be fixed in Prisma 7.0.1, though ongoing issues have been reported.

Note: The specified version @prisma/[email protected] differs from the latest published version (7.0.1). Verify the correct version and ensure all configuration changes for Prisma 7 are addressed.

🤖 Prompt for AI Agents
packages/fastify-generators/package.json around line 53: the dependency is
pinned to @prisma/[email protected] which may introduce Prisma v7 breaking changes
and known security issues (hono vulnerabilities); change the dependency to a
vetted safe version (e.g., 7.0.1) or the semver range your project supports, run
dependency install and npm/yarn audit, update any Prisma v7 configuration
(explicitly load env vars where Prisma CLI is used, add required driver
adapters, and move DB config to Prisma Config if upgrading), run the test suite
and migration scripts to catch breaking changes, and if you must keep 7.2.0
create a mitigation plan (patch or upgrade hono transitive dep, or add a direct
safe hono resolution) and document the rationale in package.json or PR notes.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts (1)

5-5: Remove unused import or use the env helper.

Same issue as in the example file: env is imported but never used. Line 19 uses process.env.DATABASE_URL directly instead of the imported env helper.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b3a6031 and d3565ee.

⛔ Files ignored due to path filters (4)
  • examples/blog-with-auth/apps/backend/baseplate/generated/prisma.config.ts is excluded by !**/generated/**, !**/generated/**
  • examples/todo-with-auth0/apps/backend/baseplate/generated/prisma.config.ts is excluded by !**/generated/**, !**/generated/**
  • tests/simple/apps/backend/baseplate/generated/prisma.config.ts is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/apps/backend/prisma.config.ts is excluded by !tests/**
📒 Files selected for processing (3)
  • examples/blog-with-auth/apps/backend/prisma.config.ts
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx}: Use TypeScript with strict type checking enabled
Always include return types on top-level functions including React components (React.ReactElement)
Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)
If a particular interface or type is not exported, change the file so it is exported
If caught on a typing loop where forcing the any type is necessary, do not iterate too much - leave the typing as broken and let the user fix it

If target code is not easily testable, refactor it to be more testable (e.g., export types or functions)

**/*.{ts,tsx}: Import components from '@baseplate-dev/ui-components' package for UI development (e.g., Button, Input, Card, Dialog, etc.)
Use form components with React Hook Form controller variants (InputField, TextareaField, SelectField, CheckboxField, SwitchField, ComboboxField, MultiComboboxField, ColorPickerField, DatePickerField, DateTimePickerField)
Use SidebarLayout, Card, Breadcrumb, NavigationMenu, and NavigationTabs components for consistent layout structure from @baseplate-dev/ui-components
Use Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal dialogs and confirmation interactions
Always use compareStrings from @baseplate-dev/utils instead of String.prototype.localeCompare() for code generation, file sorting, and internal data structures
If a particular interface or type is not exported, modify the file to export it
Use TsCodeFragment for composable code pieces and TsCodeUtils for manipulating fragments when generating TypeScript code
Create generators using createGenerator with configuration via descriptor schema (Zod), organizing into one or more tasks created with createGeneratorTask
Tasks should have run (initialization) and build (code generation) phases, export and consume providers, and may be organized into phases for ordered execution
Use provider scopes to control visibility and prevent collisions be...

Files:

  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts
  • examples/blog-with-auth/apps/backend/prisma.config.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx,js}: Node 16 module resolution - include file extensions in imports (.js)
Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
Order functions such that functions are placed below the variables/functions they use
Prefer using nullish coalescing operator (??) instead of logical or (||), enforced via ESLint rule
Prefer barrel exports e.g. export * from './foo.js' instead of individual named exports
Use console.info/warn/error instead of console.log

Files:

  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts
  • examples/blog-with-auth/apps/backend/prisma.config.ts
examples/blog-with-auth/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (examples/blog-with-auth/CLAUDE.md)

examples/blog-with-auth/**/*.{ts,tsx,js,jsx}: Always use .js extensions in import statements, even for TypeScript files (e.g., import { getSystemInfo } from '@src/system-info.js';)
Follow ESM module resolution with TypeScript's NodeNext setting
Add JSDocs to all exported functions, interfaces, and classes with documentation of the function, its parameters, return value, and all fields

Files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
examples/blog-with-auth/**/*.{ts,tsx}

📄 CodeRabbit inference engine (examples/blog-with-auth/CLAUDE.md)

examples/blog-with-auth/**/*.{ts,tsx}: Use import type for type-only imports in TypeScript
Always specify explicit return types for functions in TypeScript

Files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
🧠 Learnings (8)
📚 Learning: 2025-11-24T19:45:01.582Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-11-24T19:45:01.582Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts
  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/*.{ts,tsx} : Use `import type` for type-only imports in TypeScript

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/tsconfig.json : Use `NodeNext` module resolution in TypeScript configuration

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/tsconfig.json : Use strict type checking in TypeScript configuration

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-04-21T06:32:22.476Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "src/*": ["src/*"] to "src/*": ["./src/*"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-04-21T06:32:22.476Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "src/*": ["src/*"] to "src/*": ["./src/*"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, modify the file to export it

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{unit,int}.test.ts : Import test functions explicitly from 'vitest' instead of using globals. Example: `import { describe, expect, it } from 'vitest';`

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
🪛 GitHub Check: Lint Examples (blog-with-auth)
examples/blog-with-auth/apps/backend/prisma.config.ts

[failure] 3-3:
'env' is defined but never used

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Verify Sync (todo-with-auth0)
  • GitHub Check: Verify Sync (blog-with-auth)
  • GitHub Check: test
  • GitHub Check: Test E2E
  • GitHub Check: Lint
🔇 Additional comments (1)
examples/blog-with-auth/apps/backend/prisma.config.ts (1)

16-18: Verify datasource configuration approach.

Confirm whether using process.env.DATABASE_URL directly is the intended pattern for Prisma 7, or if the imported env helper should be used instead (e.g., env.DATABASE_URL).


import { existsSync } from 'node:fs';
import { loadEnvFile } from 'node:process';
import { defineConfig, env } from 'prisma/config';
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use the imported env helper instead of process.env.DATABASE_URL.

The env helper from prisma/config is imported but never used. Use the env() helper to enforce that the environment variable exists. Replace process.env.DATABASE_URL on line 17 with env('DATABASE_URL') to follow Prisma 7 best practices.

🧰 Tools
🪛 GitHub Check: Lint Examples (blog-with-auth)

[failure] 3-3:
'env' is defined but never used

🤖 Prompt for AI Agents
In examples/blog-with-auth/apps/backend/prisma.config.ts around line 3 and
specifically line 17, the imported env helper from 'prisma/config' is unused and
the code reads process.env.DATABASE_URL; replace the direct process.env access
with env('DATABASE_URL') so the Prisma config validates the variable at startup,
keeping the existing import and removing reliance on raw process.env access.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d3565ee and 44217f8.

⛔ Files ignored due to path filters (4)
  • examples/blog-with-auth/apps/backend/baseplate/generated/prisma.config.ts is excluded by !**/generated/**, !**/generated/**
  • examples/todo-with-auth0/apps/backend/baseplate/generated/prisma.config.ts is excluded by !**/generated/**, !**/generated/**
  • tests/simple/apps/backend/baseplate/generated/prisma.config.ts is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/apps/backend/prisma.config.ts is excluded by !tests/**
📒 Files selected for processing (3)
  • examples/blog-with-auth/apps/backend/prisma.config.ts
  • examples/todo-with-auth0/apps/backend/prisma.config.ts
  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.ts
🧰 Additional context used
📓 Path-based instructions (6)
examples/todo-with-auth0/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (examples/todo-with-auth0/CLAUDE.md)

Always use .js extensions in import statements, even for TypeScript files. Example: import { getSystemInfo } from '@src/system-info.js';

Files:

  • examples/todo-with-auth0/apps/backend/prisma.config.ts
examples/todo-with-auth0/**/*.{ts,tsx}

📄 CodeRabbit inference engine (examples/todo-with-auth0/CLAUDE.md)

examples/todo-with-auth0/**/*.{ts,tsx}: Use import type for type-only imports
Always specify explicit return types for functions
Add JSDocs to all exported functions, interfaces, and classes with documentation of the function, its parameters, return value, and all fields

Files:

  • examples/todo-with-auth0/apps/backend/prisma.config.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx}: Use TypeScript with strict type checking enabled
Always include return types on top-level functions including React components (React.ReactElement)
Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)
If a particular interface or type is not exported, change the file so it is exported
If caught on a typing loop where forcing the any type is necessary, do not iterate too much - leave the typing as broken and let the user fix it

If target code is not easily testable, refactor it to be more testable (e.g., export types or functions)

**/*.{ts,tsx}: Import components from '@baseplate-dev/ui-components' package for UI development (e.g., Button, Input, Card, Dialog, etc.)
Use form components with React Hook Form controller variants (InputField, TextareaField, SelectField, CheckboxField, SwitchField, ComboboxField, MultiComboboxField, ColorPickerField, DatePickerField, DateTimePickerField)
Use SidebarLayout, Card, Breadcrumb, NavigationMenu, and NavigationTabs components for consistent layout structure from @baseplate-dev/ui-components
Use Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal dialogs and confirmation interactions
Always use compareStrings from @baseplate-dev/utils instead of String.prototype.localeCompare() for code generation, file sorting, and internal data structures
If a particular interface or type is not exported, modify the file to export it
Use TsCodeFragment for composable code pieces and TsCodeUtils for manipulating fragments when generating TypeScript code
Create generators using createGenerator with configuration via descriptor schema (Zod), organizing into one or more tasks created with createGeneratorTask
Tasks should have run (initialization) and build (code generation) phases, export and consume providers, and may be organized into phases for ordered execution
Use provider scopes to control visibility and prevent collisions be...

Files:

  • examples/todo-with-auth0/apps/backend/prisma.config.ts
  • examples/blog-with-auth/apps/backend/prisma.config.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx,js}: Node 16 module resolution - include file extensions in imports (.js)
Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
Order functions such that functions are placed below the variables/functions they use
Prefer using nullish coalescing operator (??) instead of logical or (||), enforced via ESLint rule
Prefer barrel exports e.g. export * from './foo.js' instead of individual named exports
Use console.info/warn/error instead of console.log

Files:

  • examples/todo-with-auth0/apps/backend/prisma.config.ts
  • examples/blog-with-auth/apps/backend/prisma.config.ts
examples/blog-with-auth/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (examples/blog-with-auth/CLAUDE.md)

examples/blog-with-auth/**/*.{ts,tsx,js,jsx}: Always use .js extensions in import statements, even for TypeScript files (e.g., import { getSystemInfo } from '@src/system-info.js';)
Follow ESM module resolution with TypeScript's NodeNext setting
Add JSDocs to all exported functions, interfaces, and classes with documentation of the function, its parameters, return value, and all fields

Files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
examples/blog-with-auth/**/*.{ts,tsx}

📄 CodeRabbit inference engine (examples/blog-with-auth/CLAUDE.md)

examples/blog-with-auth/**/*.{ts,tsx}: Use import type for type-only imports in TypeScript
Always specify explicit return types for functions in TypeScript

Files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
🧠 Learnings (11)
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{ts,tsx} : Add JSDocs to all exported functions, interfaces, and classes with documentation of the function, its parameters, return value, and all fields

Applied to files:

  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{unit,int}.test.ts : Import test functions explicitly from 'vitest' instead of using globals. Example: `import { describe, expect, it } from 'vitest';`

Applied to files:

  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{ts,tsx} : Use `import type` for type-only imports

Applied to files:

  • examples/todo-with-auth0/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:45:01.582Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-11-24T19:45:01.582Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported

Applied to files:

  • examples/todo-with-auth0/apps/backend/prisma.config.ts
  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/*.{ts,tsx} : Use `import type` for type-only imports in TypeScript

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/tsconfig.json : Use `NodeNext` module resolution in TypeScript configuration

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/tsconfig.json : Use strict type checking in TypeScript configuration

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-04-21T06:32:22.476Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "src/*": ["src/*"] to "src/*": ["./src/*"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-04-21T06:32:22.476Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "src/*": ["src/*"] to "src/*": ["./src/*"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/*.{ts,tsx,js,jsx} : Add JSDocs to all exported functions, interfaces, and classes with documentation of the function, its parameters, return value, and all fields

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, modify the file to export it

Applied to files:

  • examples/blog-with-auth/apps/backend/prisma.config.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Lint Examples (todo-with-auth0)
  • GitHub Check: Verify Sync (blog-with-auth)
  • GitHub Check: Verify Sync (todo-with-auth0)
  • GitHub Check: Test E2E
  • GitHub Check: Lint
  • GitHub Check: test
🔇 Additional comments (2)
examples/todo-with-auth0/apps/backend/prisma.config.ts (2)

1-3: LGTM! Imports are correct for Prisma 7 migration.

The imports correctly use Node built-ins and the new defineConfig function from 'prisma/config'. No file extensions needed for package imports per coding guidelines.


5-8: LGTM! Conditional environment loading is appropriate.

The conditional check prevents errors when .env is absent, which is a good defensive practice.


import { existsSync } from 'node:fs';
import { loadEnvFile } from 'node:process';
import { defineConfig } from 'prisma/config';
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use the env() helper for validated environment variable access.

Import and use the env('DATABASE_URL') helper from 'prisma/config' to validate that the environment variable exists at startup. This provides fail-fast behavior with clear error messages and follows Prisma 7 best practices, as noted in the previous review.

🔎 Proposed fix
-import { defineConfig } from 'prisma/config';
+import { defineConfig, env } from 'prisma/config';
   datasource: {
-    url: process.env.DATABASE_URL,
+    url: env('DATABASE_URL'),
   },

Also applies to: 17-17

🤖 Prompt for AI Agents
In examples/blog-with-auth/apps/backend/prisma.config.ts around lines 3 and 17,
the code imports defineConfig but does not use the env() helper to validate
DATABASE_URL; update the import to also bring in env from 'prisma/config' and
replace any direct process.env or raw string usage of the DATABASE_URL with
env('DATABASE_URL') so the value is validated at startup and fails fast with a
clear error if missing.

Comment on lines +10 to +19
export default defineConfig({
schema: './prisma/schema.prisma',
migrations: {
path: './prisma/migrations',
seed: /* TPL_SEED_COMMAND:START */ 'tsx --env-file-if-exists=.env --env-file-if-exists=.seed.env src/prisma/seed.ts' /* TPL_SEED_COMMAND:END */,
},
} satisfies PrismaConfig;
datasource: {
url: process.env.DATABASE_URL,
},
});
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use env() helper for type-safe DATABASE_URL validation instead of direct process.env access.

The defineConfig API with configuration shape shown is correct. However, the current code uses process.env.DATABASE_URL directly. The env() helper function from prisma/config provides type-safe access to environment variables and throws an error if the specified environment variable is not defined, which is important because every Prisma CLI command loads the prisma.config.ts file, though only some commands actually need the datasource.url value.

Using process.env.DATABASE_URL instead means validation is deferred to runtime rather than failing fast during config load. Consider:

import { defineConfig, env } from 'prisma/config';

export default defineConfig({
  schema: './prisma/schema.prisma',
  migrations: {
    path: './prisma/migrations',
    seed: /* TPL_SEED_COMMAND:START */ 'tsx --env-file-if-exists=.env --env-file-if-exists=.seed.env src/prisma/seed.ts' /* TPL_SEED_COMMAND:END */,
  },
  datasource: {
    url: env('DATABASE_URL'),
  },
});

If the environment variable isn't guaranteed to exist (e.g., in CI/CD pipelines where you only run prisma generate for type-checking), use process.env directly with an optional fallback; use env() when you want to enforce that an environment variable exists, and use process.env directly when the variable may be optional depending on the command being run.

🤖 Prompt for AI Agents
In examples/todo-with-auth0/apps/backend/prisma.config.ts around lines 10 to 19,
replace the direct process.env.DATABASE_URL usage with the prisma config env()
helper to perform type-safe validation at config load; import env from
'prisma/config' alongside defineConfig and set datasource.url to
env('DATABASE_URL'). If DATABASE_URL is intentionally optional for some CI
commands, instead leave process.env access or provide a safe fallback, but
prefer env() when you want the config load to fail fast if the variable is
missing.

@kingston kingston merged commit e426b52 into main Dec 22, 2025
16 checks passed
@kingston kingston deleted the kingston/eng-935-upgrade-to-prisma-7 branch December 22, 2025 12:54
@github-actions github-actions bot mentioned this pull request Dec 22, 2025
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.

2 participants