Skip to content

Conversation

@jthrilly
Copy link
Member

This pull request refactors database imports throughout the codebase to improve modularity and compatibility, particularly in preparation for serverless deployments (e.g., Vercel/Netlify with Neon). It replaces direct imports from @prisma/client with imports from a generated client in ~/lib/db/generated/client, and updates all references to the prisma instance to use ~/lib/db. Additionally, it updates the Dockerfile and environment configuration to support these changes and adds an option for using the Neon PostgreSQL adapter.

Database Import Refactoring:

  • Replaced all imports of types and the prisma instance from @prisma/client and ~/utils/db with imports from ~/lib/db/generated/client and ~/lib/db respectively across the actions directory and dashboard components. This ensures a single source of truth for the Prisma client and improves compatibility with serverless environments. [1] [2] [3] F823c60bL13R13, [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]

Dockerfile and Build Process Updates:

  • Updated the Dockerfile to copy Prisma schema and configuration files from new locations, include new runtime scripts, and adjust the build context for better compatibility with the refactored database structure. Also changed the startup command to reference the new scripts location. [1] [2] [3]

Environment Configuration:

  • Added a new environment variable USE_NEON_POSTGRES_ADAPTER to .env.example to allow switching between the standard PostgreSQL adapter and the Neon serverless adapter, supporting deployments on platforms like Vercel and Netlify.

dependabot bot and others added 30 commits November 17, 2025 12:09
Bumps [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) from 9.1.12 to 9.1.16.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.16/code/core)

---
updated-dependencies:
- dependency-name: storybook
  dependency-version: 9.1.16
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@types/validator](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/validator) from 13.15.2 to 13.15.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/validator)

---
updated-dependencies:
- dependency-name: "@types/validator"
  dependency-version: 13.15.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 15.5.5 to 15.5.6.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v15.5.6/packages/eslint-config-next)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-version: 15.5.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@prisma/client](https://github.com/prisma/prisma/tree/HEAD/packages/client) from 6.17.1 to 6.19.0.
- [Release notes](https://github.com/prisma/prisma/releases)
- [Commits](https://github.com/prisma/prisma/commits/6.19.0/packages/client)

---
updated-dependencies:
- dependency-name: "@prisma/client"
  dependency-version: 6.19.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…_yarn/next/storybook-9.1.16

Bump storybook from 9.1.12 to 9.1.16
…_yarn/next/prisma/client-6.19.0

Bump @prisma/client from 6.17.1 to 6.19.0
…_yarn/next/types/validator-13.15.9

Bump @types/validator from 13.15.2 to 13.15.9
…_yarn/next/eslint-config-next-15.5.6

Bump eslint-config-next from 15.5.5 to 15.5.6
Bumps [@types/validator](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/validator) from 13.15.9 to 13.15.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/validator)

---
updated-dependencies:
- dependency-name: "@types/validator"
  dependency-version: 13.15.10
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [knip](https://github.com/webpro-nl/knip/tree/HEAD/packages/knip) from 5.69.1 to 5.70.1.
- [Release notes](https://github.com/webpro-nl/knip/releases)
- [Changelog](https://github.com/webpro-nl/knip/blob/main/packages/knip/.release-it.json)
- [Commits](https://github.com/webpro-nl/knip/commits/5.70.1/packages/knip)

---
updated-dependencies:
- dependency-name: knip
  dependency-version: 5.70.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 4.0.10 to 4.0.13.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.13/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-version: 4.0.13
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…_yarn/next/vitest-4.0.13

Bump vitest from 4.0.10 to 4.0.13
…_yarn/next/knip-5.70.1

Bump knip from 5.69.1 to 5.70.1
…_yarn/next/types/validator-13.15.10

Bump @types/validator from 13.15.9 to 13.15.10
Bumps [sass](https://github.com/sass/dart-sass) from 1.94.0 to 1.94.2.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.94.0...1.94.2)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.94.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…_yarn/next/sass-1.94.2

Bump sass from 1.94.0 to 1.94.2
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 4.0.13 to 4.0.14.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.14/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-version: 4.0.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [motion](https://github.com/motiondivision/motion) from 12.23.24 to 12.23.25.
- [Changelog](https://github.com/motiondivision/motion/blob/main/CHANGELOG.md)
- [Commits](motiondivision/motion@v12.23.24...v12.23.25)

---
updated-dependencies:
- dependency-name: motion
  dependency-version: 12.23.25
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.47.0 to 8.48.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.48.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.48.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [knip](https://github.com/webpro-nl/knip/tree/HEAD/packages/knip) from 5.70.2 to 5.71.0.
- [Release notes](https://github.com/webpro-nl/knip/releases)
- [Commits](https://github.com/webpro-nl/knip/commits/5.71.0/packages/knip)

---
updated-dependencies:
- dependency-name: knip
  dependency-version: 5.71.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps the npm_and_yarn group with 1 update in the / directory: [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast).


Updates `mdast-util-to-hast` from 13.2.0 to 13.2.1
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](syntax-tree/mdast-util-to-hast@13.2.0...13.2.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
…_yarn/next/knip-5.71.0

Bump knip from 5.70.2 to 5.71.0
…_yarn/next/typescript-eslint/parser-8.48.0

Bump @typescript-eslint/parser from 8.47.0 to 8.48.0
…_yarn/next/motion-12.23.25

Bump motion from 12.23.24 to 12.23.25
…_yarn/next/vitest-4.0.14

Bump vitest from 4.0.13 to 4.0.14
…_yarn/npm_and_yarn-8f9a9acd57

Bump mdast-util-to-hast from 13.2.0 to 13.2.1 in the npm_and_yarn group across 1 directory
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 15.5.6 to 15.5.7.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v15.5.7/packages/eslint-config-next)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-version: 15.5.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.66.0 to 7.68.0.
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](react-hook-form/react-hook-form@v7.66.0...v7.68.0)

---
updated-dependencies:
- dependency-name: react-hook-form
  dependency-version: 7.68.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Copy link

Copilot AI commented Dec 12, 2025

@jthrilly I've opened a new pull request, #561, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits December 12, 2025 09:55
Co-authored-by: jthrilly <1387940+jthrilly@users.noreply.github.com>
Fix outdated file path reference in prisma.config.ts comment
claude and others added 2 commits December 12, 2025 10:30
The Prisma generated client (lib/db/generated/) is gitignored and only
created during pnpm install via postinstall. In the multi-stage Docker
build, only node_modules was copied from the deps stage to builder stage,
but the generated client lives outside node_modules. This caused the
build to fail when Next.js tried to import from the non-existent
generated client.

Adding `prisma generate` before `pnpm run build` ensures the client
is available in the builder stage.
…build-workflow-014w8bryyTGQAjeya6Qk2V62

Fix Docker build by adding prisma generate to builder stage
claude and others added 2 commits December 12, 2025 11:52
claude and others added 2 commits December 12, 2025 13:20
The Neon serverless adapter doesn't work in CLI/Node.js context (only in
serverless runtimes). CLI scripts must use the PG adapter directly instead
of importing from lib/db which conditionally uses the Neon adapter.
…adapter-cli-01EDPN5hytx5mgs9B7CybHuZ

fix: Use dynamic import in CLI scripts to ensure adapter env var is l…
dependabot bot and others added 6 commits December 15, 2025 12:08
Bumps [knip](https://github.com/webpro-nl/knip/tree/HEAD/packages/knip) from 5.71.0 to 5.73.4.
- [Release notes](https://github.com/webpro-nl/knip/releases)
- [Commits](https://github.com/webpro-nl/knip/commits/5.73.4/packages/knip)

---
updated-dependencies:
- dependency-name: knip
  dependency-version: 5.73.4
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [sass](https://github.com/sass/dart-sass) from 1.94.2 to 1.96.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.94.2...1.96.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.96.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [motion](https://github.com/motiondivision/motion) from 12.23.25 to 12.23.26.
- [Changelog](https://github.com/motiondivision/motion/blob/main/CHANGELOG.md)
- [Commits](motiondivision/motion@v12.23.25...v12.23.26)

---
updated-dependencies:
- dependency-name: motion
  dependency-version: 12.23.26
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](tailwindlabs/prettier-plugin-tailwindcss@v0.7.1...v0.7.2)

---
updated-dependencies:
- dependency-name: prettier-plugin-tailwindcss
  dependency-version: 0.7.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@t3-oss/env-nextjs](https://github.com/t3-oss/t3-env/tree/HEAD/packages/nextjs) from 0.13.8 to 0.13.10.
- [Release notes](https://github.com/t3-oss/t3-env/releases)
- [Changelog](https://github.com/t3-oss/t3-env/blob/main/packages/nextjs/CHANGELOG.md)
- [Commits](https://github.com/t3-oss/t3-env/commits/@t3-oss/env-nextjs@0.13.10/packages/nextjs)

---
updated-dependencies:
- dependency-name: "@t3-oss/env-nextjs"
  dependency-version: 0.13.10
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…_yarn/next/t3-oss/env-nextjs-0.13.10

Bump @t3-oss/env-nextjs from 0.13.8 to 0.13.10
@netlify
Copy link

netlify bot commented Dec 17, 2025

Deploy Preview for fresco-storybook failed.

Name Link
🔨 Latest commit a62e21b
🔍 Latest deploy log https://app.netlify.com/projects/fresco-storybook/deploys/69428f4f9bb0eb000800c336

…_yarn/next/prettier-plugin-tailwindcss-0.7.2

Bump prettier-plugin-tailwindcss from 0.7.1 to 0.7.2
…_yarn/next/sass-1.96.0

Bump sass from 1.94.2 to 1.96.0
…_yarn/next/motion-12.23.26

Bump motion from 12.23.25 to 12.23.26
…_yarn/next/knip-5.73.4

Bump knip from 5.71.0 to 5.73.4
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.

3 participants